[Skip to main content](#vessel-content)

#   Eamil Customization

##

- **[bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")**
- [![bearingsnorth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile") Topic Author
- [ Offline](/forum/user/31023-bearingsnorth)

Less More

- Posts: 10
- Thank you received: 0
-
-

12 years 7 months ago [\#150203](#150203) by [bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")  *[Eamil Customization](/forum/35-orders-management/867043-eamil-customization#150203 "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 &quot;acct&#95;number&quot;. I've tried {VAR:vendor.acct&#95;number} and {VAR:plg.hikamarket.vendor.acct&#95;number} but no luck. (I've successfully added other custom fields from the order table (such as {VAR:order.gift&#95;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 &quot;Purchase Order: ID (acct&#95;number)-(order number)&quot;. 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!")* was created by *[bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")*

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!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2NzA0My1lYW1pbC1jdXN0b21pemF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 7 months ago -  12 years 7 months ago [\#150268](#150268) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Eamil Customization](/forum/35-orders-management/867043-eamil-customization#150268 "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 &quot;acct&#95;number&quot;. I've tried {VAR:vendor.acct&#95;number} and {VAR:plg.hikamarket.vendor.acct&#95;number} but no luck. (I've successfully added other custom fields from the order table (such as {VAR:order.gift&#95;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 &quot;Purchase Order: ID (acct&#95;number)-(order number)&quot;. 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!")*

Hi,

**Adding vendor data in the email**
Please edit the email "preloader" and replace the content Code:

$vars = array( 'LIVE_SITE' =&gt; HIKASHOP_LIVE, 'URL' =&gt; $order_url, 'ORDER_PRODUCT_CODE' =&gt; (bool)$shopConfig-&gt;get('show_product_code', false), 'order' =&gt; $data-&gt;cart, 'billing_address' =&gt; @$data-&gt;cart-&gt;billing_address, 'shipping_address' =&gt; @$data-&gt;cart-&gt;shipping_address, );

By Code:

$vars = array( 'LIVE_SITE' =&gt; HIKASHOP_LIVE, 'URL' =&gt; $order_url, 'ORDER_PRODUCT_CODE' =&gt; (bool)$shopConfig-&gt;get('show_product_code', false), 'order' =&gt; $data-&gt;cart, 'billing_address' =&gt; @$data-&gt;cart-&gt;billing_address, 'shipping_address' =&gt; @$data-&gt;cart-&gt;shipping_address, 'vendor' =&gt; $data-&gt;vendor );

(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 Code:

$mail-&gt;subject = "Purchase Order: ID " . $vendor-&gt;acct_number . " - " . $data-&gt;order-&gt;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 &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 12 years 7 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

The following user(s) said Thank You: [bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2NzA0My1lYW1pbC1jdXN0b21pemF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")**
- [![bearingsnorth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile") Topic Author
- [ Offline](/forum/user/31023-bearingsnorth)

Less More

- Posts: 10
- Thank you received: 0
-
-

12 years 7 months ago [\#150298](#150298) by [bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")  Replied by *[bearingsnorth](/forum/user/31023-bearingsnorth "View bearingsnorth's Profile")* on topic *[Eamil Customization](/forum/35-orders-management/867043-eamil-customization#150298 "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 &quot;acct&#95;number&quot;. I've tried {VAR:vendor.acct&#95;number} and {VAR:plg.hikamarket.vendor.acct&#95;number} but no luck. (I've successfully added other custom fields from the order table (such as {VAR:order.gift&#95;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 &quot;Purchase Order: ID (acct&#95;number)-(order number)&quot;. 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!")*

Awesome. Thanks so much for the quick, clear reply! Works great.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg2NzA0My1lYW1pbC1jdXN0b21pemF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
