Jump to content

Discount a single item when purchasing anotherh


derekjwhitten

Recommended Posts

I'm trying to set up a discount so that if a customer purchases a bed they will get a single cushion free.  If they choose to add a second cushion to their cart, then that cushion should not be discounted, only one.

I have set up the following, however this applies to all the teal cushions in the customer's cart.  Is there a way to achieve the discount I need?

 

Annotation 2020-05-22 154329.png

Link to comment
Share on other sites

Thanks, this looks like an interesting module!

In the ended up using a workaround where my module:

  • Is connected to hookActionCartSave
  • Checks what product was just added (using the data in $_POST)
  • If it's the correct product (a bed), it manually adds the free product (a cushion) using $params['cart']->updateQty
  • Then I create a customisation and set the price impact to the negative value of the cushion so that it's free

I'm installing conseq though because it looks like it could be useful for any number of things - thanks for sharing! 

EDIT: After installing I've realised this has a licence requirement after a 14 day trial so might give it a miss for now.

Edited by derekjwhitten (see edit history)
Link to comment
Share on other sites

On 5/24/2020 at 11:55 PM, derekjwhitten said:

I'm installing conseq though because it looks like it could be useful for any number of things - thanks for sharing! 

EDIT: After installing I've realised this has a licence requirement after a 14 day trial so might give it a miss for now.

Hi, I'm author of the Conseqs module.

I just wanted to let you know that there is no 14 day trial. Conseqs is free, but is limited to 2 rules -- your use case would require 1 rule. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...