Discount Codes

Discount Code error - Discount Codes

Discount Code error

by gsmiley007 » Tue Mar 30, 2021 10:16 pm

Logged in the system:
got this error:
Notice: Undefined variable: shipping_tax in /includes/modules/order_total/ot_discount.php on line 288
Discount is shown

No login:
Does not show discount after it's applied. Have to reload the browser, then i

got this error,
Notice: Undefined variable: shipping_tax in includes/modules/order_total/ot_discount.php on line 288
and now discount is shown.

Also, is there a way to remove the discount, once it's applied.
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Contact:

Re: Discount Code error

by raiwa » Wed Mar 31, 2021 7:03 am

Notice: Undefined variable: shipping_tax in /includes/modules/order_total/ot_discount.php on line 288
Discount is shown
Please update to the actual 5.4.2 version (it's not the same than the one I posted in the old topic), it includes the fix for this.
Does not show discount after it's applied. Have to reload the browser
This is how it works: there are two steps in the shopping cart:
1. validate the code (green arrow appears)
2. apply the code using the "Apply" button to show it in order totals
Also, is there a way to remove the discount, once it's applied.
Apply a non valid code:
Install.txt:
Version 5.4.0. Updated for Phoenix 1.0.7.14.+
............
changed code to allow to remove already applied discount code using invalid discount code
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: Discount Code error

by gsmiley007 » Thu Apr 01, 2021 11:24 pm

I see only 5.4.1 for download
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Contact:

Re: Discount Code error

by raiwa » Fri Apr 02, 2021 7:04 am

Ooohps, forgot to upload it here. Meanwhile it was available on my site.
I added it now. Thanks for the advise.
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: Discount Code error

by gsmiley007 » Sat Apr 03, 2021 4:16 am

1. No login:
type discount code, press enter. then click on the web page
does not show discount
click apply works

2. No login:
type discount code, click apply
works

3. Login:
type discount code, press enter. then click on the web page
does not show discount
click apply works

4. Login:
type discount code, click apply
works

Removal of discount code:
I don't think it's initiative for a user to put a bad discount code to remove it.

I would suggest that when either you hover over apply (it changes to remove) or there is a remove button next to apply.
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Contact:

Re: Discount Code error

by raiwa » Sat Apr 03, 2021 8:23 am

Thanks for the suggestion. I'll consider it for the next update.
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: Discount Code error

by raiwa » Wed Apr 07, 2021 8:27 am

Uploaded Version 5.5.0:
  • Add remove buttons to shopping cart module and checkout payment hook. Thanks to @gsmiley007 for the suggestion
  • Made the discount code input fields readonly once the discount code has been applied.
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: Discount Code error

by gsmiley007 » Thu Apr 08, 2021 4:38 am

Tested without login,

1. enter code, click apply
discount shows up

2. enter code, press enter, click apply
discount shows up.

Clicked remove discount
discount is removed.

Looks good so far
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Contact: