1

I'm looking to create a bundle offer where customers can buy two items from a collection (30 products with varying prices) and they get a fixed third item which is a FREE product.

As the final price will vary depending on what the customer chooses, how do I make the basket subtotal add the two items but ignore the third priced item?

Hope that makes sense

3

Since the third item is fixed, you can use shopping cart price rules:

  • if cart contains at least two items of category X
  • then add product Y as a gift

However you need a small extension for the "add product as a gift" action in shopping cart price rules:

You can get it for free here: https://github.com/code4business/freeproduct

It adds a new shopping cart price rules action "free product" where you can enter qty and sku.

screenshot admin

These products are added to the cart as non editable items with price 0 during sales rule validation.

screenshot cart

How it works

  • A new rule type is added to the sales rule form, in an observer on adminhtml_block_salesrule_actions_prepareform
  • An observer on salesrule_validator_process processes the new rule type. It adds the configured SKU to the cart and sets a custom price of 0 and a custom option that identifies the product as free gift.
  • Another observer on sales_quote_collect_totals_before removes existing gift items from the cart (that's what the custom option from before is for), before the rules are processed.
  • The cart item template is adjusted to remove qty input and "remove" link from gift items (they would not work anyways).

Disclaimer: I was involved in the development of this extension.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.