Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Negative price factor not working

Negative price factor not working

Locked

Views: 1,335

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
14 May 2009, 5:05 PM
#1
ctlajoie avatar

ctlajoie

New Zenner

Join Date:
May 2009
Posts:
4
Plugin Contributions:
0

Negative price factor not working

Hi, I have a product (not priced by attributes) that has a base price of $20. I have an attribute with several values, each of which should reduce the base price by a certain factor.
Here's what I have set for one of them:
Attachment #5737

The attributes controller shows the expected price reductions properly:
Attachment #5738

as does the selector on the product page:
Attachment #5741

the problem is that after I have added the product to the cart, the price reduction is not shown. The expected total is $10.
Attachment #5743

If I change the factor so that it is no longer negative (I changed -0.5 to 0.5), it adds it in as would be expected. With the positive factor, the price shown in the cart was $30.

Is this a bug in zen cart? Or am I doing something wrong?

14 May 2009, 5:08 PM
#2
ctlajoie avatar

ctlajoie

New Zenner

Join Date:
May 2009
Posts:
4
Plugin Contributions:
0

Re: Negative price factor not working

I just wanted to point out that I know there are other ways to achieve the same thing. But if I can get this working, price changes would be much easier in the future.

19 May 2009, 5:03 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Negative price factor not working

Try instead to use:
Price Factor: 0.5
Offset: 1.0

19 May 2009, 4:31 PM
#4
ctlajoie avatar

ctlajoie

New Zenner

Join Date:
May 2009
Posts:
4
Plugin Contributions:
0

Re: Negative price factor not working

Thanks for the reply. After finding out exactly what the Offset does, I see that this will work just fine.

But I don't really understand what the purpose of the offset is. I'm quite likely missing the entire point of it, but from my perspective, if negative price factors did work, then the offset would not be necessary.

In addition to that, I do not understand why negative price factors should not work anyway. The Attributes Controller does not do input validation on the field that prevents it from being negative, and it even handles them properly, as seen in my second image.

In any case, the code changes described in my bug report do not appear to have caused any side effects, and they will allow negative price factors to work as one would assume they should.