Customising Email Message Based on Shipping Zone

  • Posts: 4
  • Thank you received: 0
6 years 4 months ago #283048

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.6.32
-- Browser(s) name and version -- : Chrome, Firefox

Would it be possible to customise a message in the order creation or order confirmation email base on Country selection criteria?

Example: If Country "Singapore" selected, the default email notifications will be triggered.
But if countries other than SG selected, can there be an additional line printed in the default notification?

I suppose it should be using an 'if... else' condition in the customisation. But which part and variable should be used to program customise this?

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 4 months ago #283052

Hi,

You can add such code in the HTML version of the email via the menu System>Emails:

<?php
if($data->cart->billing_address->address_country == 'XXX'){
 echo 'my custom text for country XXX';
}
?>
where XXX is either the name of the country zone.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum