Discount Codes
Installing - Discount Codes
Installing
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
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.
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
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
- : Buy Me A Beverage
- Contact:
Re: Installing
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
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.
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
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
- : Buy Me A Beverage
- Contact:
Re: Installing
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'
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
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:
with this:
I'll update the addon with this patch tomorrow.
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,
};
}
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;
}
}
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
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
- : Buy Me A Beverage
- Contact:
Re: Installing
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:
