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

  • Posts: 71
  • Thank you received: 5
  • Hikashop Business
1 month 2 weeks ago #331090

-- 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.

Attachments:

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

  • Posts: 72763
  • Thank you received: 11096
  • MODERATOR
1 month 2 weeks ago #331119

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:

if(bccomp($data->cart->order_shipping_price,0,5) != 0){
that you can change to:
if(true){
so that the shipping fee row is always displayed.
Similarily, you can change the line:
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:
if(true){
so that the subtotal amount is always displayed.

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

  • Posts: 71
  • Thank you received: 5
  • Hikashop Business
1 month 2 weeks ago #331138

Ok great, I got it working. Thanks.

The following user(s) said Thank You: Philip

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

Time to create page: 0.061 seconds
Powered by Kunena Forum