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

#   add variable from custom field in shipping e-mail

##

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

Less More

- Posts: 17
- Thank you received: 0
-
-

10 years 4 months ago [\#243608](#243608) by [Bram](/forum/user/39943-bram "View Bram's Profile")  *[add variable from custom field in shipping e-mail](/forum/27-checkout/885189-add-variable-from-custom-field-in-shipping-e-mail#243608 "-- url of the page with the problem -- :   www.hiphey.be  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5  Hello,  I would like your help again. I have created a custom field in the back-end where the admin can enter a tracking number.  I can get the tracking number to show itself on the e-mail by using {VAR:order.tracking}  Now i want it to be in a clickable link. The code to display it on the e-mail works. But i wanted to add the link to the post company so that the customer only would have to click the link to see the tracking info directly.  I have been able to show the link itself using this code in the preload part:  and this code in the pre load part  What i see on the mail is the url but whit out the variable tracking number that the admin can enter in the backend.  The tracking code field was created using the custom fields in the hikashop menu.  Can anybode tell me how to display the tracking number inside of the link.  Kind regards  Bram")* was created by *[Bram](/forum/user/39943-bram "View Bram's Profile")*

-- url of the page with the problem -- : [ www.hiphey.be](http://www.hiphey.be)
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5

Hello,

I would like your help again.
I have created a custom field in the back-end where the admin can enter a tracking number.

I can get the tracking number to show itself on the e-mail by using {VAR:order.tracking}

Now i want it to be in a clickable link. The code to display it on the e-mail works.
But i wanted to add the link to the post company so that the customer only would have to click the link to see the tracking info directly.

I have been able to show the link itself using this code in the preload part: Code:

$url_Tracking = $data-&gt;order_tracking -&gt;$data-&gt;cart-&gt;order_tracking; if(!empty($customer-&gt;user_cms_id) &amp;&amp; (int)$customer-&gt;user_cms_id != 0) { $url_Tracking = '&lt;a style= "color: #FFFFFF; " href="http://track.bpost.be/etr/light/performSearch.do?oss_language=NL&amp;searchByItemCode=true&amp;itemCodes='.$url_Tracking.'"&gt;Tracking code:'.$url_Tracking.'&lt;/a&gt;'; }

and this code in the pre load part Code:

'TRACKING_CODE' =&gt; JText::sprintf($url_Tracking),

What i see on the mail is the url but whit out the variable tracking number that the admin can enter in the backend.

The tracking code field was created using the custom fields in the hikashop menu.

Can anybode tell me how to display the tracking number inside of the link.

Kind regards

Bram

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NTE4OS1hZGQtdmFyaWFibGUtZnJvbS1jdXN0b20tZmllbGQtaW4tc2hpcHBpbmctZS1tYWlsP3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 4 months ago [\#243617](#243617) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[add variable from custom field in shipping e-mail](/forum/27-checkout/885189-add-variable-from-custom-field-in-shipping-e-mail#243617 "-- url of the page with the problem -- :   www.hiphey.be  -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5  Hello,  I would like your help again. I have created a custom field in the back-end where the admin can enter a tracking number.  I can get the tracking number to show itself on the e-mail by using {VAR:order.tracking}  Now i want it to be in a clickable link. The code to display it on the e-mail works. But i wanted to add the link to the post company so that the customer only would have to click the link to see the tracking info directly.  I have been able to show the link itself using this code in the preload part:  and this code in the pre load part  What i see on the mail is the url but whit out the variable tracking number that the admin can enter in the backend.  The tracking code field was created using the custom fields in the hikashop menu.  Can anybode tell me how to display the tracking number inside of the link.  Kind regards  Bram")*

That line is wrong:
$url_Tracking = $data-&gt;order_tracking -&gt;$data-&gt;cart-&gt;order_tracking;

If the tag {VAR:order.tracking} works, then the code should be:
$url_Tracking = $data-&gt;cart-&gt;tracking;

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

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