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

#   Tracking Number Custom Field not working

##

- **[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")**
- [![Urbinati's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31080.jpg)](/forum/user/31080-urbinati "View Urbinati's Profile") Topic Author
- [ Offline](/forum/user/31080-urbinati)

Less More

- Posts: 63
- Thank you received: 0
-
-
-
- [](http://www.dreamlordpress.it)
-

11 years 7 months ago [\#199166](#199166) by [Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")  *[Tracking Number Custom Field not working](/forum/33-customers/876482-tracking-number-custom-field-not-working#199166 "-- url of the page with the problem -- :   www.dreamlordpress.it  -- HikaShop version -- : 2-4-0 -- Joomla version -- : 3.4.1  Hi,  I created a custom field &quot;Tracking Number&quot; with column name &quot;tracking&#95;number&quot;, in the order table.  1) Added code to the order view but it doesn't show up.  2) Added code:  to the order status notification but all the line doesn't show up. It seams nothing I add to the HTML version of the mail do actually show up.  Thanks in advance, Nicola.")* was created by *[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")*

-- url of the page with the problem -- : [ www.dreamlordpress.it](http://www.dreamlordpress.it)
-- HikaShop version -- : 2-4-0
-- Joomla version -- : 3.4.1

Hi,

I created a custom field "Tracking Number" with column name "tracking_number", in the order table.

1) Added code Code:

&lt;?php echo $this-&gt;element-&gt;tracking_number; ?&gt;

to the order view but it doesn't show up.

2) Added code: Code:

&lt;?php if($data-&gt;mail_status == 'shipped'){ ?&gt;&lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;Tracciamento Spedizione: &lt;/span&gt; &lt;?php echo $this-&gt;element-&gt;tracking_number; } ?&gt;

to the order status notification but all the line doesn't show up.
It seams nothing I add to the HTML version of the mail do actually show up.

Thanks in advance,
Nicola.

---

Dreamlord Press
[ www.dreamlordpress.it](http://www.dreamlordpress.it)
Roleplaying Games in the new era

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

11 years 7 months ago [\#199193](#199193) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Tracking Number Custom Field not working](/forum/33-customers/876482-tracking-number-custom-field-not-working#199193 "-- url of the page with the problem -- :   www.dreamlordpress.it  -- HikaShop version -- : 2-4-0 -- Joomla version -- : 3.4.1  Hi,  I created a custom field &quot;Tracking Number&quot; with column name &quot;tracking&#95;number&quot;, in the order table.  1) Added code to the order view but it doesn't show up.  2) Added code:  to the order status notification but all the line doesn't show up. It seams nothing I add to the HTML version of the mail do actually show up.  Thanks in advance, Nicola.")*

Hi,

1. To which order view did you add that code exactly ? And where do you want to have the tracking code displayed exactly ?

2. In the order status notification, the "shipped" status is in the variable $data-&gt;order_status and the tracking code is in the variable:
$data-&gt;cart-&gt;tracking_number

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

- **[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")**
- [![Urbinati's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31080.jpg)](/forum/user/31080-urbinati "View Urbinati's Profile") Topic Author
- [ Offline](/forum/user/31080-urbinati)

Less More

- Posts: 63
- Thank you received: 0
-
-
-
- [](http://www.dreamlordpress.it)
-

11 years 7 months ago [\#199275](#199275) by [Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")  Replied by *[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")* on topic *[Tracking Number Custom Field not working](/forum/33-customers/876482-tracking-number-custom-field-not-working#199275 "-- url of the page with the problem -- :   www.dreamlordpress.it  -- HikaShop version -- : 2-4-0 -- Joomla version -- : 3.4.1  Hi,  I created a custom field &quot;Tracking Number&quot; with column name &quot;tracking&#95;number&quot;, in the order table.  1) Added code to the order view but it doesn't show up.  2) Added code:  to the order status notification but all the line doesn't show up. It seams nothing I add to the HTML version of the mail do actually show up.  Thanks in advance, Nicola.")*

Hi nicolas,

Thank you for the insigtht, but it still doesn't work.

Here's the code from the order status notification mail:
Code:

&lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} {VAR:order.shipping_tracking} &lt;?php if($data-&gt;order_status == 'shipped'){ ?&gt;&lt;span style="color:#1c8faf !important;font-size:12px;font-weight:bold;"&gt;Tracciamento Spedizione: &lt;/span&gt; &lt;?php echo $data-&gt;cart-&gt;tracking_number; } ?&gt; &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt;

I added the "if($data-&gt;order_status == 'shipped'){..." part, but it doesn't show when I open the mail popup in the order view in the administrazion panel, or the popup mail view when I change order status from order list in administration.
No Tracking Number, just "Tracciamento Spedizione" in the actual mail sent (the copy I receive as administrator).

In the front order view (order-&gt;view view, the one you open fron your user account to see a single order):
Code:

&lt;fieldset class="hikashop_order_custom_fields_fieldset"&gt; &lt;legend&gt;&lt;?php echo JText::_('ADDITIONAL_INFORMATION'); ?&gt;&lt;/legend&gt; &lt;table class="hikashop_order_custom_fields_table adminlist" cellpadding="1" width="100%"&gt; &lt;tr class="hikashop_order_custom_field_&lt;?php echo $fieldName;?&gt;_line"&gt; &lt;td class="key"&gt; Numero di Tracciamento : &lt;/td&gt; &lt;td&gt; &lt;?php echo $this-&gt;element-&gt;tracking_number; ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php foreach($this-&gt;fields['order'] as $fieldName =&gt; $oneExtraField) { if(!@$oneExtraField-&gt;field_frontcomp &#124;&#124; empty($this-&gt;order-&gt;$fieldName)) continue; ?&gt; &lt;tr class="hikashop_order_custom_field_&lt;?php echo $fieldName;?&gt;_line"&gt; &lt;td class="key"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/td&gt; &lt;td&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$this-&gt;order-&gt;$fieldName); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr class="hikashop_order_custom_field_&lt;?php echo $fieldName;?&gt;_line"&gt; &lt;td class="key"&gt; Numero di Tracciamento Raccomandata : &lt;/td&gt; &lt;td&gt; &lt;?php echo $data-&gt;cart-&gt;tracking_number; ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/table&gt; &lt;/fieldset&gt;

Here I added a line in the additional informations table. It shows "Numero di Tracciamento Raccomandata", AND the tracking number value.

So Everything works but the tracking number value in the notification mail.

Thanks!

---

Dreamlord Press
[ www.dreamlordpress.it](http://www.dreamlordpress.it)
Roleplaying Games in the new era

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 7 months ago [\#199288](#199288) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Tracking Number Custom Field not working](/forum/33-customers/876482-tracking-number-custom-field-not-working#199288 "-- url of the page with the problem -- :   www.dreamlordpress.it  -- HikaShop version -- : 2-4-0 -- Joomla version -- : 3.4.1  Hi,  I created a custom field &quot;Tracking Number&quot; with column name &quot;tracking&#95;number&quot;, in the order table.  1) Added code to the order view but it doesn't show up.  2) Added code:  to the order status notification but all the line doesn't show up. It seams nothing I add to the HTML version of the mail do actually show up.  Thanks in advance, Nicola.")*

Hello,
Regarding the tracking number value in the notification mail, the solution can firstly be to directly test and display the value of your tracking number custom field to know if it's correctly saved through the "$data-&gt;cart" variable.

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

- **[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")**
- [![Urbinati's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31080.jpg)](/forum/user/31080-urbinati "View Urbinati's Profile") Topic Author
- [ Offline](/forum/user/31080-urbinati)

Less More

- Posts: 63
- Thank you received: 0
-
-
-
- [](http://www.dreamlordpress.it)
-

11 years 6 months ago [\#202166](#202166) by [Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")  Replied by *[Urbinati](/forum/user/31080-urbinati "View Urbinati's Profile")* on topic *[Tracking Number Custom Field not working](/forum/33-customers/876482-tracking-number-custom-field-not-working#202166 "-- url of the page with the problem -- :   www.dreamlordpress.it  -- HikaShop version -- : 2-4-0 -- Joomla version -- : 3.4.1  Hi,  I created a custom field &quot;Tracking Number&quot; with column name &quot;tracking&#95;number&quot;, in the order table.  1) Added code to the order view but it doesn't show up.  2) Added code:  to the order status notification but all the line doesn't show up. It seams nothing I add to the HTML version of the mail do actually show up.  Thanks in advance, Nicola.")*

Hi,

Finally solved the problem, thank you all!

---

Dreamlord Press
[ www.dreamlordpress.it](http://www.dreamlordpress.it)
Roleplaying Games in the new era

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

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