Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default negative price of attributes not working with my price by attributes

    Hi guys,

    One of my attributes a discount and for that attribute value I have -$30. The item is completely priced by attributes.

    Although zen cart calculates the correct total in the checkout, it adds that $30 instead of subtracting it for the products base price.

    Am i doing it correctly? All i am placing in the price_prefix field is '-'

    e.g Product price = 0

    Attribute 1 = + 70
    Attribute 2 = - 30

    Final Checkout Price = 40
    The problem is that zencart has the base price set to $100! It doesn't take into account the prefix (-) rather just adds the price field into the base price.


    How do i fix this?

    I have tried this out on clean installs and it has the same bug. Where is the price product by attribute code? can we add a conditional statement along the lines of:

    for name="price_prefix" if value="-" then SUBTRACT from base price, else if value="+", then ADD?

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: negative price of attributes not working with my price by attributes

    If you're pricing the item by attributes, the Attribute 1 value would be $70 and the Attribute 2 value would be $40. If you don't have a base price specified, there's nothing to subtract from.

    If you set the base price to $70, then have an attribute with a value of -$30, it will work.

  3. #3
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: negative price of attributes not working with my price by attributes

    oh ok. i tried that and it still doesn't work.

    e.g Product price = 70

    Attribute 1 = + 0
    Attribute 2 = - 30

    Final Checkout Price = 40

    Zen Cart base Price: 100!



    Any thoughts?

  4. #4
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default negative price of attributes add onto base price, not subtract

    After more testing on clean installs I am convinced that it is a bug in the zen cart code. I just need some direction in going about to fix it. I assume there is faulty logic where if value is > 0 then ADD, wheras we will need to do a check to see if the prefix is '+' or '-'.
    I would really appreciate some feedback,
    regards,
    Shaztesting

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: negative price of attributes not working with my price by attributes

    Quote Originally Posted by shaztesting View Post
    zen cart calculates the correct total in the checkout
    So ... you're saying it actually DOES work properly, right?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: negative price of attributes add onto base price, not subtract

    Yes,

    But at the top of the product page, on every other page of the site where the product price is listed, on the page title, etc. They are all incorrect.

    No one will click on the product and go out to checkout to see the final price if the whole time a $40 item is showing at $100.

    Even google picks up the title tag and shows the price in the SERP results.

  7. #7
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: negative price of attributes add onto base price, not subtract

    does anyone know where the base price calculation logic is even done?

    is this in the admin attributes php file or is it in the catalogue section?


    any direction will help,

    thanks!

  8. #8
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: negative price of attributes add onto base price, not subtract

    Sorry, I'm not programmer enough to point you to where you would hack the code, but I'll disagree with the idea that customers pay much attention to whatever price is showing in the page title. As long as the price is right in the cart, and the negative attribute is clearly shown to be such, I think it's good.

    If you can't find where to make your changes, you can turn off the price in the title in admin.

  9. #9
    Join Date
    Jun 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: negative price of attributes add onto base price, not subtract

    Quote Originally Posted by stevesh
    but I'll disagree with the idea that customers pay much attention to whatever price is showing in the page title.
    I'll agree with that statement but i submit to you that everyone will pay attention to the other sections :

    Quote Originally Posted by shaztesting View Post

    But at the top of the product page, on every other page of the site where the product price is listed,

    by 'top of page' i mean just under the heading and above the description. Basically the main huge number that everyone uses to decide whether to add to the cart or not too.

    Quote Originally Posted by stevesh
    you can turn off the price in the title in admin.
    which menu? i can't believe i missed this one, thanks.


    i agree that in checkout the prices are calculating and charging the credit card properly. however you must see that having grossly overpriced products throughout the site (featured, specials, new product pages, etc) will cause a lot of people to never get to the checkout and see that i'm charging $40 and not $100



    so far i am searching through all the mentions of price_prefix but i admit that this search method could be flawed if the code in question doesn't refer to fields['price_prefix'] at all when deciding to + all the values.

  10. #10
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: negative price of attributes add onto base price, not subtract

    It's in Admin - Configuration - Product Info, near the bottom.

    I'll admit I might not understand exactly what you need to do with attributes, so when you get things set up, you might post a URL to the site so we can see the situation.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 SaleMaker only discounts base price, not attributes?
    By FueledByMatt in forum Setting Up Specials and SaleMaker
    Replies: 13
    Last Post: 17 Jan 2019, 11:00 PM
  2. Add attributes for product no base price
    By hara in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 6 Jan 2012, 05:36 PM
  3. Attributes to replace the price.. but not add on to default price..
    By jackson5759 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Apr 2011, 06:43 AM
  4. Add base price to attribute price so that attribute shows total amount
    By dcitsolutions in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Nov 2010, 08:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR