Discount Codes

Fatal Error - Discount Codes

Re: Fatal Error

by radhavallabh » Thu Jun 09, 2022 11:18 am

raiwa wrote:If you get a zero as response without error message, then it seems the discount code does not get validated for some reason. Please check all options.
Hi Dear;
I created a new code dear and made sure all conditions are met-
It is yet giving the same response of 0

Please can you help fix the issue...
Thank you in advance;
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 364
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Fatal Error

by raiwa » Thu Jun 09, 2022 12:05 pm

Please provide all settings of the discount code, if you enter it in shopping cart or checkout payment, if logged in, if guest etc. I'll then have a look when I find some time.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Fatal Error

by radhavallabh » Thu Jun 09, 2022 12:30 pm

raiwa wrote:Please provide all settings of the discount code, if you enter it in shopping cart or checkout payment, if logged in, if guest etc. I'll then have a look when I find some time.
Hi Dear;
Using it when logged in;
I am only entering it on checkout-payment.php
Attaching the screenshot of the discount code settings-
Screenshot 2022-06-09 at 17-58-09 CE Phoenix Cart Administration Tool.png
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 364
Joined: Tue Oct 27, 2020 4:09 am
Contact:

Re: Fatal Error

by raiwa » Thu Jun 09, 2022 6:11 pm

It seems I can reproduce some intermittent errors on this. I'll have a deeper look on Monday when I'm back from short holidays.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Fatal Error

by raiwa » Mon Jun 13, 2022 7:13 am

This is an error introduced in Discount Codes 5.7.2
Please change in includes/modules/order_total/ot_discount.php line 149 to:

Code: Select all

              if ( in_array($customer_id, $customers) && !empty($_SESSION['shipping']) ) {
Please confirm
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Fatal Error

by radhavallabh » Mon Jun 13, 2022 9:53 am

raiwa wrote:This is an error introduced in Discount Codes 5.7.2
Please change in includes/modules/order_total/ot_discount.php line 149 to:

Code: Select all

              if ( in_array($customer_id, $customers) && !empty($_SESSION['shipping']) ) {
Please confirm
Hi;
It works perfectly now dear!!
Thank you!
Very Warm Regds./
radhavallabh
radhavallabh
VIP Member
VIP Member
Posts: 364
Joined: Tue Oct 27, 2020 4:09 am
Contact: