Tags/topics: 
3
Answers
Vote up!
1
Vote down!

Dollar amount discount based on quantity & terms?

This seems like it should be easy, but I am banging my head against the wall with an event registration discount:

Here's what I'm trying to accomplish: if a customer adds 2 qualifying registration products to the cart -- e.g., products tagged with a certain term -- they receive a one-time, $50 'sibling discount' off that entire order. It's like an automatic coupon but the user doesn't have to input a code. And when the qualifying products are removed from the cart, the discount is removed.

I'd like this to be done with a price adjustment, rather than dealing adding negative dollar product (-$50) to the cart.

God help me, I think I need a Loop, but not quite sure.

I've seen variations of this question asked all around Stack Exchange--even on this site--but there are never answers. Perhaps not possible in the manner I've described? I've been over and over Randy Fay's videos :)

Anyone done something similar or have a theory? Much appreciated!

Asked by: robbiew
on July 25, 2012

3 Answers

Vote up!
0
Vote down!

Update:

After going round and round, I decided to go with a negative dollar amount product to handle the discount. Appears to be working!

Here's how I did it:

Created a "Discount" vocabulary with 2 terms: "Qualifies for Discount" and "Discount Product." Attached first term to products that trigger a quantity discount. Attached second term to a new Product Type I created with a negative dollar amount price.

- Rule Event: 'After adding product to the cart'
- Condition: 'Total product with term quantity comparison' which checks for "Qualifies for Discount" term against the trigger quantity
- Action: add the Discount Product sku to the cart
- Action: 'set a data value' of quantity 1 (to make sure there's only every 1 max in cart)

Next, we need a Rule to remove the discount product when the qualifying products are removed:

- Rule Event: 'After removing product from cart'
- Condition: 'Total product with term quantity comparison' when "Qualifies for Discount" term is less than trigger quantity
- Action: Loop
- Rules Component Condition: 'Line item has term' ("Discount Product")
-Action: 'Remove item from list'
-Action: 'Save entity'

Also had to replace the editable quantity text field in the cart with the non-editable one.

Bulletproof? Don't know. But Randy Fay's Rules + Components video tutorial helped a lot.

Answer by: robbiew
Posted: Jul 26, 2012
Vote up!
0
Vote down!

I'm trying to create something similar basically adding a discount product but I need the price of the discount to be the same as the least priced item on the cart.

Answer by: hbalagtas
Posted: Aug 8, 2012
Vote up!
0
Vote down!

How did you replace the editable quantity text field in the cart with the non-editable one?

Answer by: Robt56
Posted: Jan 29, 2013