Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default 'New' and 'Old' price wrong way round??

    Can anyone explain this? I have a discounted products, which I've reduced by 20%. Everything looks ok in the Admin section, but actually on the site the prices are reversed...Old price was £7.99, new price £6.39.. screen shot showing problem attached.

    Click image for larger version. 

Name:	Screen Shot.jpg 
Views:	93 
Size:	52.0 KB 
ID:	15500

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: 'New' and 'Old' price wrong way round??

    Well, are you sure that "eveything" looks right in the admin? Because everything looks reversed on the page. A negative percentage reduction (that would actually be an increase), which comes out to a new price being what is shown... When making the purchase, what value(s) carry through?

    Does the same thing "happen" when temporarily using the default template?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,546
    Plugin Contributions
    127

    Default Re: 'New' and 'Old' price wrong way round??

    How did you effect this price change - using Specials (admin->catalog->Specials)? If so, the number that should be in the Special Price box should be "20%" not "-20%".
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'New' and 'Old' price wrong way round??

    When you click add to cart... the value is £6.39

    Yes, everything is correct in Admin... 20% reduction, not -20% ... Admin shows £7.99 crossed out and £6.39 as new price.

  5. #5
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'New' and 'Old' price wrong way round??

    Admin screen shot

    Click image for larger version. 

Name:	carture.jpg 
Views:	47 
Size:	35.3 KB 
ID:	15501

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: 'New' and 'Old' price wrong way round??

    So would seem template related, how does it look in the standard ZC template when temporarily switched to it?

    Basically all of the math and variable assignment is opposite of what is expected... Hence the negative percentage and reversal of new and old prices...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'New' and 'Old' price wrong way round??

    which php script deals with this?

  8. #8
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'New' and 'Old' price wrong way round??

    Just to confirm.. this error also happens on the default template.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: 'New' and 'Old' price wrong way round??

    Quote Originally Posted by davef101 View Post
    which php script deals with this?
    Quote Originally Posted by davef101 View Post
    Just to confirm.. this error also happens on the default template.
    Indication that core code is modified versus some form of an override.

    So, working backwards using the default template code:
    In includes/templates/template_default/templates/tpl_product_info_display.php

    There is a bof Product Price block.

    In there one time charges are calculated (Don't see any in your example, so not a factor), then the affect of attributes where the product is to be shown starting at a value which appends the TEXT_BASE_PRICE text, and then the "power house" or most likely the result that you are seeing comes from the function zen_get_products_display_price... This function is located in:
    includes/functions/functions_prices.php

    It is more than likely something in this function/file that has been modified, or the above template_default/templates/tpl_product_info_display.php file was modified instead of copying it over to the template override. I say this because the same issue exists in both the default template as well as the templated template... But only you can identify if there is a tpl_product_info_display.php file in the directory includes/templates/YOUR_TEMPLATE/templates/

    If there is such a file and it seems that the includes/functions/functions_prices.php file hasn't been modified, then would also validate that the template_default version matches a true default version...

    Okay so the above is not in any one specific order and are things that I would check into at some point. If all of this is too much, you could help us (those assisting) out by identifying what plugins are installed or other custom modifications have been performed as perhaps one or more of them affect that file.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Aug 2015
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'New' and 'Old' price wrong way round??

    Quote Originally Posted by mc12345678 View Post
    Indication that core code is modified versus some form of an override.

    So, working backwards using the default template code:
    In includes/templates/template_default/templates/tpl_product_info_display.php

    There is a bof Product Price block.

    In there one time charges are calculated (Don't see any in your example, so not a factor), then the affect of attributes where the product is to be shown starting at a value which appends the TEXT_BASE_PRICE text, and then the "power house" or most likely the result that you are seeing comes from the function zen_get_products_display_price... This function is located in:
    includes/functions/functions_prices.php

    It is more than likely something in this function/file that has been modified, or the above template_default/templates/tpl_product_info_display.php file was modified instead of copying it over to the template override. I say this because the same issue exists in both the default template as well as the templated template... But only you can identify if there is a tpl_product_info_display.php file in the directory includes/templates/YOUR_TEMPLATE/templates/

    If there is such a file and it seems that the includes/functions/functions_prices.php file hasn't been modified, then would also validate that the template_default version matches a true default version...

    Okay so the above is not in any one specific order and are things that I would check into at some point. If all of this is too much, you could help us (those assisting) out by identifying what plugins are installed or other custom modifications have been performed as perhaps one or more of them affect that file.
    Thank you. The problem was in includes/functions/functions_prices.php where the setup HTML if/else statements are. I've now changed it to make more sense and it works as it should.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139d Any way to set an old product as NEW again?
    By Fretty in forum General Questions
    Replies: 1
    Last Post: 24 Oct 2013, 03:17 PM
  2. New Featured Products wrong price and name
    By Delights in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 11 Sep 2010, 05:26 AM
  3. price auto round up
    By shadowcast in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 5 Aug 2010, 12:14 PM
  4. Price and Shipping adding Up Wrong price
    By nWo in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 12 Aug 2007, 04:07 PM
  5. Replies: 6
    Last Post: 24 Oct 2006, 03:15 AM

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