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

#   Add Community Builder custom field value to email

##

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

Less More

- Posts: 75
- Thank you received: 7
-
-

11 years 3 months ago [\#212071](#212071) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  *[Add Community Builder custom field value to email](/forum/35-orders-management/878866-add-community-builder-custom-field-value-to-email#212071 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.41 -- Browser(s) name and version -- : Chrome 44.0.2403.155  Hi all,  I'm not quite sure if this is entirely a Hikashop question.  We're using Hikashop Business Edition. We have Community Builder integration for the users.  We have a custom field for users to fill out, let's say it's &quot;Company&quot;.  In our email templates, how can I get the value of the &quot;Company&quot; field to appear in the subject line of the order emails.  Right now the &quot;NEW&#95;ORDER&#95;SUBJECT&quot; language constant is in place for the subject, but I'm not sure how to grab the value from the Community Builder custom field to add it there.  Is there a way for Hikashop to get the value of the custom field, or is this more of a Community Builder issue?")* was created by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.41
-- Browser(s) name and version -- : Chrome 44.0.2403.155

Hi all,

I'm not quite sure if this is entirely a Hikashop question.

We're using Hikashop Business Edition. We have Community Builder integration for the users.

We have a custom field for users to fill out, let's say it's "Company".

In our email templates, how can I get the value of the "Company" field to appear in the subject line of the order emails.

Right now the "NEW_ORDER_SUBJECT" language constant is in place for the subject, but I'm not sure how to grab the value from the Community Builder custom field to add it there.

Is there a way for Hikashop to get the value of the custom field, or is this more of a Community Builder issue?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3ODg2Ni1hZGQtY29tbXVuaXR5LWJ1aWxkZXItY3VzdG9tLWZpZWxkLXZhbHVlLXRvLWVtYWlsP3RtcGw9bWFya2Rvd24=) 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: 86587
- Thank you received: 14325
-
-

11 years 3 months ago [\#212124](#212124) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add Community Builder custom field value to email](/forum/35-orders-management/878866-add-community-builder-custom-field-value-to-email#212124 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.41 -- Browser(s) name and version -- : Chrome 44.0.2403.155  Hi all,  I'm not quite sure if this is entirely a Hikashop question.  We're using Hikashop Business Edition. We have Community Builder integration for the users.  We have a custom field for users to fill out, let's say it's &quot;Company&quot;.  In our email templates, how can I get the value of the &quot;Company&quot; field to appear in the subject line of the order emails.  Right now the &quot;NEW&#95;ORDER&#95;SUBJECT&quot; language constant is in place for the subject, but I'm not sure how to grab the value from the Community Builder custom field to add it there.  Is there a way for Hikashop to get the value of the custom field, or is this more of a Community Builder issue?")*

Hi,

The subject is generated with the line: Code:

$order-&gt;mail-&gt;subject = JText::sprintf('NEW_ORDER_SUBJECT',$order-&gt;order_number,HIKASHOP_LIVE);

in the file administrator/components/com_hikashop/classes/order.php
If you want to have other dynamic data in the subject, you'll have to modify that line of code.
If you want to have the company of the user in CB, you'll have to load that from the CB table where that is stored with a MySQL query.
The exact MySQL query would be something to ask to CB support.
Just note that you can get the user id in the variable: $order-&gt;customer-&gt;id
It will be useful in the MySQL query to CB.

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

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

Less More

- Posts: 75
- Thank you received: 7
-
-

11 years 3 months ago [\#212173](#212173) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Add Community Builder custom field value to email](/forum/35-orders-management/878866-add-community-builder-custom-field-value-to-email#212173 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.41 -- Browser(s) name and version -- : Chrome 44.0.2403.155  Hi all,  I'm not quite sure if this is entirely a Hikashop question.  We're using Hikashop Business Edition. We have Community Builder integration for the users.  We have a custom field for users to fill out, let's say it's &quot;Company&quot;.  In our email templates, how can I get the value of the &quot;Company&quot; field to appear in the subject line of the order emails.  Right now the &quot;NEW&#95;ORDER&#95;SUBJECT&quot; language constant is in place for the subject, but I'm not sure how to grab the value from the Community Builder custom field to add it there.  Is there a way for Hikashop to get the value of the custom field, or is this more of a Community Builder issue?")*

OK thanks, this puts me on the right track.

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