If bundleproduct is added to the card, following is passed through the observer of the sales_quote_add_item
event:
- The bundleproduct.
- All the underlying simple product one after another.
So if you e.g. have a bundle product, with 4 options to choose a product and quantity, the observer is called 5 times.
In the database, a quote item is stored with the added bundle product and its selected underlying products.
$item->getProduct()
does return the object of the current quote item.
You can use functions like $product->getName()
and $product->getId()
, $product->getAttributeText('attribute_code')
, etc and all the logical stuff on it in the observer.