Magento – How to set a rule for buying two products together to reduce the total price

catalog-price-rulesmagento-1.7shopping-cart-price-rules

I am trying to make a block which shows two products in it with a rule that if a customer bought these two products together the total amount will be reduce by some extent.

e.g. if product A is of $100 and B is of $75, then both will be buy together for $150.

Can anyone has an idea how to apply these kind of promotion rules in magento. I really need to do this as the client need this kind of functionality on its product view page.

enter image description here

I want something like this.

Best Answer

To add multiple products to the cart from the same request you need to use the related_product url parameter. Simply add the extra products to the end of your add to cart url separated by a coman

/product/159/related_product/162,161,160

If you are calling the getUrl function to build your url you can do this as follows:

Mage::app()->getStore()->getUrl('checkout/cart/add/', array('product'=> 12, 'related_product' => implode(',', array(123,456))));
Related Topic