I have created a warranty as a product in magento which has 2 custom check box options. This product (warranty) does not have any specific page so I would like to display both the custom options of a warranty products as checkbox when selected one of the custom option the product (warranty) also should get added to the cart.
I want to display this addon product (warranty) only when the cart amount is larger then $2000. Is there any way to achieve this functionality? I have attached a screenshot below to illustrate the custom option.
Best Answer
You can create observer for events
checkout_cart_product_add_after
andcheckout_cart_product_update_after
and in your observer you can check cart total and add or remove product from cart dynamically.You can try below codes :
getting totals
adding product to cart
Similarly you can write for removing product from cart if while updating cart order total goes down the required amount.
Also in you can do necessary changes in item.phtml to remove remove link, qty update box and other stuff that you don't need.