Noting that there is a shopping_cart class method (show_total_before_discounts) to retrieve that value.
Noting that there is a shopping_cart class method (show_total_before_discounts) to retrieve that value.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
lines 173-182,
All these files are from the development branch of github.Code:$this->responseText['priceTotal'] .= number_format($this->shoppingCart->total, $decimal_places, $decimal_point, $thousands_point); $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); } else { $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 */); $this->responseText['preDiscPriceTotal'] = $currencies->display_price($this->shoppingCart->total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])); } if (!defined('DPU_OUT_OF_STOCK_IMAGE')) { define('DPU_OUT_OF_STOCK_IMAGE', '%s'); }
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Change this line
toCode:$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);
Code:$this->responseText['preDiscPriceTotal'] = number_format(zen_add_tax($this->shoppingCart->show_total_before_discounts(), zen_get_tax_rate($product_check->fields['products_tax_class_id'])), $decimal_places, $decimal_point, $thousands_point);
Perfect!
Temporary location for updated files at https://github.com/dbltoe/Zen-Cart-D...dater/tree/158
Those files will NOT work prior to 1.5.8
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Spoke a little too soon.
Still a glitch
Code:[16-Feb-2023 10:50:14 America/New_York] Request URI: /ajax.php?act=DPU_Ajax&method=getDetails, IP address: 216.177.186.199, Language id 1 #1 zcDPU_Ajax->prepareOutput() called at [/includes/classes/ajax/zcDPU_Ajax.php:88] #2 zcDPU_Ajax->getDetails() called at [/ajax.php:85] --> PHP Warning: Undefined property: shoppingCart::$show_total_before_discounts in /includes/classes/ajax/zcDPU_Ajax.php on line 176.
Last edited by dbltoe; 16 Feb 2023 at 04:53 PM.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Unfortunately, I still get the error when both are "fixed"
One checker advised to changeCode:$this->responseText['priceTotal'] .= number_format($this->shoppingCart->total, $decimal_places, $decimal_point, $thousands_point); $this->responseText['preDiscPriceTotal'] = number_format(zen_add_tax($this->shoppingCart->show_total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])), $decimal_places, $decimal_point, $thousands_point); } else { $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 */); $this->responseText['preDiscPriceTotal'] = $currencies->display_price($this->shoppingCart->show_total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])); }toCode:protected string $responseType = 'success';for php 8 compliance. That had no effect.Code:protected $responseType = 'success';
One checker also suggested that the $_post variables are not properly set before being used.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.