- Posts: 36
- Thank you received: 2
Bug report: 100% discount causes a fatal error and makes the website unusable
1 year 1 month ago #368084
by jcamus
-- 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:
Can you include an official fix in the next version?
Thank you
-- 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:
Code:
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
Please Log in or Create an account to join the conversation.
1 year 1 month ago #368089
by nicolas
Replied by nicolas on topic Bug report: 100% discount causes a fatal error and makes the website unusable
Hi,
Thank you for your feedback. I've made a patch for it.
Download the install package of the 6.0.0 and install it on your website and it will add the patch. Otherwise, it will also be in the next version.
Thank you for your feedback. I've made a patch for it.
Download the install package of the 6.0.0 and install it on your website and it will add the patch. Otherwise, it will also be in the next version.
The following user(s) said Thank You: jcamus
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds