You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jacopo Cappellato <ti...@sastau.it> on 2007/03/01 15:08:23 UTC

Help to set up a promotion

Hi all,

I'm having hard time to set up the following promotion:

"If product A and product B are to the cart, then apply a 20% discount 
to product A and a 20% discount to product B"

Example:
product A: unit price $100
product B: unit price $200

if they are both added to the cart:
product A: unit price $100, adjustment $20, line amount = $80
product B: unit price $200, adjustment $40, line amount = $160


I tried to implement it with one promo with two conditions:

cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=A
cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=B

and one action:

action: "X Product For Y% Discount", quantity=1, amount=20 for "Action 
Product"=A,B

The problem is that:

a) the above promotion is never applied
b) if I use one condition (instead of the two above) the 20% discount is 
applied to one of the product only and the amount is then splitted and 
assigned to the two items in the cart!!!

Here is an example of it:
https://demo.hotwaxmedia.com/catalog/control/EditProductPromo?productPromoId=10000

You can test it by creating an order and adding product "A" and "B" to 
the cart.

I've also tried to setup two different actions or to setup two different 
promotions with the same rules but one action each (one for A, and one 
for B), but without success.

Any hints?

Thanks,

Jacopo


Re: Help to set up a promotion

Posted by Jacopo Cappellato <ti...@sastau.it>.
David,

I've created a new action based on the existing one; of course I have 
considered to contribute it back but, right now, it is very hacky and 
not sure it is a good fit for the project.
By the way, I've attached it in this email.

Thanks again,

Jacopo


David E. Jones wrote:
> 
> Great, glad it worked out. So did you end up creating a new action, or 
> changing the way the candidate counting works?
> 
> I guess I'm mostly wondering if there is an enhancement that could go in 
> to make this easier for others in the future.
> 
> -David
> 
> 
> On Mar 7, 2007, at 2:07 AM, Jacopo Cappellato wrote:
> 
>> David,
>>
>> this message is just to let you know that your hints about how to 
>> implement a new action to handle this kind of promo turned out to be 
>> of great help.
>>
>> Thanks,
>>
>> Jacopo
>>
>>
>> David E. Jones wrote:
>>> The general idea with these sorts of promotions is that each quantity 
>>> of each item can be used either as a qualifier or a benefactor of the 
>>> promotion. My guess is that addPromoQuantityCandidateUse is returning 
>>> 0 because the two items are already use up as qualifiers, and 
>>> therefore can't be benefactors.
>>> So, this is a case where you would have to write a special promo 
>>> action to handle the scenario so that the items are both qualifiers 
>>> and benefactors. There are some others that are like that.
>>> -David
>>> On Mar 1, 2007, at 11:42 AM, Jacopo Cappellato wrote:
>>>> David,
>>>>
>>>> thanks for your answer, please see my comments inline:
>>>>
>>>> David E. Jones wrote:
>>>>> So, what you want is a promotion for buy A and B get 20% off both.
>>>>> I don't think we have a promotion implemented like that. You can 
>>>>> see in the actions what your options are, like buy X of certain 
>>>>> products get 50% (or 100%) off of one of them, or the Gift With 
>>>>> Purchase where it adds a product with a certain discount to the 
>>>>> cart, etc.
>>>>> What happens with the rule you setup? I guess it may do nothing, 
>>>>> I'm not sure if it is designed to handle that, but you can always 
>>>>> walk through the code and see what it is/isn't doing (ie see if the 
>>>>> conditions evaluate to true, and see what the action tries to do).
>>>>
>>>> Yes, your guess is right, it doesn't do anything.
>>>> The two conditions are both true, but the actions is not run because 
>>>> the ShoppingCartItem.addPromoQuantityCandidateUse(...) returns a 0.0 
>>>> value
>>>>
>>>> I still cannot figure out why...
>>>>
>>>> Jacopo
>>>>
>>>>
>>>>> -David
>>>>> On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I'm having hard time to set up the following promotion:
>>>>>>
>>>>>> "If product A and product B are to the cart, then apply a 20% 
>>>>>> discount to product A and a 20% discount to product B"
>>>>>>
>>>>>> Example:
>>>>>> product A: unit price $100
>>>>>> product B: unit price $200
>>>>>>
>>>>>> if they are both added to the cart:
>>>>>> product A: unit price $100, adjustment $20, line amount = $80
>>>>>> product B: unit price $200, adjustment $40, line amount = $160
>>>>>>
>>>>>>
>>>>>> I tried to implement it with one promo with two conditions:
>>>>>>
>>>>>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule 
>>>>>> Product"=A
>>>>>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule 
>>>>>> Product"=B
>>>>>>
>>>>>> and one action:
>>>>>>
>>>>>> action: "X Product For Y% Discount", quantity=1, amount=20 for 
>>>>>> "Action Product"=A,B
>>>>>>
>>>>>> The problem is that:
>>>>>>
>>>>>> a) the above promotion is never applied
>>>>>> b) if I use one condition (instead of the two above) the 20% 
>>>>>> discount is applied to one of the product only and the amount is 
>>>>>> then splitted and assigned to the two items in the cart!!!
>>>>>>
>>>>>> Here is an example of it:
>>>>>> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo?productPromoId=10000 
>>>>>>
>>>>>>
>>>>>> You can test it by creating an order and adding product "A" and 
>>>>>> "B" to the cart.
>>>>>>
>>>>>> I've also tried to setup two different actions or to setup two 
>>>>>> different promotions with the same rules but one action each (one 
>>>>>> for A, and one for B), but without success.
>>>>>>
>>>>>> Any hints?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>
>>>>
>>
>>
> 


Re: Help to set up a promotion

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
Great, glad it worked out. So did you end up creating a new action,  
or changing the way the candidate counting works?

I guess I'm mostly wondering if there is an enhancement that could go  
in to make this easier for others in the future.

-David


On Mar 7, 2007, at 2:07 AM, Jacopo Cappellato wrote:

> David,
>
> this message is just to let you know that your hints about how to  
> implement a new action to handle this kind of promo turned out to  
> be of great help.
>
> Thanks,
>
> Jacopo
>
>
> David E. Jones wrote:
>> The general idea with these sorts of promotions is that each  
>> quantity of each item can be used either as a qualifier or a  
>> benefactor of the promotion. My guess is that  
>> addPromoQuantityCandidateUse is returning 0 because the two items  
>> are already use up as qualifiers, and therefore can't be benefactors.
>> So, this is a case where you would have to write a special promo  
>> action to handle the scenario so that the items are both  
>> qualifiers and benefactors. There are some others that are like that.
>> -David
>> On Mar 1, 2007, at 11:42 AM, Jacopo Cappellato wrote:
>>> David,
>>>
>>> thanks for your answer, please see my comments inline:
>>>
>>> David E. Jones wrote:
>>>> So, what you want is a promotion for buy A and B get 20% off both.
>>>> I don't think we have a promotion implemented like that. You can  
>>>> see in the actions what your options are, like buy X of certain  
>>>> products get 50% (or 100%) off of one of them, or the Gift With  
>>>> Purchase where it adds a product with a certain discount to the  
>>>> cart, etc.
>>>> What happens with the rule you setup? I guess it may do nothing,  
>>>> I'm not sure if it is designed to handle that, but you can  
>>>> always walk through the code and see what it is/isn't doing (ie  
>>>> see if the conditions evaluate to true, and see what the action  
>>>> tries to do).
>>>
>>> Yes, your guess is right, it doesn't do anything.
>>> The two conditions are both true, but the actions is not run  
>>> because the ShoppingCartItem.addPromoQuantityCandidateUse(...)  
>>> returns a 0.0 value
>>>
>>> I still cannot figure out why...
>>>
>>> Jacopo
>>>
>>>
>>>> -David
>>>> On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:
>>>>> Hi all,
>>>>>
>>>>> I'm having hard time to set up the following promotion:
>>>>>
>>>>> "If product A and product B are to the cart, then apply a 20%  
>>>>> discount to product A and a 20% discount to product B"
>>>>>
>>>>> Example:
>>>>> product A: unit price $100
>>>>> product B: unit price $200
>>>>>
>>>>> if they are both added to the cart:
>>>>> product A: unit price $100, adjustment $20, line amount = $80
>>>>> product B: unit price $200, adjustment $40, line amount = $160
>>>>>
>>>>>
>>>>> I tried to implement it with one promo with two conditions:
>>>>>
>>>>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule  
>>>>> Product"=A
>>>>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule  
>>>>> Product"=B
>>>>>
>>>>> and one action:
>>>>>
>>>>> action: "X Product For Y% Discount", quantity=1, amount=20 for  
>>>>> "Action Product"=A,B
>>>>>
>>>>> The problem is that:
>>>>>
>>>>> a) the above promotion is never applied
>>>>> b) if I use one condition (instead of the two above) the 20%  
>>>>> discount is applied to one of the product only and the amount  
>>>>> is then splitted and assigned to the two items in the cart!!!
>>>>>
>>>>> Here is an example of it:
>>>>> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo? 
>>>>> productPromoId=10000
>>>>>
>>>>> You can test it by creating an order and adding product "A" and  
>>>>> "B" to the cart.
>>>>>
>>>>> I've also tried to setup two different actions or to setup two  
>>>>> different promotions with the same rules but one action each  
>>>>> (one for A, and one for B), but without success.
>>>>>
>>>>> Any hints?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jacopo
>>>>>
>>>
>>>
>
>


Re: Help to set up a promotion

Posted by Jacopo Cappellato <ti...@sastau.it>.
David,

this message is just to let you know that your hints about how to 
implement a new action to handle this kind of promo turned out to be of 
great help.

Thanks,

Jacopo


David E. Jones wrote:
> 
> The general idea with these sorts of promotions is that each quantity of 
> each item can be used either as a qualifier or a benefactor of the 
> promotion. My guess is that addPromoQuantityCandidateUse is returning 0 
> because the two items are already use up as qualifiers, and therefore 
> can't be benefactors.
> 
> So, this is a case where you would have to write a special promo action 
> to handle the scenario so that the items are both qualifiers and 
> benefactors. There are some others that are like that.
> 
> -David
> 
> 
> On Mar 1, 2007, at 11:42 AM, Jacopo Cappellato wrote:
> 
>> David,
>>
>> thanks for your answer, please see my comments inline:
>>
>> David E. Jones wrote:
>>> So, what you want is a promotion for buy A and B get 20% off both.
>>> I don't think we have a promotion implemented like that. You can see 
>>> in the actions what your options are, like buy X of certain products 
>>> get 50% (or 100%) off of one of them, or the Gift With Purchase where 
>>> it adds a product with a certain discount to the cart, etc.
>>> What happens with the rule you setup? I guess it may do nothing, I'm 
>>> not sure if it is designed to handle that, but you can always walk 
>>> through the code and see what it is/isn't doing (ie see if the 
>>> conditions evaluate to true, and see what the action tries to do).
>>
>> Yes, your guess is right, it doesn't do anything.
>> The two conditions are both true, but the actions is not run because 
>> the ShoppingCartItem.addPromoQuantityCandidateUse(...) returns a 0.0 
>> value
>>
>> I still cannot figure out why...
>>
>> Jacopo
>>
>>
>>> -David
>>> On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:
>>>> Hi all,
>>>>
>>>> I'm having hard time to set up the following promotion:
>>>>
>>>> "If product A and product B are to the cart, then apply a 20% 
>>>> discount to product A and a 20% discount to product B"
>>>>
>>>> Example:
>>>> product A: unit price $100
>>>> product B: unit price $200
>>>>
>>>> if they are both added to the cart:
>>>> product A: unit price $100, adjustment $20, line amount = $80
>>>> product B: unit price $200, adjustment $40, line amount = $160
>>>>
>>>>
>>>> I tried to implement it with one promo with two conditions:
>>>>
>>>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=A
>>>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=B
>>>>
>>>> and one action:
>>>>
>>>> action: "X Product For Y% Discount", quantity=1, amount=20 for 
>>>> "Action Product"=A,B
>>>>
>>>> The problem is that:
>>>>
>>>> a) the above promotion is never applied
>>>> b) if I use one condition (instead of the two above) the 20% 
>>>> discount is applied to one of the product only and the amount is 
>>>> then splitted and assigned to the two items in the cart!!!
>>>>
>>>> Here is an example of it:
>>>> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo?productPromoId=10000 
>>>>
>>>>
>>>> You can test it by creating an order and adding product "A" and "B" 
>>>> to the cart.
>>>>
>>>> I've also tried to setup two different actions or to setup two 
>>>> different promotions with the same rules but one action each (one 
>>>> for A, and one for B), but without success.
>>>>
>>>> Any hints?
>>>>
>>>> Thanks,
>>>>
>>>> Jacopo
>>>>
>>
>>
> 



Re: Help to set up a promotion

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
The general idea with these sorts of promotions is that each quantity  
of each item can be used either as a qualifier or a benefactor of the  
promotion. My guess is that addPromoQuantityCandidateUse is returning  
0 because the two items are already use up as qualifiers, and  
therefore can't be benefactors.

So, this is a case where you would have to write a special promo  
action to handle the scenario so that the items are both qualifiers  
and benefactors. There are some others that are like that.

-David


On Mar 1, 2007, at 11:42 AM, Jacopo Cappellato wrote:

> David,
>
> thanks for your answer, please see my comments inline:
>
> David E. Jones wrote:
>> So, what you want is a promotion for buy A and B get 20% off both.
>> I don't think we have a promotion implemented like that. You can  
>> see in the actions what your options are, like buy X of certain  
>> products get 50% (or 100%) off of one of them, or the Gift With  
>> Purchase where it adds a product with a certain discount to the  
>> cart, etc.
>> What happens with the rule you setup? I guess it may do nothing,  
>> I'm not sure if it is designed to handle that, but you can always  
>> walk through the code and see what it is/isn't doing (ie see if  
>> the conditions evaluate to true, and see what the action tries to  
>> do).
>
> Yes, your guess is right, it doesn't do anything.
> The two conditions are both true, but the actions is not run  
> because the ShoppingCartItem.addPromoQuantityCandidateUse(...)  
> returns a 0.0 value
>
> I still cannot figure out why...
>
> Jacopo
>
>
>> -David
>> On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:
>>> Hi all,
>>>
>>> I'm having hard time to set up the following promotion:
>>>
>>> "If product A and product B are to the cart, then apply a 20%  
>>> discount to product A and a 20% discount to product B"
>>>
>>> Example:
>>> product A: unit price $100
>>> product B: unit price $200
>>>
>>> if they are both added to the cart:
>>> product A: unit price $100, adjustment $20, line amount = $80
>>> product B: unit price $200, adjustment $40, line amount = $160
>>>
>>>
>>> I tried to implement it with one promo with two conditions:
>>>
>>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule  
>>> Product"=A
>>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule  
>>> Product"=B
>>>
>>> and one action:
>>>
>>> action: "X Product For Y% Discount", quantity=1, amount=20 for  
>>> "Action Product"=A,B
>>>
>>> The problem is that:
>>>
>>> a) the above promotion is never applied
>>> b) if I use one condition (instead of the two above) the 20%  
>>> discount is applied to one of the product only and the amount is  
>>> then splitted and assigned to the two items in the cart!!!
>>>
>>> Here is an example of it:
>>> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo? 
>>> productPromoId=10000
>>>
>>> You can test it by creating an order and adding product "A" and  
>>> "B" to the cart.
>>>
>>> I've also tried to setup two different actions or to setup two  
>>> different promotions with the same rules but one action each (one  
>>> for A, and one for B), but without success.
>>>
>>> Any hints?
>>>
>>> Thanks,
>>>
>>> Jacopo
>>>
>
>


Re: Help to set up a promotion

Posted by Jacopo Cappellato <ti...@sastau.it>.
David,

thanks for your answer, please see my comments inline:

David E. Jones wrote:
> 
> So, what you want is a promotion for buy A and B get 20% off both.
> 
> I don't think we have a promotion implemented like that. You can see in 
> the actions what your options are, like buy X of certain products get 
> 50% (or 100%) off of one of them, or the Gift With Purchase where it 
> adds a product with a certain discount to the cart, etc.
> 
> What happens with the rule you setup? I guess it may do nothing, I'm not 
> sure if it is designed to handle that, but you can always walk through 
> the code and see what it is/isn't doing (ie see if the conditions 
> evaluate to true, and see what the action tries to do).

Yes, your guess is right, it doesn't do anything.
The two conditions are both true, but the actions is not run because the 
ShoppingCartItem.addPromoQuantityCandidateUse(...) returns a 0.0 value

I still cannot figure out why...

Jacopo


> 
> -David
> 
> 
> On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:
> 
>> Hi all,
>>
>> I'm having hard time to set up the following promotion:
>>
>> "If product A and product B are to the cart, then apply a 20% discount 
>> to product A and a 20% discount to product B"
>>
>> Example:
>> product A: unit price $100
>> product B: unit price $200
>>
>> if they are both added to the cart:
>> product A: unit price $100, adjustment $20, line amount = $80
>> product B: unit price $200, adjustment $40, line amount = $160
>>
>>
>> I tried to implement it with one promo with two conditions:
>>
>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=A
>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=B
>>
>> and one action:
>>
>> action: "X Product For Y% Discount", quantity=1, amount=20 for "Action 
>> Product"=A,B
>>
>> The problem is that:
>>
>> a) the above promotion is never applied
>> b) if I use one condition (instead of the two above) the 20% discount 
>> is applied to one of the product only and the amount is then splitted 
>> and assigned to the two items in the cart!!!
>>
>> Here is an example of it:
>> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo?productPromoId=10000 
>>
>>
>> You can test it by creating an order and adding product "A" and "B" to 
>> the cart.
>>
>> I've also tried to setup two different actions or to setup two 
>> different promotions with the same rules but one action each (one for 
>> A, and one for B), but without success.
>>
>> Any hints?
>>
>> Thanks,
>>
>> Jacopo
>>
> 



Re: Help to set up a promotion

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
So, what you want is a promotion for buy A and B get 20% off both.

I don't think we have a promotion implemented like that. You can see  
in the actions what your options are, like buy X of certain products  
get 50% (or 100%) off of one of them, or the Gift With Purchase where  
it adds a product with a certain discount to the cart, etc.

What happens with the rule you setup? I guess it may do nothing, I'm  
not sure if it is designed to handle that, but you can always walk  
through the code and see what it is/isn't doing (ie see if the  
conditions evaluate to true, and see what the action tries to do).

-David


On Mar 1, 2007, at 7:08 AM, Jacopo Cappellato wrote:

> Hi all,
>
> I'm having hard time to set up the following promotion:
>
> "If product A and product B are to the cart, then apply a 20%  
> discount to product A and a 20% discount to product B"
>
> Example:
> product A: unit price $100
> product B: unit price $200
>
> if they are both added to the cart:
> product A: unit price $100, adjustment $20, line amount = $80
> product B: unit price $200, adjustment $40, line amount = $160
>
>
> I tried to implement it with one promo with two conditions:
>
> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=A
> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=B
>
> and one action:
>
> action: "X Product For Y% Discount", quantity=1, amount=20 for  
> "Action Product"=A,B
>
> The problem is that:
>
> a) the above promotion is never applied
> b) if I use one condition (instead of the two above) the 20%  
> discount is applied to one of the product only and the amount is  
> then splitted and assigned to the two items in the cart!!!
>
> Here is an example of it:
> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo? 
> productPromoId=10000
>
> You can test it by creating an order and adding product "A" and "B"  
> to the cart.
>
> I've also tried to setup two different actions or to setup two  
> different promotions with the same rules but one action each (one  
> for A, and one for B), but without success.
>
> Any hints?
>
> Thanks,
>
> Jacopo
>


Re: Help to set up a promotion

Posted by "David E. Jones" <jo...@hotwaxmedia.com>.
If such a rule concerns more than a single product, you can't use  
price rules.

Just remember: price rules happen pre-cart, promotions happen in-cart  
(using all items in the cart, and are totally recalculated when the  
cart changes).

-David


On Mar 1, 2007, at 10:04 AM, Jacques Le Roux wrote:

> Jacopo,
>
> Quick answer : perhaps as it concerns products and not order you  
> should
> better use prices rules ?
>
> Jacques
>
> ----- Original Message -----
> From: "Jacopo Cappellato" <ti...@sastau.it>
> To: <us...@ofbiz.apache.org>
> Sent: Thursday, March 01, 2007 3:08 PM
> Subject: Help to set up a promotion
>
>
>> Hi all,
>>
>> I'm having hard time to set up the following promotion:
>>
>> "If product A and product B are to the cart, then apply a 20%  
>> discount
>> to product A and a 20% discount to product B"
>>
>> Example:
>> product A: unit price $100
>> product B: unit price $200
>>
>> if they are both added to the cart:
>> product A: unit price $100, adjustment $20, line amount = $80
>> product B: unit price $200, adjustment $40, line amount = $160
>>
>>
>> I tried to implement it with one promo with two conditions:
>>
>> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule  
>> Product"=A
>> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule  
>> Product"=B
>>
>> and one action:
>>
>> action: "X Product For Y% Discount", quantity=1, amount=20 for  
>> "Action
>> Product"=A,B
>>
>> The problem is that:
>>
>> a) the above promotion is never applied
>> b) if I use one condition (instead of the two above) the 20% discount
> is
>> applied to one of the product only and the amount is then splitted  
>> and
>> assigned to the two items in the cart!!!
>>
>> Here is an example of it:
>>
> https://demo.hotwaxmedia.com/catalog/control/EditProductPromo? 
> productPromoId=10000
>>
>> You can test it by creating an order and adding product "A" and  
>> "B" to
>> the cart.
>>
>> I've also tried to setup two different actions or to setup two
> different
>> promotions with the same rules but one action each (one for A, and  
>> one
>> for B), but without success.
>>
>> Any hints?
>>
>> Thanks,
>>
>> Jacopo
>


Re: Help to set up a promotion

Posted by Jacques Le Roux <ja...@les7arts.com>.
Jacopo,

Quick answer : perhaps as it concerns products and not order you should
better use prices rules ?

Jacques

----- Original Message ----- 
From: "Jacopo Cappellato" <ti...@sastau.it>
To: <us...@ofbiz.apache.org>
Sent: Thursday, March 01, 2007 3:08 PM
Subject: Help to set up a promotion


> Hi all,
>
> I'm having hard time to set up the following promotion:
>
> "If product A and product B are to the cart, then apply a 20% discount
> to product A and a 20% discount to product B"
>
> Example:
> product A: unit price $100
> product B: unit price $200
>
> if they are both added to the cart:
> product A: unit price $100, adjustment $20, line amount = $80
> product B: unit price $200, adjustment $40, line amount = $160
>
>
> I tried to implement it with one promo with two conditions:
>
> cond 1: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=A
> cond 2: "X Quantity of Product", "Is", quantity=1 for "Rule Product"=B
>
> and one action:
>
> action: "X Product For Y% Discount", quantity=1, amount=20 for "Action
> Product"=A,B
>
> The problem is that:
>
> a) the above promotion is never applied
> b) if I use one condition (instead of the two above) the 20% discount
is
> applied to one of the product only and the amount is then splitted and
> assigned to the two items in the cart!!!
>
> Here is an example of it:
>
https://demo.hotwaxmedia.com/catalog/control/EditProductPromo?productPromoId=10000
>
> You can test it by creating an order and adding product "A" and "B" to
> the cart.
>
> I've also tried to setup two different actions or to setup two
different
> promotions with the same rules but one action each (one for A, and one
> for B), but without success.
>
> Any hints?
>
> Thanks,
>
> Jacopo