You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Raj Saini <ra...@gmail.com> on 2007/12/13 11:54:57 UTC

Promotion rule for quantity discount

Hi,

I am having difficulty in setting up promotion. Promotion I want to set 
up is:

If the X product in shopping has Qty >= Y, apply 10% discount to the item.

I tried:

Action X Product for Y% discount  - Can get the discounted price but 
this promotion applies to every item i.e. it does not consider the 
minimum quantity limit.

Condition X quantity of Product - If I add this condition to the above 
action, it does apply the minimum quantity condition but applies 
discount to the item above X.

I searched through the Google and found this 
http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html. It make 
me sure that it is possible and I am missing something.

Thanks,

Raj


Re: Promotion rule for quantity discount

Posted by Scott Gray <le...@gmail.com>.
Hi Vince

If you can find a way to replicate the problem with the demo data it'll make
it easier to get it fixed.

Regards
Scott

On 17/12/2007, Vince M. Clark <vc...@globalera.com> wrote:
>
> Not sure if this is a related issue, but we have had really strange
> behavior using qty discounts and X Product for Y Price. We are using
> multiple qty discounts so we have about 14 rules in a promo, for qty's 2-15.
>
> When we enter the rules we must enter them starting with the highest qty
> first (15). If we start with the lowest (2) the promo doesn't work.
>
> This suggests that the order the records are stored in the database
> matters. We have done this many many times to be absolutely certain what was
> happening. We can reproduce the problem consistently. We are using a version
> of trunk from a couple of weeks ago.
>
> I'm going to look thru the code to see how it orders and applies promo
> rules before filing this as a bug. Any thoughts or suggestions are
> appreciated.
>
> ----- Original Message -----
> From: "Scott Gray" <le...@gmail.com>
> To: user@ofbiz.apache.org
> Sent: Saturday, December 15, 2007 9:18:15 PM (GMT-0700) America/Chihuahua
> Subject: Re: Promotion rule for quantity discount
>
> Fixed in rev. 604551
>
> Regards
> Scott
>
> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
> >
> > Hi Raj
> >
> > It looks like a bug to me, X Product for Y Price works but X Product for
> > Y% Discount doesn't respect the quantity as you said.
> >
> > I'll have a look at the code.
> >
> > Regards
> > Scott
> >
> > On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
> > >
> > > Sorry to repeat it again. Does someone have any clue to this? I am
> sure
> > > this is possible, I am missing something trivial.
> > >
> > > Thanks,
> > >
> > > Raj
> > >
> > > Raj Saini wrote:
> > > > Hi,
> > > >
> > > > I am having difficulty in setting up promotion. Promotion I want to
> > > > set up is:
> > > >
> > > > If the X product in shopping has Qty >= Y, apply 10% discount to the
> > > > item.
> > > >
> > > > I tried:
> > > >
> > > > Action X Product for Y% discount - Can get the discounted price but
> > > > this promotion applies to every item i.e. it does not consider the
> > > > minimum quantity limit.
> > > >
> > > > Condition X quantity of Product - If I add this condition to the
> above
> > > > action, it does apply the minimum quantity condition but applies
> > > > discount to the item above X.
> > > >
> > > > I searched through the Google and found this
> > > > http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
> > > make
> > > > me sure that it is possible and I am missing something.
> > > >
> > > > Thanks,
> > > >
> > > > Raj
> > > >
> > > >
> > >
> > >
> >
>

Re: Promotion rule for quantity discount

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Dec 17, 2007, at 9:12 AM, Vince M. Clark wrote:

> Raj
>
> You may be running into the same issue we are with quantities. Try  
> this.
>
> Delete all your rules and actions and add them back into the  
> promotion starting with the highest quantity first. I know it sounds  
> crazy, but we are pretty sure we have uncovered a bug related to qty  
> discounts and the only thing that seems to get around it is by  
> putting the actions and rules in from highest to lowest qty. It  
> seems as though the order the records are stored in the database  
> matters.

That's a funny symptom... This would certainly happen if your quantity  
bases rules did not all have a low and high number, with no overlaps  
between them (done using something like <= on one side and > on the  
other side).

-David



Re: Promotion rule for quantity discount

Posted by Raj Saini <ra...@gmail.com>.
Thanks Jacques. I already have an account and Jira issue is created.

https://issues.apache.org/jira/browse/OFBIZ-1560

Thanks,

Raj

Jacques Le Roux wrote:
> Thanks Raj,
>
> Could you please open a Jira issue for that ? You only have to create 
> an account https://issues.apache.org/jira/browse/OFBIZ
>
> Jacques
>
> From: "Raj Saini" <ra...@gmail.com>
>> Jacques,
>>
>> I tested on revision 605076 and it did not work as expected. Scot 
>> Gray fixed something but it is still not working.
>>
>> Thanks,
>>
>> Raj
>>
>> Jacques Le Roux wrote:
>>> I'm not sure as I have been in vacation thes last times, but it 
>>> seems to me that a change has addressed this problem recently, can 
>>> anybody confirms please ?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "Raj Saini" <ra...@gmail.com>
>>>> Vince,
>>>>
>>>> In my case it is just one rule. What I want to achieve is apply a 
>>>> X% discount if the quantities are more than or equal to Y. That 
>>>> means if the quantities exceeds Y, all the quantities should be 
>>>> discounted by 10%. It works correctly if the value of quantities is 
>>>> exact as Y or any multiple of Y. For example if Y is 10, it would 
>>>> work correctly for 10, 20, 30....
>>>> Any quantities above the multiple of Y are not applied discount.
>>>>
>>>> Do you have above scenario working even for a single rule? I shall 
>>>> be thankful if you can provide some insight.
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>> Vince M. Clark wrote:
>>>>> Raj
>>>>> You may be running into the same issue we are with quantities. Try 
>>>>> this.
>>>>> Delete all your rules and actions and add them back into the 
>>>>> promotion starting with the highest quantity first. I know it 
>>>>> sounds crazy, but we are pretty sure we have uncovered a bug 
>>>>> related to qty discounts and the only thing that seems to get 
>>>>> around it is by putting the actions and rules in from highest to 
>>>>> lowest qty. It seems as though the order the records are stored in 
>>>>> the database matters.
>>>>> ----- Original Message ----- From: "Raj Saini" 
>>>>> <ra...@gmail.com> To: user@ofbiz.apache.org Sent: Monday, 
>>>>> December 17, 2007 9:36:12 AM (GMT-0700) America/Denver Subject: 
>>>>> Re: Promotion rule for quantity discount
>>>>> Hi Scott,
>>>>> Thanks for fixing it quickly. However, I am half way of what I am 
>>>>> trying to achieve.
>>>>> Action - X Product for Y% discount works for if the quantity is 10 
>>>>> or multiple of 10. For example if I add 12, the promotion is 
>>>>> applied to only 10 and rest 2 are not included. Is it desired 
>>>>> behavior? If yes, I am surely missing something more.
>>>>> I have created a test promo at demo.hotwaxmedia.com. Would be 
>>>>> great if you can have a look on that.
>>>>> Thanks again for your kind help.
>>>>> Raj
>>>>> Action X Product for Y% discount
>>>>>
>>>>> Scott Gray wrote:
>>>>>> Fixed in rev. 604551
>>>>>> Regards Scott
>>>>>> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi Raj
>>>>>>> It looks like a bug to me, X Product for Y Price works but X 
>>>>>>> Product for Y% Discount doesn't respect the quantity as you said.
>>>>>>> I'll have a look at the code.
>>>>>>> Regards Scott
>>>>>>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Sorry to repeat it again. Does someone have any clue to this? I 
>>>>>>>> am sure this is possible, I am missing something trivial.
>>>>>>>> Thanks,
>>>>>>>> Raj
>>>>>>>> Raj Saini wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>> I am having difficulty in setting up promotion. Promotion I 
>>>>>>>>> want to set up is:
>>>>>>>>> If the X product in shopping has Qty >= Y, apply 10% discount 
>>>>>>>>> to the item.
>>>>>>>>> I tried:
>>>>>>>>> Action X Product for Y% discount - Can get the discounted 
>>>>>>>>> price but this promotion applies to every item i.e. it does 
>>>>>>>>> not consider the minimum quantity limit.
>>>>>>>>> Condition X quantity of Product - If I add this condition to 
>>>>>>>>> the above action, it does apply the minimum quantity condition 
>>>>>>>>> but applies discount to the item above X.
>>>>>>>>> I searched through the Google and found this 
>>>>>>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html 
>>>>>>>>> . It
>>>>>>>>>
>>>>>>>> make
>>>>>>>>
>>>>>>>>> me sure that it is possible and I am missing something.
>>>>>>>>> Thanks,
>>>>>>>>> Raj
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>


Re: Promotion rule for quantity discount

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

Could you please open a Jira issue for that ? You only have to create an account https://issues.apache.org/jira/browse/OFBIZ

Jacques

From: "Raj Saini" <ra...@gmail.com>
> Jacques,
> 
> I tested on revision 605076 and it did not work as expected. Scot Gray 
> fixed something but it is still not working.
> 
> Thanks,
> 
> Raj
> 
> Jacques Le Roux wrote:
>> I'm not sure as I have been in vacation thes last times, but it seems 
>> to me that a change has addressed this problem recently, can anybody 
>> confirms please ?
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Raj Saini" <ra...@gmail.com>
>>> Vince,
>>>
>>> In my case it is just one rule. What I want to achieve is apply a X% 
>>> discount if the quantities are more than or equal to Y. That means if 
>>> the quantities exceeds Y, all the quantities should be discounted by 
>>> 10%. It works correctly if the value of quantities is exact as Y or 
>>> any multiple of Y. For example if Y is 10, it would work correctly 
>>> for 10, 20, 30....
>>> Any quantities above the multiple of Y are not applied discount.
>>>
>>> Do you have above scenario working even for a single rule? I shall be 
>>> thankful if you can provide some insight.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Vince M. Clark wrote:
>>>> Raj
>>>> You may be running into the same issue we are with quantities. Try 
>>>> this.
>>>> Delete all your rules and actions and add them back into the 
>>>> promotion starting with the highest quantity first. I know it sounds 
>>>> crazy, but we are pretty sure we have uncovered a bug related to qty 
>>>> discounts and the only thing that seems to get around it is by 
>>>> putting the actions and rules in from highest to lowest qty. It 
>>>> seems as though the order the records are stored in the database 
>>>> matters.
>>>> ----- Original Message ----- From: "Raj Saini" <ra...@gmail.com> 
>>>> To: user@ofbiz.apache.org Sent: Monday, December 17, 2007 9:36:12 AM 
>>>> (GMT-0700) America/Denver Subject: Re: Promotion rule for quantity 
>>>> discount
>>>> Hi Scott,
>>>> Thanks for fixing it quickly. However, I am half way of what I am 
>>>> trying to achieve.
>>>> Action - X Product for Y% discount works for if the quantity is 10 
>>>> or multiple of 10. For example if I add 12, the promotion is applied 
>>>> to only 10 and rest 2 are not included. Is it desired behavior? If 
>>>> yes, I am surely missing something more.
>>>> I have created a test promo at demo.hotwaxmedia.com. Would be great 
>>>> if you can have a look on that.
>>>> Thanks again for your kind help.
>>>> Raj
>>>> Action X Product for Y% discount
>>>>
>>>> Scott Gray wrote:
>>>>> Fixed in rev. 604551
>>>>> Regards Scott
>>>>> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>>>>>
>>>>>> Hi Raj
>>>>>> It looks like a bug to me, X Product for Y Price works but X 
>>>>>> Product for Y% Discount doesn't respect the quantity as you said.
>>>>>> I'll have a look at the code.
>>>>>> Regards Scott
>>>>>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>>>>>>
>>>>>>> Sorry to repeat it again. Does someone have any clue to this? I 
>>>>>>> am sure this is possible, I am missing something trivial.
>>>>>>> Thanks,
>>>>>>> Raj
>>>>>>> Raj Saini wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> I am having difficulty in setting up promotion. Promotion I want 
>>>>>>>> to set up is:
>>>>>>>> If the X product in shopping has Qty >= Y, apply 10% discount to 
>>>>>>>> the item.
>>>>>>>> I tried:
>>>>>>>> Action X Product for Y% discount - Can get the discounted price 
>>>>>>>> but this promotion applies to every item i.e. it does not 
>>>>>>>> consider the minimum quantity limit.
>>>>>>>> Condition X quantity of Product - If I add this condition to the 
>>>>>>>> above action, it does apply the minimum quantity condition but 
>>>>>>>> applies discount to the item above X.
>>>>>>>> I searched through the Google and found this 
>>>>>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
>>>>>>>>
>>>>>>> make
>>>>>>>
>>>>>>>> me sure that it is possible and I am missing something.
>>>>>>>> Thanks,
>>>>>>>> Raj
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
> 
>

Re: Promotion rule for quantity discount

Posted by Raj Saini <ra...@gmail.com>.
Jacques,

I tested on revision 605076 and it did not work as expected. Scot Gray 
fixed something but it is still not working.

Thanks,

Raj

Jacques Le Roux wrote:
> I'm not sure as I have been in vacation thes last times, but it seems 
> to me that a change has addressed this problem recently, can anybody 
> confirms please ?
>
> Thanks
>
> Jacques
>
> From: "Raj Saini" <ra...@gmail.com>
>> Vince,
>>
>> In my case it is just one rule. What I want to achieve is apply a X% 
>> discount if the quantities are more than or equal to Y. That means if 
>> the quantities exceeds Y, all the quantities should be discounted by 
>> 10%. It works correctly if the value of quantities is exact as Y or 
>> any multiple of Y. For example if Y is 10, it would work correctly 
>> for 10, 20, 30....
>> Any quantities above the multiple of Y are not applied discount.
>>
>> Do you have above scenario working even for a single rule? I shall be 
>> thankful if you can provide some insight.
>>
>> Thanks,
>>
>> Raj
>>
>> Vince M. Clark wrote:
>>> Raj
>>> You may be running into the same issue we are with quantities. Try 
>>> this.
>>> Delete all your rules and actions and add them back into the 
>>> promotion starting with the highest quantity first. I know it sounds 
>>> crazy, but we are pretty sure we have uncovered a bug related to qty 
>>> discounts and the only thing that seems to get around it is by 
>>> putting the actions and rules in from highest to lowest qty. It 
>>> seems as though the order the records are stored in the database 
>>> matters.
>>> ----- Original Message ----- From: "Raj Saini" <ra...@gmail.com> 
>>> To: user@ofbiz.apache.org Sent: Monday, December 17, 2007 9:36:12 AM 
>>> (GMT-0700) America/Denver Subject: Re: Promotion rule for quantity 
>>> discount
>>> Hi Scott,
>>> Thanks for fixing it quickly. However, I am half way of what I am 
>>> trying to achieve.
>>> Action - X Product for Y% discount works for if the quantity is 10 
>>> or multiple of 10. For example if I add 12, the promotion is applied 
>>> to only 10 and rest 2 are not included. Is it desired behavior? If 
>>> yes, I am surely missing something more.
>>> I have created a test promo at demo.hotwaxmedia.com. Would be great 
>>> if you can have a look on that.
>>> Thanks again for your kind help.
>>> Raj
>>> Action X Product for Y% discount
>>>
>>> Scott Gray wrote:
>>>> Fixed in rev. 604551
>>>> Regards Scott
>>>> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>>>>
>>>>> Hi Raj
>>>>> It looks like a bug to me, X Product for Y Price works but X 
>>>>> Product for Y% Discount doesn't respect the quantity as you said.
>>>>> I'll have a look at the code.
>>>>> Regards Scott
>>>>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>>>>>
>>>>>> Sorry to repeat it again. Does someone have any clue to this? I 
>>>>>> am sure this is possible, I am missing something trivial.
>>>>>> Thanks,
>>>>>> Raj
>>>>>> Raj Saini wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I am having difficulty in setting up promotion. Promotion I want 
>>>>>>> to set up is:
>>>>>>> If the X product in shopping has Qty >= Y, apply 10% discount to 
>>>>>>> the item.
>>>>>>> I tried:
>>>>>>> Action X Product for Y% discount - Can get the discounted price 
>>>>>>> but this promotion applies to every item i.e. it does not 
>>>>>>> consider the minimum quantity limit.
>>>>>>> Condition X quantity of Product - If I add this condition to the 
>>>>>>> above action, it does apply the minimum quantity condition but 
>>>>>>> applies discount to the item above X.
>>>>>>> I searched through the Google and found this 
>>>>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
>>>>>>>
>>>>>> make
>>>>>>
>>>>>>> me sure that it is possible and I am missing something.
>>>>>>> Thanks,
>>>>>>> Raj
>>>>>>>
>>>>>>>
>>>>>>>
>>>>
>>>
>>>
>>>
>>
>
>


Re: Promotion rule for quantity discount

Posted by Jacques Le Roux <ja...@les7arts.com>.
I'm not sure as I have been in vacation thes last times, but it seems to me that a change has addressed this problem recently, can 
anybody confirms please ?

Thanks

Jacques

From: "Raj Saini" <ra...@gmail.com>
> Vince,
>
> In my case it is just one rule. What I want to achieve is apply a X% discount if the quantities are more than or equal to Y. That 
> means if the quantities exceeds Y, all the quantities should be discounted by 10%. It works correctly if the value of quantities 
> is exact as Y or any multiple of Y. For example if Y is 10, it would work correctly for 10, 20, 30....
> Any quantities above the multiple of Y are not applied discount.
>
> Do you have above scenario working even for a single rule? I shall be thankful if you can provide some insight.
>
> Thanks,
>
> Raj
>
> Vince M. Clark wrote:
>> Raj
>> You may be running into the same issue we are with quantities. Try this.
>> Delete all your rules and actions and add them back into the promotion starting with the highest quantity first. I know it sounds 
>> crazy, but we are pretty sure we have uncovered a bug related to qty discounts and the only thing that seems to get around it is 
>> by putting the actions and rules in from highest to lowest qty. It seems as though the order the records are stored in the 
>> database matters.
>> ----- Original Message ----- 
>> From: "Raj Saini" <ra...@gmail.com> To: user@ofbiz.apache.org Sent: Monday, December 17, 2007 9:36:12 AM (GMT-0700) 
>> America/Denver Subject: Re: Promotion rule for quantity discount
>> Hi Scott,
>> Thanks for fixing it quickly. However, I am half way of what I am trying to achieve.
>> Action - X Product for Y% discount works for if the quantity is 10 or multiple of 10. For example if I add 12, the promotion is 
>> applied to only 10 and rest 2 are not included. Is it desired behavior? If yes, I am surely missing something more.
>> I have created a test promo at demo.hotwaxmedia.com. Would be great if you can have a look on that.
>> Thanks again for your kind help.
>> Raj
>> Action X Product for Y% discount
>>
>> Scott Gray wrote:
>>> Fixed in rev. 604551
>>> Regards Scott
>>> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>>>
>>>> Hi Raj
>>>> It looks like a bug to me, X Product for Y Price works but X Product for Y% Discount doesn't respect the quantity as you said.
>>>> I'll have a look at the code.
>>>> Regards Scott
>>>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>>>>
>>>>> Sorry to repeat it again. Does someone have any clue to this? I am sure this is possible, I am missing something trivial.
>>>>> Thanks,
>>>>> Raj
>>>>> Raj Saini wrote:
>>>>>
>>>>>> Hi,
>>>>>> I am having difficulty in setting up promotion. Promotion I want to set up is:
>>>>>> If the X product in shopping has Qty >= Y, apply 10% discount to the item.
>>>>>> I tried:
>>>>>> Action X Product for Y% discount - Can get the discounted price but this promotion applies to every item i.e. it does not 
>>>>>> consider the minimum quantity limit.
>>>>>> Condition X quantity of Product - If I add this condition to the above action, it does apply the minimum quantity condition 
>>>>>> but applies discount to the item above X.
>>>>>> I searched through the Google and found this http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
>>>>>>
>>>>> make
>>>>>
>>>>>> me sure that it is possible and I am missing something.
>>>>>> Thanks,
>>>>>> Raj
>>>>>>
>>>>>>
>>>>>>
>>>
>>
>>
>>
> 


Re: Promotion rule for quantity discount

Posted by Raj Saini <ra...@gmail.com>.
Vince,

In my case it is just one rule. What I want to achieve is apply a X% 
discount if the quantities are more than or equal to Y. That means if 
the quantities exceeds Y, all the quantities should be discounted by 
10%. It works correctly if the value of quantities is exact as Y or any 
multiple of Y. For example if Y is 10, it would work correctly for 10, 
20, 30....
Any quantities above the multiple of Y are not applied discount.

Do you have above scenario working even for a single rule? I shall be 
thankful if you can provide some insight.

Thanks,

Raj

Vince M. Clark wrote:
> Raj 
>
> You may be running into the same issue we are with quantities. Try this. 
>
> Delete all your rules and actions and add them back into the promotion starting with the highest quantity first. I know it sounds crazy, but we are pretty sure we have uncovered a bug related to qty discounts and the only thing that seems to get around it is by putting the actions and rules in from highest to lowest qty. It seems as though the order the records are stored in the database matters. 
>
> ----- Original Message ----- 
> From: "Raj Saini" <ra...@gmail.com> 
> To: user@ofbiz.apache.org 
> Sent: Monday, December 17, 2007 9:36:12 AM (GMT-0700) America/Denver 
> Subject: Re: Promotion rule for quantity discount 
>
> Hi Scott, 
>
> Thanks for fixing it quickly. However, I am half way of what I am trying 
> to achieve. 
>
> Action - X Product for Y% discount works for if the quantity is 10 or 
> multiple of 10. For example if I add 12, the promotion is applied to 
> only 10 and rest 2 are not included. Is it desired behavior? If yes, I 
> am surely missing something more. 
>
> I have created a test promo at demo.hotwaxmedia.com. Would be great if 
> you can have a look on that. 
>
> Thanks again for your kind help. 
>
> Raj 
>
> Action X Product for Y% discount 
>
>
> Scott Gray wrote: 
>   
>> Fixed in rev. 604551 
>>
>> Regards 
>> Scott 
>>
>> On 16/12/2007, Scott Gray <le...@gmail.com> wrote: 
>>
>>     
>>> Hi Raj 
>>>
>>> It looks like a bug to me, X Product for Y Price works but X Product for 
>>> Y% Discount doesn't respect the quantity as you said. 
>>>
>>> I'll have a look at the code. 
>>>
>>> Regards 
>>> Scott 
>>>
>>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote: 
>>>
>>>       
>>>> Sorry to repeat it again. Does someone have any clue to this? I am sure 
>>>> this is possible, I am missing something trivial. 
>>>>
>>>> Thanks, 
>>>>
>>>> Raj 
>>>>
>>>> Raj Saini wrote: 
>>>>
>>>>         
>>>>> Hi, 
>>>>>
>>>>> I am having difficulty in setting up promotion. Promotion I want to 
>>>>> set up is: 
>>>>>
>>>>> If the X product in shopping has Qty >= Y, apply 10% discount to the 
>>>>> item. 
>>>>>
>>>>> I tried: 
>>>>>
>>>>> Action X Product for Y% discount - Can get the discounted price but 
>>>>> this promotion applies to every item i.e. it does not consider the 
>>>>> minimum quantity limit. 
>>>>>
>>>>> Condition X quantity of Product - If I add this condition to the above 
>>>>> action, it does apply the minimum quantity condition but applies 
>>>>> discount to the item above X. 
>>>>>
>>>>> I searched through the Google and found this 
>>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It 
>>>>>
>>>>>           
>>>> make 
>>>>
>>>>         
>>>>> me sure that it is possible and I am missing something. 
>>>>>
>>>>> Thanks, 
>>>>>
>>>>> Raj 
>>>>>
>>>>>
>>>>>
>>>>>           
>>     
>
>
>   


Re: Promotion rule for quantity discount

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

If you can reproduce this using Demo data, opening a Jira issue would be a good thing

Thanks

Jacques

De : "Vince M. Clark" <vc...@globalera.com>
> Raj
>
> You may be running into the same issue we are with quantities. Try this.
>
> Delete all your rules and actions and add them back into the promotion starting with the highest quantity first. I know it sounds
crazy, but we are pretty sure we have uncovered a bug related to qty discounts and the only thing that seems to get around it is by
putting the actions and rules in from highest to lowest qty. It seems as though the order the records are stored in the database
matters.
>
> ----- Original Message ----- 
> From: "Raj Saini" <ra...@gmail.com>
> To: user@ofbiz.apache.org
> Sent: Monday, December 17, 2007 9:36:12 AM (GMT-0700) America/Denver
> Subject: Re: Promotion rule for quantity discount
>
> Hi Scott,
>
> Thanks for fixing it quickly. However, I am half way of what I am trying
> to achieve.
>
> Action - X Product for Y% discount works for if the quantity is 10 or
> multiple of 10. For example if I add 12, the promotion is applied to
> only 10 and rest 2 are not included. Is it desired behavior? If yes, I
> am surely missing something more.
>
> I have created a test promo at demo.hotwaxmedia.com. Would be great if
> you can have a look on that.
>
> Thanks again for your kind help.
>
> Raj
>
> Action X Product for Y% discount
>
>
> Scott Gray wrote:
> > Fixed in rev. 604551
> >
> > Regards
> > Scott
> >
> > On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
> >
> >> Hi Raj
> >>
> >> It looks like a bug to me, X Product for Y Price works but X Product for
> >> Y% Discount doesn't respect the quantity as you said.
> >>
> >> I'll have a look at the code.
> >>
> >> Regards
> >> Scott
> >>
> >> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
> >>
> >>> Sorry to repeat it again. Does someone have any clue to this? I am sure
> >>> this is possible, I am missing something trivial.
> >>>
> >>> Thanks,
> >>>
> >>> Raj
> >>>
> >>> Raj Saini wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I am having difficulty in setting up promotion. Promotion I want to
> >>>> set up is:
> >>>>
> >>>> If the X product in shopping has Qty >= Y, apply 10% discount to the
> >>>> item.
> >>>>
> >>>> I tried:
> >>>>
> >>>> Action X Product for Y% discount - Can get the discounted price but
> >>>> this promotion applies to every item i.e. it does not consider the
> >>>> minimum quantity limit.
> >>>>
> >>>> Condition X quantity of Product - If I add this condition to the above
> >>>> action, it does apply the minimum quantity condition but applies
> >>>> discount to the item above X.
> >>>>
> >>>> I searched through the Google and found this
> >>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
> >>>>
> >>> make
> >>>
> >>>> me sure that it is possible and I am missing something.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Raj
> >>>>
> >>>>
> >>>>
> >>>
> >
> >
>
>


Re: Promotion rule for quantity discount

Posted by "Vince M. Clark" <vc...@globalera.com>.
Raj 

You may be running into the same issue we are with quantities. Try this. 

Delete all your rules and actions and add them back into the promotion starting with the highest quantity first. I know it sounds crazy, but we are pretty sure we have uncovered a bug related to qty discounts and the only thing that seems to get around it is by putting the actions and rules in from highest to lowest qty. It seems as though the order the records are stored in the database matters. 

----- Original Message ----- 
From: "Raj Saini" <ra...@gmail.com> 
To: user@ofbiz.apache.org 
Sent: Monday, December 17, 2007 9:36:12 AM (GMT-0700) America/Denver 
Subject: Re: Promotion rule for quantity discount 

Hi Scott, 

Thanks for fixing it quickly. However, I am half way of what I am trying 
to achieve. 

Action - X Product for Y% discount works for if the quantity is 10 or 
multiple of 10. For example if I add 12, the promotion is applied to 
only 10 and rest 2 are not included. Is it desired behavior? If yes, I 
am surely missing something more. 

I have created a test promo at demo.hotwaxmedia.com. Would be great if 
you can have a look on that. 

Thanks again for your kind help. 

Raj 

Action X Product for Y% discount 


Scott Gray wrote: 
> Fixed in rev. 604551 
> 
> Regards 
> Scott 
> 
> On 16/12/2007, Scott Gray <le...@gmail.com> wrote: 
> 
>> Hi Raj 
>> 
>> It looks like a bug to me, X Product for Y Price works but X Product for 
>> Y% Discount doesn't respect the quantity as you said. 
>> 
>> I'll have a look at the code. 
>> 
>> Regards 
>> Scott 
>> 
>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote: 
>> 
>>> Sorry to repeat it again. Does someone have any clue to this? I am sure 
>>> this is possible, I am missing something trivial. 
>>> 
>>> Thanks, 
>>> 
>>> Raj 
>>> 
>>> Raj Saini wrote: 
>>> 
>>>> Hi, 
>>>> 
>>>> I am having difficulty in setting up promotion. Promotion I want to 
>>>> set up is: 
>>>> 
>>>> If the X product in shopping has Qty >= Y, apply 10% discount to the 
>>>> item. 
>>>> 
>>>> I tried: 
>>>> 
>>>> Action X Product for Y% discount - Can get the discounted price but 
>>>> this promotion applies to every item i.e. it does not consider the 
>>>> minimum quantity limit. 
>>>> 
>>>> Condition X quantity of Product - If I add this condition to the above 
>>>> action, it does apply the minimum quantity condition but applies 
>>>> discount to the item above X. 
>>>> 
>>>> I searched through the Google and found this 
>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It 
>>>> 
>>> make 
>>> 
>>>> me sure that it is possible and I am missing something. 
>>>> 
>>>> Thanks, 
>>>> 
>>>> Raj 
>>>> 
>>>> 
>>>> 
>>> 
> 
> 


Re: Promotion rule for quantity discount

Posted by Raj Saini <ra...@gmail.com>.
Hi Scott,

Thanks for fixing it quickly. However, I am half way of what I am trying 
to achieve.

Action - X Product for Y% discount works for if the quantity is 10 or 
multiple of 10. For example if I add 12, the promotion is applied to 
only 10 and rest 2 are not included. Is it desired behavior? If yes, I 
am surely missing something more.

I have created a test promo at demo.hotwaxmedia.com. Would be great if 
you can have a look on that.

Thanks again for your kind help.

Raj

Action X Product for Y% discount 


Scott Gray wrote:
> Fixed in rev. 604551
>
> Regards
> Scott
>
> On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>   
>> Hi Raj
>>
>> It looks like a bug to me, X Product for Y Price works but X Product for
>> Y% Discount doesn't respect the quantity as you said.
>>
>> I'll have a look at the code.
>>
>> Regards
>> Scott
>>
>> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>>     
>>> Sorry to repeat it again. Does someone have any clue to this? I am sure
>>> this is possible, I am missing something trivial.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Raj Saini wrote:
>>>       
>>>> Hi,
>>>>
>>>> I am having difficulty in setting up promotion. Promotion I want to
>>>> set up is:
>>>>
>>>> If the X product in shopping has Qty >= Y, apply 10% discount to the
>>>> item.
>>>>
>>>> I tried:
>>>>
>>>> Action X Product for Y% discount  - Can get the discounted price but
>>>> this promotion applies to every item i.e. it does not consider the
>>>> minimum quantity limit.
>>>>
>>>> Condition X quantity of Product - If I add this condition to the above
>>>> action, it does apply the minimum quantity condition but applies
>>>> discount to the item above X.
>>>>
>>>> I searched through the Google and found this
>>>> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
>>>>         
>>> make
>>>       
>>>> me sure that it is possible and I am missing something.
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>>
>>>>         
>>>       
>
>   


Re: Promotion rule for quantity discount

Posted by "Vince M. Clark" <vc...@globalera.com>.
Not sure if this is a related issue, but we have had really strange behavior using qty discounts and X Product for Y Price. We are using multiple qty discounts so we have about 14 rules in a promo, for qty's 2-15. 

When we enter the rules we must enter them starting with the highest qty first (15). If we start with the lowest (2) the promo doesn't work. 

This suggests that the order the records are stored in the database matters. We have done this many many times to be absolutely certain what was happening. We can reproduce the problem consistently. We are using a version of trunk from a couple of weeks ago. 

I'm going to look thru the code to see how it orders and applies promo rules before filing this as a bug. Any thoughts or suggestions are appreciated. 

----- Original Message ----- 
From: "Scott Gray" <le...@gmail.com> 
To: user@ofbiz.apache.org 
Sent: Saturday, December 15, 2007 9:18:15 PM (GMT-0700) America/Chihuahua 
Subject: Re: Promotion rule for quantity discount 

Fixed in rev. 604551 

Regards 
Scott 

On 16/12/2007, Scott Gray <le...@gmail.com> wrote: 
> 
> Hi Raj 
> 
> It looks like a bug to me, X Product for Y Price works but X Product for 
> Y% Discount doesn't respect the quantity as you said. 
> 
> I'll have a look at the code. 
> 
> Regards 
> Scott 
> 
> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote: 
> > 
> > Sorry to repeat it again. Does someone have any clue to this? I am sure 
> > this is possible, I am missing something trivial. 
> > 
> > Thanks, 
> > 
> > Raj 
> > 
> > Raj Saini wrote: 
> > > Hi, 
> > > 
> > > I am having difficulty in setting up promotion. Promotion I want to 
> > > set up is: 
> > > 
> > > If the X product in shopping has Qty >= Y, apply 10% discount to the 
> > > item. 
> > > 
> > > I tried: 
> > > 
> > > Action X Product for Y% discount - Can get the discounted price but 
> > > this promotion applies to every item i.e. it does not consider the 
> > > minimum quantity limit. 
> > > 
> > > Condition X quantity of Product - If I add this condition to the above 
> > > action, it does apply the minimum quantity condition but applies 
> > > discount to the item above X. 
> > > 
> > > I searched through the Google and found this 
> > > http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It 
> > make 
> > > me sure that it is possible and I am missing something. 
> > > 
> > > Thanks, 
> > > 
> > > Raj 
> > > 
> > > 
> > 
> > 
> 

Re: Promotion rule for quantity discount

Posted by Scott Gray <le...@gmail.com>.
Fixed in rev. 604551

Regards
Scott

On 16/12/2007, Scott Gray <le...@gmail.com> wrote:
>
> Hi Raj
>
> It looks like a bug to me, X Product for Y Price works but X Product for
> Y% Discount doesn't respect the quantity as you said.
>
> I'll have a look at the code.
>
> Regards
> Scott
>
> On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
> >
> > Sorry to repeat it again. Does someone have any clue to this? I am sure
> > this is possible, I am missing something trivial.
> >
> > Thanks,
> >
> > Raj
> >
> > Raj Saini wrote:
> > > Hi,
> > >
> > > I am having difficulty in setting up promotion. Promotion I want to
> > > set up is:
> > >
> > > If the X product in shopping has Qty >= Y, apply 10% discount to the
> > > item.
> > >
> > > I tried:
> > >
> > > Action X Product for Y% discount  - Can get the discounted price but
> > > this promotion applies to every item i.e. it does not consider the
> > > minimum quantity limit.
> > >
> > > Condition X quantity of Product - If I add this condition to the above
> > > action, it does apply the minimum quantity condition but applies
> > > discount to the item above X.
> > >
> > > I searched through the Google and found this
> > > http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html . It
> > make
> > > me sure that it is possible and I am missing something.
> > >
> > > Thanks,
> > >
> > > Raj
> > >
> > >
> >
> >
>

Re: Promotion rule for quantity discount

Posted by Scott Gray <le...@gmail.com>.
Hi Raj

It looks like a bug to me, X Product for Y Price works but X Product for Y%
Discount doesn't respect the quantity as you said.

I'll have a look at the code.

Regards
Scott

On 16/12/2007, Raj Saini <ra...@gmail.com> wrote:
>
> Sorry to repeat it again. Does someone have any clue to this? I am sure
> this is possible, I am missing something trivial.
>
> Thanks,
>
> Raj
>
> Raj Saini wrote:
> > Hi,
> >
> > I am having difficulty in setting up promotion. Promotion I want to
> > set up is:
> >
> > If the X product in shopping has Qty >= Y, apply 10% discount to the
> > item.
> >
> > I tried:
> >
> > Action X Product for Y% discount  - Can get the discounted price but
> > this promotion applies to every item i.e. it does not consider the
> > minimum quantity limit.
> >
> > Condition X quantity of Product - If I add this condition to the above
> > action, it does apply the minimum quantity condition but applies
> > discount to the item above X.
> >
> > I searched through the Google and found this
> > http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html. It make
> > me sure that it is possible and I am missing something.
> >
> > Thanks,
> >
> > Raj
> >
> >
>
>

Re: Promotion rule for quantity discount

Posted by Raj Saini <ra...@gmail.com>.
Sorry to repeat it again. Does someone have any clue to this? I am sure 
this is possible, I am missing something trivial.

Thanks,

Raj

Raj Saini wrote:
> Hi,
>
> I am having difficulty in setting up promotion. Promotion I want to 
> set up is:
>
> If the X product in shopping has Qty >= Y, apply 10% discount to the 
> item.
>
> I tried:
>
> Action X Product for Y% discount  - Can get the discounted price but 
> this promotion applies to every item i.e. it does not consider the 
> minimum quantity limit.
>
> Condition X quantity of Product - If I add this condition to the above 
> action, it does apply the minimum quantity condition but applies 
> discount to the item above X.
>
> I searched through the Google and found this 
> http://lists.ofbiz.org/pipermail/dev/2004-October/006894.html. It make 
> me sure that it is possible and I am missing something.
>
> Thanks,
>
> Raj
>
>