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

#   Email format with custom fields aligned vertically (vs table row)

##

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

Less More

- Posts: 20
- Thank you received: 4
-
-

6 months 2 weeks ago [\#371487](#371487) by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile")  *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371487 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")* was created by *[posurreal](/forum/user/35847-posurreal "View posurreal's Profile")*

-- HikaShop version -- : 6.4.0
-- Joomla version -- : 6.0.3
-- PHP version -- : 8.3.30
-- Browser(s) name and version -- : Firefox 149.0.2
-- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.

Thank you in advance for your help. We soft-launched the [ wmrhill.com](https://wmrhill.com) site so we could work out any kinks.

Question: How can I adjust the email template so custom fields align vertically and not in a table row?

Is there an existing template that is more suitable to that scenario?

We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.

Cheers,
Mary Layman
marylayman09@gmail.com

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkxMDQ0NS1lbWFpbC1mb3JtYXQtd2l0aC1jdXN0b20tZmllbGRzLWFsaWduZWQtdmVydGljYWxseS12cy10YWJsZS1yb3c/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14269
-
-

6 months 2 weeks ago [\#371488](#371488) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371488 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")*

Hi,

Changing the template of the email won't help.
Could you provide a screenshot of the email so that we can better understand the situation ?

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

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

Less More

- Posts: 20
- Thank you received: 4
-
-

6 months 1 week ago [\#371501](#371501) by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile")  Replied by *[posurreal](/forum/user/35847-posurreal "View posurreal's Profile")* on topic *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371501 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")*

Thanks for looking into it.

[ ![ss-hikashop-custom-fields.PNG](/forum/attachment/63083) ](/forum/attachment/63083 "...tom-fields.PNG")

- [ ![ss-hikashop-custom-fields.PNG](/forum/attachment/63083) ](/forum/attachment/63083 "...tom-fields.PNG") [ ](/forum/attachment/63083?download=1 "...tom-fields.PNG")

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

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

Less More

- Posts: 20
- Thank you received: 4
-
-

6 months 1 week ago -  6 months 1 week ago [\#371502](#371502) by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile")  Replied by *[posurreal](/forum/user/35847-posurreal "View posurreal's Profile")* on topic *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371502 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")*

Please note we have different custom fields: Style, Mold Number, Color, Finish, Packed, Liners, Capacity. The screenshot only had a few showing based on the product. Other products have all of them.

Also, Quote Cart now goes to Plastic Containers.

Super admin area:
username: adminyaya
password: Sp@nky4Darla!q

Last edit: 6 months 1 week ago by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile"). Reason: found a different issue

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkxMDQ0NS1lbWFpbC1mb3JtYXQtd2l0aC1jdXN0b20tZmllbGRzLWFsaWduZWQtdmVydGljYWxseS12cy10YWJsZS1yb3c/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14269
-
-

6 months 1 week ago [\#371503](#371503) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371503 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")*

Hi,

The reason your email is getting cut off is that product custom fields are displayed as extra columns in the product table. With 6 or 7 custom fields, each one adds a column to the table, making it much wider than what email clients can display.

The solution is to move the custom fields from separate columns into the product name cell, so they display vertically below the product name instead. This requires editing two files for the email template: the HTML layout and the preload file.

Go to System &gt; Emails in the HikaShop backend, then click on "order_creation_notification" to edit it. You will see two sections: "HTML version" and "Preload". You need to change both.

In the "HTML version" section:
Find and remove this line in the table header:
{TXT:CUSTOMFIELD_NAME}
And remove this line in the product row:
{LINEVAR:CUSTOMFIELD_VALUE}

This removes the extra columns from the table. But you still need to display the custom fields somewhere. So in the "Preload" section, you will move them inside the product name.

In the "Preload" section:
Find the block that generates CUSTOMFIELD_VALUE (around line 200): Code:

$cartProduct['CUSTOMFIELD_VALUE'] = ''; if(!empty($fields) &amp;&amp; hikashop_level(1)){ foreach($fields as $field){ $namekey = $field-&gt;field_namekey; $productData = @$productClass-&gt;all_products[$item-&gt;product_id]; $field-&gt;currentElement = $productData; $cartProduct['CUSTOMFIELD_VALUE'] .= '&lt;td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right"&gt;'.(empty($productData-&gt;$namekey)?'':$fieldsClass-&gt;show($field,$productData-&gt;$namekey)).'&lt;/td&gt;'; } }

Replace it with: Code:

$cartProduct['CUSTOMFIELD_VALUE'] = ''; if(!empty($fields) &amp;&amp; hikashop_level(1)){ foreach($fields as $field){ $namekey = $field-&gt;field_namekey; $productData = @$productClass-&gt;all_products[$item-&gt;product_id]; $field-&gt;currentElement = $productData; if(!empty($productData-&gt;$namekey)){ $t .= '&lt;p style="margin:2px 0;font-size:11px;color:#555;"&gt;&lt;strong&gt;'.$fieldsClass-&gt;getFieldName($field).':&lt;/strong&gt; '.$fieldsClass-&gt;show($field,$productData-&gt;$namekey).'&lt;/p&gt;'; } } }

This appends each custom field as a "Label: Value" line below the product name, inside the same cell. Your table will then only have the 4 standard columns (Product Name, Price, Quantity, Total) and the custom field values will be listed vertically under each product name.

If you also use the order admin notification or order status notification or order notification emails, you will need to apply the same changes to those email templates as well.

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

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

Less More

- Posts: 20
- Thank you received: 4
-
-

6 months 3 days ago -  6 months 2 days ago [\#371659](#371659) by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile")  Replied by *[posurreal](/forum/user/35847-posurreal "View posurreal's Profile")* on topic *[Email format with custom fields aligned vertically (vs table row)](/forum/25-install-update/910445-email-format-with-custom-fields-aligned-vertically-vs-table-row#371659 "-- HikaShop version -- : 6.4.0 -- Joomla version -- : 6.0.3 -- PHP version -- : 8.3.30 -- Browser(s) name and version -- : Firefox 149.0.2 -- Error-message(debug-mod must be tuned on) -- : No error message. Email format question.  Thank you in advance for your help. We soft-launched the   wmrhill.com  site so we could work out any kinks.  Question: How can I adjust the email template so custom fields align vertically and not in a table row?  Is there an existing template that is more suitable to that scenario?  We are using about 6 custom fields for a quoting system, and some of those have more than one option (ie natural white or lug jar). So the email message is cutting off.  Cheers, Mary Layman")*

Hi Nicolas,

You are a javascript wizard!

Thank you for providing the replacements for email notifications. I realize it took a while to do.

I'm thankful to report that the email templates are looking good! I did not have much luck with the back end area for emails, but I found the location of the files, downloaded them, tweaked them, and uploaded again. I love how you established .modified in the file names. Clever when you upgrade Hikashop.

--- Overall ---
The client is really happy about the website! We've been updating the quality of the images since it was built over 8 years ago w/ Joomla 3, when phone or other device hardware was older.

Thank you,
Mary

---- PREVIOUS post was updated. ---

Last edit: 6 months 2 days ago by [posurreal](/forum/user/35847-posurreal "View posurreal's Profile").

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

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

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

[](#top)
