Skip to main content

Subtotal and Shipping charges not showing when shipping method is zero cost

More
5 years 6 months ago #331090 by wildweststudios
-- HikaShop version -- : 4.4.1
-- Joomla version -- : Joomla! 3.9.25 Stable
-- PHP version -- : 7.3.27
-- Browser(s) name and version -- : Firefox 86.0.1

I would like my subtotal and shipping charges to always show in both my Admin notification email and my customer's order creation email.

Right now those lines only show if a shipping charge greater than zero is chosen at checkout.

Using overrides, I have changed "HIKASHOP_SHIPPING" to 'Rush Charge', and "SUBTOTAL" to 'Product Total'.

For example, when the user orders different products, then chooses our default $0 cost production method (which is really a shipping method), the subtotal and rush charge (shipping charge) lines are not shown at all.

If they choose a shipping method with a cost to it then both subtotal and shipping charge (rush charge) show in the email.

You can see both ways in my attached files.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #331119 by nicolas
Hi,

You need to edit the emails via the menu System>Emails.
There, you need to look at the bottom "preload" section of the email where the data is formatted.
You'll see this line:
Code:
if(bccomp($data->cart->order_shipping_price,0,5) != 0){
that you can change to:
Code:
if(true){
so that the shipping fee row is always displayed.
Similarily, you can change the line:
Code:
if(bccomp($data->cart->order_discount_price,0,5) != 0 || bccomp($data->cart->order_shipping_price,0,5) != 0 || bccomp($data->cart->order_payment_price,0,5) != 0 || ($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax) || !empty($data->cart->additional)){
to:
Code:
if(true){
so that the subtotal amount is always displayed.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #331138 by wildweststudios
The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

Time to create page: 0.153 seconds
Powered by Kunena Forum