Show Zero When Shipping is Free in Emails

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 years 5 months ago #203507

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0

1) In the order emails, when shipping is free the total looks like the first item on the attached. How can I make it look like the item below it and show the shipping as $0;

So it should say:

Sub Total: $189
Shipping: $0
Total: $189

2) Also, in the order emails, it shows the cost as follows:

Total: $189
Shipping: $0
Total: $189

How/where do I change the FIRST total to say "Sub Total" instead of "Total".

Thank you.

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #203516

Hi,

You will have to edit the email "preload" part, so in the order_status_notification email, preload part you have to remove the PHP if condition:

if(bccomp($data->cart->order_discount_price,0,5)) {
don't forget to remove the ending bracket to avoid PHP error.

So that will display the shipping even if it is free.

Then for the subtotal issue, it should already display "sub total", please check the translation for the text key "SUBTOTAL",
I think that this is just a translation issue.
www.hikashop.com/support/faq.html#tran

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

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
9 years 5 months ago #203582

With the change that I made it is now showing the shipping as a coupon but it's not a coupon - the shipping is set-up to be FREE if the order is over a certain amount so it's not a coupon, it's shipping.

Also, it is still not looking as I had suggested in my post. Please see the attached as to how I would like the amounts to show on the notification emails. I will try to get the "Order Status Notification" email working first then will work on the others.

Your help is appreciated. Thanks!

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #203639

Hi,

My bad, I gave you the wrong line, the correct line to remove is:

if(bccomp($data->cart->order_shipping_price,0,5)){

And to add the subtotal part, you have to remove the line:
	if(bccomp($data->cart->order_discount_price,0,5) || bccomp($data->cart->order_shipping_price,0,5) || bccomp($data->cart->order_payment_price,0,5) || ($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax) || !empty($data->cart->additional)){
and its ending bracket.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum