Yes, I installed it on the newest version of zen cart(v1.5.7d), and it's not working but just keep refreshing the product info page about 2 times/every second.
And when I tested it on v1.5.6c, there is no problem.
Printable View
Yes, I installed it on the newest version of zen cart(v1.5.7d), and it's not working but just keep refreshing the product info page about 2 times/every second.
And when I tested it on v1.5.6c, there is no problem.
That issue is addressed in: https://www.zen-cart.com/showthread....58#post1370158
As referenced by: https://www.zen-cart.com/showthread....63#post1371663
Found by going back 2 or 3ish pages.
Explanation of why that is occurring is provided back there.
Thank you so much for your help, I've been stuck with this problem for weeks and it finally works.
I've been testing locally so far and everything works fine.
My version is v1.5.7d, the local PHP version is 7.4, and so is the server.
But whenever I move the site to the server, the plugin doesn't work at all except for loading images all the time when I input the quantity.
Any ideas?
Several come to mind, though not all specifically related to the plugin and in no particular order: files exist in the server that are not in the local version, file differences between the two, database differences that have some affect, two or more observers trying to monitor the same notifier but are loaded in a different sequence on the site than the local version, that there has been done html validation differences between the output, differences in jquery versions, etc.
Basically that there is a difference between the two that has brought out a difference in operation. Look for logs, create logs if necessary, include browser (javascript/jquery) as well, etc.
DPU v3.2.1
Upgrading a site from ZC 1.5.7d to ZC 1.5.8 (PHP 8.0.17) and I get this fatal error when visiting a product_info page
Lines 174 - 182 of includes/classes/dynamic_price_updater.phpCode:[21-Jan-2023 12:18:02 Europe/London] PHP Fatal error: Uncaught Error: Cannot access protected property shoppingCart::$total_before_discounts in D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php:181
Stack trace:
#0 D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php(79): DPU->prepareOutput()
#1 D:\wamp64\www\mydomain.com\includes\classes\ajax\zcDPU_Ajax.php(16): DPU->getDetails('JSON')
#2 D:\wamp64\www\mydomain.com\ajax.php(85): zcDPU_Ajax->dpu_update()
#3 {main}
thrown in D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php on line 181
[21-Jan-2023 12:18:02 Europe/London] Request URI: /ajax.php?product_info&act=DPU_Ajax&method=dpu_update, IP address: 127.0.0.1
--> PHP Fatal error: Uncaught Error: Cannot access protected property shoppingCart::$total_before_discounts in D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php:181
Stack trace:
#0 D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php(79): DPU->prepareOutput()
#1 D:\wamp64\www\mydomain.com\includes\classes\ajax\zcDPU_Ajax.php(16): DPU->getDetails('JSON')
#2 D:\wamp64\www\mydomain.com\ajax.php(85): zcDPU_Ajax->dpu_update()
#3 {main}
thrown in D:\wamp64\www\mydomain.com\includes\classes\dynamic_price_updater.php on line 181.
Any thoughts/suggestions?Code:174. $this->responseText['priceTotal'] .= number_format($this->shoppingCart->total, $decimal_places, $decimal_point, $thousands_point);
175. // $this->responseText['priceTotalTaxed'] .=
176. $this->responseText['midDiscPriceTotal'] = number_format(zen_add_tax($this->shoppingCart->total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])), $decimal_places, $decimal_point, $thousands_point);
177. $this->responseText['preDiscPriceTotal'] = number_format(zen_add_tax($this->shoppingCart->total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])), $decimal_places, $decimal_point, $thousands_point);
178. } else {
179. $this->responseText['priceTotal'] .= $currencies->display_price($this->shoppingCart->total, 0 /*zen_get_tax_rate($product_check->fields['products_tax_class_id'])*//* 0 */ /* DISPLAY_PRICE_WITH_TAX */);
180. $this->responseText['priceTotalTaxed'] .= $currencies->display_price($this->shoppingCart->total, zen_get_tax_rate($product_check->fields['products_tax_class_id']));
181. $this->responseText['midDiscPriceTotal'] = $currencies->display_price($this->shoppingCart->total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])); // Need to determine if/how price should be adjusted associated with multiple price discounts.
182. $this->responseText['preDiscPriceTotal'] = $currencies->display_price($this->shoppingCart->total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id']));
Have you tried using the beta version from GitHub? It can be found at https://github.com/Zen4All-nl/Zen-Ca...-Price-Updater
I haven't tried installing this v4.0.0 but it looks as though it makes use of the same variable as v3.2.1
A workaround on the site I'm currently working on is to remove the offending lines from dynamic_price_updater.php. I don't use the native ZC specials, sales and discounts (just @swguy's Quantity Discounts) so it should be ok.Code:shoppingCart->total_before_discounts