I have some products in a Drupal Website using Drupal Commerce. Those products are listed via a custom modules to the front end. If the user clicks on any of the products then it goes to the product display page. There I have 2 checkbox and the Add to Cart Button. Such as
- Gift Packaging ($10.99)
- Custom Messages ($4.99) These are 2 checkboxes coming from a drupal form created on my custom module. I want to add these as line items to the Selected Product. Such as,
If user choses Product A and Gift Packaging then, Product A ($10.00) Gift Packaging ($10.99) Total : $20.99
- So how can I add the chosen line item to that product once the user clicks on the Add to Cart Button. I have a function that is fired once the button is clicked. The function is "my_module_add_to_cart()".
- How can I show the updated Price as $20.99 to the /cart page table?