Discount Codes

Not Recognising Discount Code - Discount Codes

Not Recognising Discount Code

by Portman » Sat Jul 13, 2024 7:02 am

Hi,

I tried this addonon my Dev Site and it worked well.... so I installed on my active site and I am not having any luck.

When a customer adds the discount code they get the NO symbol even when they have met all conditions.
I mimicked the conditions on my dev site and it worked fine.

when I look at the error log I am getting this error which I assume is related;

Code: Select all

 Undefined index: sendto in /home/.../includes/system/versioned/1.0.7.10/cart_order_builder.php on line 68
Any thoughts on what I should try?
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Contact:

Re: Not Recognising Discount Code

by raiwa » Mon Jul 15, 2024 6:42 am

You should find out what is different in your develop versus server installation. I think the error you posted is not related.
You could do the following steps:
- uninstall/reinstall the ot-discount module.
- check that all discount code files are uploaded.
- make a new discount code and try
- check your error log for discount code related errors
- check you browsers dev tools console for related javascript errors
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Not Recognising Discount Code

by Portman » Mon Aug 12, 2024 6:56 am

hello again @raiwa

I have played around with this a bit and cloned my live site onto my dev site to test it all out... again on my dev site it worked ... on my live site it did not...

howerver .. I am now getting errors related directly to the discount codes...

Code: Select all

 PHP Notice:  Undefined index: shipping in /home/.../includes/modules/order_total/ot_discount.php on line 145
PHP Notice:  Trying to access array offset on value of type null in /home/.../includes/modules/order_total/ot_discount.php on line 145
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Contact:

Re: Not Recognising Discount Code

by raiwa » Mon Aug 12, 2024 8:09 am

These are only notice errors saying that no shipping is set. They do not prevent the discount code module to work correct.
I can't help further. If it works on your dev site, it's an issue on your live site. Compare differences between them.
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Not Recognising Discount Code

by Portman » Tue Aug 13, 2024 12:52 am

Can I ask another question sorry...

Do you know if there are any issues with MySQL 8 - as far as hosting goes this is the only difference between the site - live site is running MySQL 8 dev site is running 5.7
User avatar
Portman
Contributor
Posts: 158
Joined: Mon Mar 08, 2021 1:04 am
Phoenix Version: v1.0.8.20
Contact:

Re: Not Recognising Discount Code

by raiwa » Tue Aug 13, 2024 7:24 am

I'm running it with MySQL 8.0 without any problem.
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact: