Discount Codes

Installing - Discount Codes

Installing

by FlagShipper » Mon Sep 07, 2026 6:43 pm

Do I need to install Ship In Cart to use this addon? The install says it's optional, but also required. Will this work without the other addon? Sorry for the newbie Q
FlagShipper
Member
Posts: 17
Joined: Thu Aug 20, 2026 12:56 am
Phoenix Version: v1.1.0.7
Contact:

Re: Installing

by raiwa » Wed Sep 09, 2026 5:31 pm

The shopping cart module is optional, but if you wish to use it, the ship in cart addon is required.

Discount code will work without it. Just enter the discount code on the checkout payment page.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
raiwa
Certified Developer
Posts: 1665
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Installing

by FlagShipper » Thu Sep 10, 2026 9:07 pm

Thanks! I installed and it shows the discount code option on shopping_cart when adding an item, but adding the code doesn't change the sub-total there. The discount code option also shows again on checkout_payment and the actual discount is shown on checkout_confirmation. Will adding the ship in cart addon change that?
FlagShipper
Member
Posts: 17
Joined: Thu Aug 20, 2026 12:56 am
Phoenix Version: v1.1.0.7
Contact:

Re: Installing

by raiwa » Fri Sep 11, 2026 8:25 am

Hi,

Short answer: yes.

Long answer:
The shopping cart discount code module you installed in admin => Modules => Content => Discount Code [shopping_cart] is an optional module and not needed to use the discount code addon.
But if you wish to use it, you need to install the ship in cart addon. The ship in cart addon includes an alternative Order Totals module which shows all order totals like shipping costs, discounts etc. similar to the order totals shown on the checkout confirmation page.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
raiwa
Certified Developer
Posts: 1665
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Installing

by FlagShipper » Sun Sep 13, 2026 2:08 pm

I've uploaded the Ship In Cart addon, but now when I go to Modules > Content to install it I'm getting a 500 error, the log is showing
AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /home/localcom/domains/domain.com/public_html/includes/modules/content/shopping_cart/cm_sc_shipping.php on line 92'
FlagShipper
Member
Posts: 17
Joined: Thu Aug 20, 2026 12:56 am
Phoenix Version: v1.1.0.7
Contact:

Re: Installing

by raiwa » Sun Sep 13, 2026 4:37 pm

You are probabley running PHP 7.x

I know that the addon states 7.x compatibility, but this code escaped.

2 possibilitys:

1. Run your site at least with PHP 8.0 which is recommended for security and performance.

2. Replace the code in: includes/modules/content/shopping_cart/cm_sc_shipping.php line 90-97:

Code: Select all

							public function get($key, $to = 0) {
								return match ($key) {
									'default_sendto' => null,
									'country_id' => $_SESSION['cart_country_id'] ?? STORE_COUNTRY,
									'zone_id' => $_SESSION['cart_zone'] ?? STORE_ZONE,
									default => null,
								};
							}
with this:

Code: Select all

							public function get($key, $to = 0) {
									switch ($key) {
											case 'default_sendto':
													return null;
											case 'country_id':
													return $_SESSION['cart_country_id'] ?? STORE_COUNTRY;
											case 'zone_id':
													return $_SESSION['cart_zone'] ?? STORE_ZONE;
											default:
													return null;
									}
							}
I'll update the addon with this patch tomorrow.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
raiwa
Certified Developer
Posts: 1665
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Installing

by FlagShipper » Sun Sep 13, 2026 5:38 pm

Thanks! I tried to set php to 8 through my control panel but it isn't updating (still says 7.4 on server info) but this fixed it.
FlagShipper
Member
Posts: 17
Joined: Thu Aug 20, 2026 12:56 am
Phoenix Version: v1.1.0.7
Contact: