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

#   Email Custom Field Formatting

##

- **[twhcreations](/forum/user/3186-twhcreations "View twhcreations's Profile")**
- [![twhcreations's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar3186.png)](/forum/user/3186-twhcreations "View twhcreations's Profile") Topic Author
- [ Offline](/forum/user/3186-twhcreations)

Less More

- Posts: 127
- Thank you received: 8
-
-
- [](http://www.webtechplus.com.au)
-

10 years 6 months ago [\#239765](#239765) by [twhcreations](/forum/user/3186-twhcreations "View twhcreations's Profile")  *[Email Custom Field Formatting](/forum/35-orders-management/884439-email-custom-field-formatting#239765 "-- HikaShop version -- : HikaShop Business: 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 7.0.5 -- Browser(s) name and version -- : Firefox 46.0.1  Hi,  I have a client who wants to alter the format of the custom fields in their notification email (admin). I'd like to be able to edit the label and positioning of the custom fields, currently from what i can gather, it appears that all the custom fields are being inserted into the email in a single variable:   {VAR:ORDER&#95;SUMMARY}   This content is formatting as a single paragraph. We would like to breakup these fields and add spacing.  Where can we modify the php that is generating this content? is it accessible though display-&gt;views? Is there a list that outlines these variables, and is it possible to manually enter the custom fields that get put into the email?  Cheers")* was created by *[twhcreations](/forum/user/3186-twhcreations "View twhcreations's Profile")*

-- HikaShop version -- : HikaShop Business: 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 7.0.5
-- Browser(s) name and version -- : Firefox 46.0.1

Hi,

I have a client who wants to alter the format of the custom fields in their notification email (admin).
I'd like to be able to edit the label and positioning of the custom fields, currently from what i can gather, it appears that all the custom fields are being inserted into the email in a single variable:

&lt;p style="border-bottom:1px solid #7D7D7D;padding-bottom:10px;font-size:16px;"&gt;
{VAR:ORDER_SUMMARY}
&lt;/p&gt;

This content is formatting as a single paragraph. We would like to breakup these fields and add spacing.

Where can we modify the php that is generating this content? is it accessible though display-&gt;views?
Is there a list that outlines these variables, and is it possible to manually enter the custom fields that get put into the email?

Cheers

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

10 years 6 months ago [\#239782](#239782) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Email Custom Field Formatting](/forum/35-orders-management/884439-email-custom-field-formatting#239782 "-- HikaShop version -- : HikaShop Business: 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 7.0.5 -- Browser(s) name and version -- : Firefox 46.0.1  Hi,  I have a client who wants to alter the format of the custom fields in their notification email (admin). I'd like to be able to edit the label and positioning of the custom fields, currently from what i can gather, it appears that all the custom fields are being inserted into the email in a single variable:   {VAR:ORDER&#95;SUMMARY}   This content is formatting as a single paragraph. We would like to breakup these fields and add spacing.  Where can we modify the php that is generating this content? is it accessible though display-&gt;views? Is there a list that outlines these variables, and is it possible to manually enter the custom fields that get put into the email?  Cheers")*

Hi,

When you edit the email, at the bottom of the screen you have the "preload" area which is where you'll find all the PHP code which initialize the tags that are used in the HTML version.
So that's where you want to look.
It's this code: Code:

ob_start(); $sep = ''; if(hikashop_level(2)) { $fields = $fieldsClass-&gt;getFields('display:field_order_admin_notification=1',$data,'order',''); foreach($fields as $fieldName =&gt; $oneExtraField) { if(empty($data-&gt;cart-&gt;$fieldName)) continue; echo $sep . $fieldsClass-&gt;trans($oneExtraField-&gt;field_realname).' : '.$fieldsClass-&gt;show($oneExtraField, $data-&gt;cart-&gt;$fieldName,'admin_email'); $sep = '&lt;br /&gt;'; } } JPluginHelper::importPlugin('hikashop'); $dispatcher = JDispatcher::getInstance(); $dispatcher-&gt;trigger('onAfterOrderProductsListingDisplay', array(&amp;$data-&gt;cart, 'email_notification_html')); $content = ob_get_clean(); $vars['ORDER_SUMMARY'] = trim($content);

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4NDQzOS1lbWFpbC1jdXN0b20tZmllbGQtZm9ybWF0dGluZz90bXBsPW1hcmtkb3du) 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.057 seconds

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