Buy One X Get One X free?
How can I apply a discount rule to achieve a buy one (of x) get one (of x) free but only on particular products?
Thank you.
NJ
How can I apply a discount rule to achieve a buy one (of x) get one (of x) free but only on particular products?
Thank you.
NJ
That can get a little tricky. I'll need a little further clarification on how you want this to work.
Should they only get one for free? or for each one they purchase, should they get one for free.
In other words, if they order 4 of a product the discount applies to, should the discount be for 2 free or only 1 free and the other 3 at regular price?
where the discount applies to multiple products, do you want it to work that if they order 1 each of 2 products the discount applies to, they should get one of them free? is the discount applied to the aggregate of products it applies to or only at a product by product basis?
No, it's purely buy one of X, get one of X free regardless of quantity or other items that may be on offer. Product by product basis.
Thank you
NJ
but what is X?
so if they buy 4 of product A and 3 of product B, they should get one each of product A and B for free?
They buy 1 of product X, they get 1 product X free (X being one product!).
Thank you
NJ
you will need another cart column to mark the items that should get the discount. for example sakes, lets say the column is named:
buy1Get1
for items the discount applies to set the column value to 1 in the add to cart, and 0 for items the discount does not apply to
then a calcualtion to calculate the discount amount using an abs() condition:
buy1Get1Discount
abs([buy1Get1] == '1' && [Quantity] >= '2')?[Price]:0
Then create a discount to apply the discount:
triggers:
Subtotal for any column:
subtotal of column 'buy1Get1Discount' > 0
calculation:
subtotal of column 'buy1Get1Discount' plus 0
Rather than a column specific to buy1Get1, is it possible to create a column that stores an identifier (int) for a range of different offers and then have the discount rule only apply if a product is set to it's corresponding identifier?
So we'd have an 'offers' table in our database:
offerID offertitle offergraphic
1 Buy One Get One Free bogof.jpg
2 10% Discount 10percentoff.jpg
etc
...and then apply the discount calculation if, in the calculation, the correct condition is met?
Considering our 'offers' table above, would I simply change the calculation to?:
abs([offerID] == '1' && [Quantity] >= '2')?[Price]:0
What is this part doing?:
?[Price]:0
I'd appreciate some clarification on the calculation and also what we'd need to do to change that calculation to offer a % discount.
Thank you
NJ
Yes, you could do that , you would need to add the offerID column to the cart object and in the add to cart button set it to store the offer ID for the specific product
the calculation:
abs([offerID] == '1' && [Quantity] >= '2')?[Price]:0
would set the discount to be the value of [Price] if the offerID is 1 and the quantity is >= 2
the calculation is ternary expression, basically it is a shorthand if statement in the form of:
(Question)?true:false
so lets take an item with the following settings:
Price: 10
offerID:1
quantity: 1
the calculation
abs([offerID] == '1' && [Quantity] >= '2')?[Price]:0
would return 0 because the Quantity is not equal to or greater than 2. the question returns false and 0 is the false part of the calculation.
now set the product as:
Price: 10
offerID:1
quantity: 2
the calculation:
abs([offerID] == '1' && [Quantity] >= '2')?[Price]:0
the question is now true, so returns 10, that is the value of [Price], which is the true part of the calculation
increase quantity to 3 or above, it still returns 10
to create a calculation to apply a 10% discount, the calculation would be:
abs([offerID] == '2')?([Price] * 0.1):0
on this calculation, the product settings:
Price: 10
offerID:2
quantity: 2
would return 1 (10 * 0.1 = 1)
you could add a quantity check in there if you like:
abs([offerID] == '2' && [Quantity] >= '2')?([Price] * 0.1):0
so it only applies if the quantity is greater than or equal 2
or you could add the quantity into the calculation so that an item with quantity 3 would return 3 instead of 1:
abs([offerID] == '2' && [Quantity] >= '2')?(([Price] * [Quantity]) * 0.1):0
(10 * 3 = 30) * 0.1 = 3
For a true Buy One Get One Free this calculation should work:
abs([offerID] == '1' && [Quantity] >= '2')?([Price] * floor([Quantity] / 2)):0
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.