- Posts: 10
- Thank you received: 0
Eamil Customization
- bearingsnorth
-
Topic Author
- Offline
Less
More
12 years 6 months ago #150203
by bearingsnorth
Eamil Customization was created by bearingsnorth
Couple questions on customizing emails.
1. On email #14 (Market: Order status notification) I need to add a custom field. The custom field is in the vendor table, column name "acct_number". I've tried {VAR:vendor.acct_number} and {VAR:plg.hikamarket.vendor.acct_number} but no luck. (I've successfully added other custom fields from the order table (such as {VAR:order.gift_message}) but I can't get this one from the vendor table to work...)
2. How can I add that custom field to the email subject? I'd like the subject line to be something like "Purchase Order: ID (acct_number)-(order number)". Would prfer to do this without hacking any core...
3. I'd like to just reference the order number in the HTML. What's the field name?
Thanks much!
1. On email #14 (Market: Order status notification) I need to add a custom field. The custom field is in the vendor table, column name "acct_number". I've tried {VAR:vendor.acct_number} and {VAR:plg.hikamarket.vendor.acct_number} but no luck. (I've successfully added other custom fields from the order table (such as {VAR:order.gift_message}) but I can't get this one from the vendor table to work...)
2. How can I add that custom field to the email subject? I'd like the subject line to be something like "Purchase Order: ID (acct_number)-(order number)". Would prfer to do this without hacking any core...
3. I'd like to just reference the order number in the HTML. What's the field name?
Thanks much!
Please Log in or Create an account to join the conversation.
12 years 6 months ago - 12 years 6 months ago #150268
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Eamil Customization
Hi,
Adding vendor data in the email
Please edit the email "preloader" and replace the content
By
(this modification will be include in the next HikaMarket release).
Once the "vendor" variable created, you will be able to use a tag like {VAR:vendor.acct_number} to access to the "acct_number" custom field of the vendor.
Override of the email subject
To change the email subject, the best is to add some code in the preload part in order to create it dynamically.
You have to put your content in the variable
Accessing to the order number
The order_number is a field of the order object. You can access it through {VAR:order.order_number}
Regards,
Adding vendor data in the email
Please edit the email "preloader" and replace the content
Code:
$vars = array(
'LIVE_SITE' => HIKASHOP_LIVE,
'URL' => $order_url,
'ORDER_PRODUCT_CODE' => (bool)$shopConfig->get('show_product_code', false),
'order' => $data->cart,
'billing_address' => @$data->cart->billing_address,
'shipping_address' => @$data->cart->shipping_address,
);
Code:
$vars = array(
'LIVE_SITE' => HIKASHOP_LIVE,
'URL' => $order_url,
'ORDER_PRODUCT_CODE' => (bool)$shopConfig->get('show_product_code', false),
'order' => $data->cart,
'billing_address' => @$data->cart->billing_address,
'shipping_address' => @$data->cart->shipping_address,
'vendor' => $data->vendor
);
Once the "vendor" variable created, you will be able to use a tag like {VAR:vendor.acct_number} to access to the "acct_number" custom field of the vendor.
Override of the email subject
To change the email subject, the best is to add some code in the preload part in order to create it dynamically.
You have to put your content in the variable
Code:
$mail->subject = "Purchase Order: ID " . $vendor->acct_number . " - " . $data->order->order_number
Accessing to the order number
The order_number is a field of the order object. You can access it through {VAR:order.order_number}
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 12 years 6 months ago by Jerome.
The following user(s) said Thank You: bearingsnorth
Please Log in or Create an account to join the conversation.
- bearingsnorth
-
Topic Author
- Offline
Less
More
- Posts: 10
- Thank you received: 0
12 years 6 months ago #150298
by bearingsnorth
Replied by bearingsnorth on topic Eamil Customization
Awesome. Thanks so much for the quick, clear reply! Works great.
Please Log in or Create an account to join the conversation.
Time to create page: 0.150 seconds