Adding extra detail in Order Confirmation emails

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #110906

Hi, just purchased HikaShop Business having played around with Starter and deciding this is definitely the way to go. Having been slogging through several issues brought about by the upgrade and am now just getting to the bits that I purchased Business for, mainly customising email confirmations.

I have found where to update the content of these but need some guidance:-

1. Which is the email that is sent to the shop owner when an order has been confirmed (is it different to the one sent to the customer)?

2. How can I add the payment method used on the confirmation email so that the shop owner can tell this without having to log in to the back-end to find out? (My shop owner is not IT literate and does not want to know anything about Joomla or HikaShop, he just wants email notifications of sales!)

3. When the check payment method is used, I need to add payment instructions to the order confirmation. I know I can display a post checkout message to appear on the screen but need to repeat this in the confirmation email. I do not want this to appear in the confirmation email when any other payment method has been used. This is something that I have done in Zen Cart (albeit by manually editing language files etc.) but cant see a way to do it here.

I have loads of other issues that I'm working through, but the above are the only one's stopping my shop going live so I would appreciate any pointers that might speed my fix of this.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #110999

Hi,

1. The mail sent to the administrator is not the same email thant the one received by the customers.
It's the mail: Order administrator notification

2. To display the Payment method used, you can use the code: echo $data->order_payment_method;

3. You have to edit the mail "Order status notification" and use the same variable $data->order_payment_method to check if the payment method is by check, if it is, display the instructions again.

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

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #111158

Thanks Xavier,

I am not very confident programming in php but have managed to sort the first one thanks to you.

I am struggling with editing the 'order status notification' as I am not familiar with the syntax of the 'if' statement. I have found putting it in wrong crashes the whole checkout process. Nevertheless I am copying the syntax from elsewhere and will keep trying until I get it right.

Am I right in thinking I need to add another entry in the language file (en-GB.com_hikashop.ini) that contains the payment instruction text to be displayed or can I just echo it straight in the 'order status notification' email once I've got the syntax right?

Thanks for your help. Love the product.

Simon

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #111224

Hi,

You can probably use:

if( $data->order_payment_method == 'check'){
    echo JText::_('CHECK_PAYMENT_INSTRUCTIONS');
}
And add a translation like:
CHECK_PAYMENT_INSTRUCTIONS="Send the check to the address ..."

in HikaShop > Configuration > Languages, select the desired language and add this in the override part.

It's better to add it in the translation file, by this way you can translate it in many languages.
Else an echo in the mail works too.

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

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #111321

Thanks again,

Just cant seem to get the syntax right for the if statement, it either crashes the checkout process completely or just doesn't return what I expect.

No matter, I have added the payment instructions to the translation file, and am echoing it as standard in the 'order creation notification' email. It just means that all customers will see these instructions and not just those that elect to pay by check. That is not the end of the world and will do until I can learn a bit more about how to code php properly.

Thanks for your help, and for pointing me in the right direction to do a work around.

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

  • Posts: 83047
  • Thank you received: 13406
  • MODERATOR
11 years 6 months ago #111506

Hi,

The syntax Xavier gave is correct. However, note that you need to add a <?php tag before and a ?> tag after the code so it get interpreted, if you're adding it inside HTML code.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum