New Zenner
- Join Date:
- Aug 2015
- Posts:
- 6
- Plugin Contributions:
- 0
New Zenner
Totally Zenned
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...
Administrator
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.
New Zenner
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.
New Zenner
Totally Zenned
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...
New Zenner
which php script deals with this?
New Zenner
Just to confirm.. this error also happens on the default template.
Totally Zenned
davef101:
which php script deals with this?
davef101:
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...
New Zenner
mc12345678:
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.phpThere 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.phpIt 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.
Totally Zenned
davef101:
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.
I think this is twice recently that I've seen something like that... It is important to identify how/why that got reversed and let the "author" know so that less others will be affected...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Tell staff why this post should be reviewed.