I am making a website in Drupal 7 and Drupal Commerce with some custom modules. Now, I have a set of Products.
The Products are,
- Product 1
- Product 2
- Product 3
I have two line items. Lets say Product Sizes. And product weight.
Each have select or another module implemented. I have followed the concept of Randy Fay's Screencasts.
Now with each line items the cost of the product changes. As per the screenscasts, the process will be,
- Create Line Items
- Create Products
- Create Product Display and add a Product Field Reference to it.
- Then it will display the line item in the product display page.
But, I am not creating the Product display. This is going to be via the custom module. So can you tell me from the coding point of view, what is the relation between a line item and a product. So that I can list all the created line items for a displayed product.