[solved] Show Shipping without tax on order confirmation mail
- nico.van.leeuwen
-
Topic Author
- Offline
-- Joomla version -- : 3.6.5
-- PHP version -- : 7.0.18
Hi,
I'm looking for the right string to modify in the confimation email that goes to the client.
In this email the shipping is showed with tax and I would like to show it without tax.
FYI : The setting of the site is to show both prices but on some parts of the site the displaying of prices is changed because that is what the customer would like to see.
I've managed to change the price display by changing the strings used to the ones without tax. This I managed to find on the forum myself but I have had no luck with changing the shippingprice.
Thanks in advance
Please Log in or Create an account to join the conversation.
In the "preload" part of the email you will find that code
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
Thank you very much for this. Unfortunately I must be doing something wrong with changing the code because it's not changing my result in the email.
I changed it to
But the result has not changed. (this is also the reason I leave coding to coders :blink: )
Please Log in or Create an account to join the conversation.
Which email have you edited ? How are you testing the email content ?
If you take a look at my message, I was telling you to just change the "if" condition ; like a " if(false) ".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
Appologies for not changing the code the correct way
The email I'm trying to change is the one that is send when an order is created. (Configuration > System > Email).
There I select the order created mail and do the change in the Pre-load block.
I test by creating an order and see what's in the email that is send.
Please Log in or Create an account to join the conversation.
You can edit the "order_notification" email ; that email is used when you click on the "email" toolbar button while displaying an order in the backend.
You can check that you're modifying the right email by adding some content in the "html" part.
By opening two tabs, one for the email edition and one for the order details ; you will be able to perform test easily (and confirm the modification you want to do).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
Is just tested again if I'm in the right file and it's the "order creation notification" email I need to edit.
Testing with an extra piece in the HTML part is showing this in the confirmation email.
What I did not get right is the syntax for not showing the tax on the shipping.
Anyone willing to help with this by sending a piece of code that I can try ?
Thanks !
Please Log in or Create an account to join the conversation.
I can only confirm what Jerome said. Using if(false) should do what you want while if(true) will always display the shipping method price with tax on the email notification.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
No question about Jerome being right, I'm sure he is.
It's just me not getting it to show the shipping costs without tax ...
Tried my best but all I get is or syntax errors, or shipping with tax
I don't know anything about syntax so must be doing something wrong that does not seem obvious to me.
Your help is really appreciated don't get me wrong.
Please Log in or Create an account to join the conversation.
Well, I don't know what you're doing but the modification is really simple.
You need to replace:
if($config->get('price_with_tax')){
by:
if(false){
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
I did exactly what you suggested but the confirmation email still shows the shipping price with tax.
Tried the same modification on my clean development site and here it also shows the shipping with tax in the order creation notification email.
Sorry about the trouble but it looks like it's really not changing anything.
Please Log in or Create an account to join the conversation.
Well, I don't know what you're doing wrong. Or maybe we're not talking about the same thing.
Please provide screenshots of the situation and the modifications, etc so that we can better understand.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
Here are some screenshots of the config and the changes I made.
Please Log in or Create an account to join the conversation.
Ok, we were not talking about the same place.
It's that code that you want to change then:
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
Thanks for this, now it's working without showing Tax added to the shipping amount.
Great job !
Please Log in or Create an account to join the conversation.