I have a product variation "Apparel", and a corresponding content type provided by kickstart "Apparel".
I have added a new content type "Product kit", which has an entity reference field pointing to "Commerce product" entity and "Apparel" is one of them. A single product kit node, can contain products of different types : "Apparel", "Luggage", "Cups", etc.
Using the newly created Commerce Product Kit module I have an option to add all the products stored in the entity reference field in a "product kit" node to cart.
I need to find a way to check if a product has been added from the "Product display" node or "Product kit" node. Is there a way to do this? I checked into
hook_commerce_cart_product_add, but it doesn't help me identifying the source node type of the product. Any pointers would be appreciated.