Add certain field in confirmation e-mail

  • Posts: 62
  • Thank you received: 0
  • Hikashop Business
8 years 1 month ago #251505

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.18
-- Browser(s) name and version -- : firefox

Hi,

I want to setup a custom confirmation e-mail so it can be insert automatic in our invoice-system. Therefore I need to enter some fields, each on a separate line. For example:

Order: {VAR:ORDER_NUMBER}||<br>
IP: {VAR:order.order_ip}||<br>
Firste name and last name:???? ||<br>
City: ????||<br>

The first ones (order and IP) are no problemand working OK, but how can I add firstname, middle name, lastname or city for example?
I hope someone can help me.

Regards and thanks,
Joost

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 1 month ago #251531

Hi,

Sure:
{VAR:billing_address.address_firstname}
{VAR:billing_address.address_middle_name}
{VAR:billing_address.address_lastname}
{VAR:billing_address.address_city}

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

  • Posts: 62
  • Thank you received: 0
  • Hikashop Business
8 years 1 month ago #251626

Hi Nicolas,

Thanks for the quick reply. This works like a charm! I have still some fields with problems/questions:

1. How can I add the date/time of the order in the e-mail?
2. How can I add the e-mailadress of the customer?

Ik hope you can help me with this.

regards,
Joost

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

  • Posts: 12953
  • Thank you received: 1778
8 years 1 month ago #251637

Hello Joost,

1. The solution will be to edit the "Preload version" of your email and add that kind of code at the end :

if(isset($data->order_created))
	$vars['ORDER_DATE'] = date('m.d.y H:i:s',$data->order_created);

And then display the order creation date through the "HTML version" by using the following code :
{VAR:ORDER_DATE}

2. For the user email, you'll find the "User id" through the "$data->order_user_id" variable, so you'll just have to retrieve your user email and then display it like I showed you through the point 1.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum