-- HikaShop version -- : 6.0.0
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Attempt to assign property "tax_amount" on null
Hi,
we have the following discount code set up in HikaShop:
prnt.sc/MqVO4V_4aAYr
In combination with particular products in the cart, it results in the following error:
Attempt to assign property "tax_amount" on null
Screenshot:
prnt.sc/yvZW_qPkwnz_
The user can no longer use the website at all as every page visit results in the same error.
Stack trace:
prnt.sc/vOAmxB1yOVZ9
Our developer investigated this and determined it is indeed a bug.
Here is what he said:
For a quick fix, I updated the file:
\\administrator\components\com_hikashop\classes\discount.php and around line 703 added:
if ( ! isset( $cart->coupon->total->prices[0]->taxes ) && isset ( $cart->coupon->total->prices[0]->taxes_without_discount ) ) $cart->coupon->total->prices[0]->taxes = $cart->coupon->total->prices[0]->taxes_without_discount; # seyi_code
Can you include an official fix in the next version?
Thank you