How to include a custom field in emails

  • Posts: 66
  • Thank you received: 3
12 years 11 months ago #15738

For the shop I am still working on I have set up a custom date field to be filled in by the customer. Needed to have the food delivered in time.

How do I get that information in the emails send to customers?

Something like this in the Order creation notification (customer) and Order administrator notification?

Gewenste datum levering: <?php echo JText::_('whichlabelhere');?>

Attachments:
Last edit: 12 years 11 months ago by didero.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
12 years 11 months ago #15755

I see that you create an address custom field. In that case, you can edit both address_template files via the menu Display->Views and add
Gewenste datum levering: {gewenstedatumlevering}

so that it appear in the address.

But isn't that kind of strange to add a custom field of the table address for the delivery date of the order ? You should rather use a custom field of the table order (business edition) so that the date is attached to the order and not to the address.
The field will already be displayed on the order admin notification. You could just copy paste the fields display code to the user email and you should be good to go in that case.

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

  • Posts: 66
  • Thank you received: 3
12 years 11 months ago #15756

Ok Nicolas,

I see what you mean now. I upgraded from the Essential Edition and that field was created then. Didn't look there anymore. Now I see that I can create a new field as suggested.

Once again thank you for your support!

PS: For people that really need to fill their online shop with a lot of products: the Business Edition has a fine way to copy existing items. And after that you can easily assign them to another Category. Saves a lot of work.

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

  • Posts: 66
  • Thank you received: 3
12 years 11 months ago #15763

Update: this is really great :)
As you suggested I have made a new field in the table order.
The date on which delivery shall have to take place now shows up in the checkout process as an extra information field to be filled in by the customer. And of course as set in the back-end!

Last edit: 12 years 11 months ago by didero.

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

  • Posts: 66
  • Thank you received: 3
12 years 11 months ago #15883

Just a note to say how happy I am with Hikashop Business Edition.
Here is a screenshot of the email sent to the administrator.




I created 3 extra custom fields in the Table Order




My client wanted to have the date of delivery (gewenste datum levering) mentioned as first for picking all the orders by his staff. So I played a bit with the code and hope it is ok. Anyway it works.

Code see attached file.

File Attachment:

File Name: mail_beves...r_v2.txt
File Size:7 KB


One tip: when changing the emails it is best to log off as customer and create a new order and log in again. Otherwise new changes are not visible! That might be the reason why momentis didn't see changes occur? see: www.hikashop.com/en/support/forum/4-how-...r-number-format.html

Attachments:
Last edit: 12 years 11 months ago by didero.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum