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

#   Tracking # custom field not working after update

##

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

Less More

- Posts: 128
- Thank you received: 3
-
-

10 years 7 months ago [\#235042](#235042) by [deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")  *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235042 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")* was created by *[deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.0
-- PHP version -- : 5.3.24

I have created a custom field for the order table for tracking numbers.

[ ![trackingnumber.png](/forum/attachment/30408) ](/forum/attachment/30408 "...kingnumber.png")

Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.5.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;style type="text/css"&gt; body.hikashop_mail { background-color:#ffffff; color:#000; } .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} div, p, a, li, td {-webkit-text-size-adjust:none;} @media (min-width:600px){ #hikashop_mail {width:600px !important;margin:auto !important;} .pict img {max-width:500px !important;height:auto !important;} } @media (max-width:330px){ #hikashop_mail{width:300px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 10px !important;} .pict img {max-width:278px; height:auto !important;} } @media (min-width:331px) and (max-width:480px){ #hikashop_mail{width:450px !important; margin:auto !important;} table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;} td[class="w49"] { width: 20px !important;} .pict img {max-width:408px; height:auto !important;} } h1{color:#000;font-size:16px;font-weight:normal;padding-bottom:10px;} h2{color:#000;font-size:14px;font-weight:normal;margin-top:20px;margin-bottom:5px;padding-bottom:4px;} a{cursor:pointer;color:#468852;text-decoration:none;border:none;} a:hover,a:focus{cursor:pointer;color:#468852;text-decoration:underline;border:none;} a:visited{cursor:pointer;color:#2d9cbb;text-decoration:none;border:none;} &lt;/style&gt; &lt;div id="hikashop_mail" style="font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;width:100%;background-color:#ffffff;padding-bottom:20px;color:#000;"&gt; &lt;!--{IF:USER_ACCOUNT}--&gt; &lt;div class="hikashop_online" style="font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:11px;line-height:18px;color:#000;text-decoration:none;margin:10px;text-align:center;"&gt; &lt;a style="cursor:pointer;color:#468852;text-decoration:none;border:none;" href="{VAR:URL}"&gt; &lt;span class="hikashop_online" style="color:#000;text-decoration:none;font-size:11px;margin-top:10px;margin-bottom:10px;text-align:center;"&gt; {TXT:MAIL_HEADER} &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;!--{ENDIF:USER_ACCOUNT}--&gt; &lt;table class="w600" style="font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;margin:auto;background-color:#ffffff;" border="0" cellspacing="0" cellpadding="0" width="600" align="center"&gt; &lt;tr&gt; &lt;td class="w600" style="" width="600" align="center"&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" style="text-align:left; color:#000" width="560"&gt; &lt;div id="title" style="font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;"&gt; &lt;img src="{VAR:LIVE_SITE}/templates/tntmunitions/images/TNTMunitionsLogo.png" border="0" alt="" style="float:left;margin-top:-20px;margin-right:10px;width:50px;"/&gt; &lt;h1 style="color:#000 !important;font-size:16px;font-weight:normal;padding-bottom:10px"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="border:1px solid #adadad;background-color:#ffffff;"&gt; &lt;div class="w550" width="550" id="content" style="font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;"&gt; &lt;p&gt; &lt;h3 style="color:#000 !important; font-size:14px; font-weight:normal;margin-bottom:0px;padding:0px;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; {TXT:ORDER_BEGIN_MESSAGE} &lt;/p&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550" style="margin-top:10px;font-family:Courier New, Monaco, Menlo, Consolas, monospace;font-size:12px;line-height:18px;"&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td style="color:#000 !important;font-size:12px;font-weight:normal;"&gt;{TXT:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td style="color:#000 !important;font-size:12px;font-weight:normal;"&gt;{TXT:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt;&lt;td&gt;{VAR:BILLING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt;&lt;!--{IF:SHIPPING_ADDRESS}--&gt;&lt;td&gt;{VAR:SHIPPING_ADDRESS}&lt;/td&gt;&lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt;&lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt; &lt;span style="color:#000 !important;font-size:12px;font-weight:normal; padding-bottom:10px"&gt;{TXT:ORDER_CHANGED}&lt;/span&gt; &lt;/p&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;p&gt; &lt;span style="color:#000 !important;font-size:12px;font-weight:normal;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="color:#000 !important;font-size:12px;font-weight:normal;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;p&gt; &lt;span style="color:#000 !important;font-size:12px;font-weight:normal;"&gt;Your tracking numbers are :&lt;/span&gt; {VAR:TRACKING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="color:#000 !important;font-size:16px;font-weight:normal;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style="border-bottom:1px solid #ddd;padding-bottom:10px;"&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt;

Here is my text version
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.5.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php echo JText::sprintf('HI_CUSTOMER',@$data-&gt;customer-&gt;name)."\n"."\n";?&gt; &lt;?php $url = $data-&gt;order_number; $config =&amp; hikashop_config(); if($config-&gt;get('simplified_registration',0)!=2){ $url .= "\n".'( '.$data-&gt;order_url.' )'."\n"; } if(!empty($data-&gt;usermsg-&gt;usermsg)){ echo $data-&gt;usermsg-&gt;usermsg; }else{ echo JText::sprintf('ORDER_STATUS_CHANGED_TO',$url,$data-&gt;mail_status).'\r\n'; } if($data-&gt;mail_status == "shipped" &amp;&amp; !empty($data-&gt;trackingnumber)) { echo 'Your tracking numbers are '.str_replace(",",", ",$data-&gt;trackingnumber).'.\r\n'; } echo "\n"."\n"; ?&gt; &lt;?php echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE)."\n"."\n"."\n";?&gt; &lt;?php echo str_replace('&lt;br/&gt;',"\n",JText::sprintf('BEST_REGARDS_CUSTOMER',$mail-&gt;from_name.' Team'));?&gt;

and here is the preload
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.5.0 * @author hikashop.com * @copyright (C) 2010-2015 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $app = JFactory::getApplication(); $config = hikashop_config(); $orderClass = hikashop_get('class.order'); $imageHelper = hikashop_get('helper.image'); $productClass = hikashop_get('class.product'); $fieldsClass = hikashop_get('class.field'); if(hikashop_level(2)) { $null = null; $itemFields = $fieldsClass-&gt;getFields('frontcomp',$null,'item'); } global $Itemid; $url_itemid = ''; if(!empty($Itemid)) { $url_itemid = '&amp;Itemid=' . $Itemid; } if(isset($data-&gt;url_itemid)) { $url_itemid = (!empty($data-&gt;url_itemid) ? '&amp;Itemid=':'') . $data-&gt;url_itemid; } $order_url = $data-&gt;order_url; $mail_status = $data-&gt;mail_status; $customer = $data-&gt;customer; if(!isset($data-&gt;order)) $data-&gt;order = new stdClass(); $fs = array('order_number','order_discount_tax','order_shipping_tax','order_full_price','order_shipping_price','order_payment_price','order_discount_price','order_currency_id','order_status'); foreach($fs as $f) { if(isset($data-&gt;$f) &amp;&amp; !isset($data-&gt;order-&gt;$f)) $data-&gt;order-&gt;$f = $data-&gt;$f; } $url = $data-&gt;order-&gt;order_number; $data-&gt;order-&gt;order_url = $order_url; if(!empty($customer-&gt;user_cms_id) &amp;&amp; (int)$customer-&gt;user_cms_id != 0) { $url = '&lt;a href="'.$order_url.'"&gt;'. $url.'&lt;/a&gt;'; } $data-&gt;cart = $orderClass-&gt;loadFullOrder($data-&gt;order_id,true,false); $data-&gt;cart-&gt;coupon = new stdClass(); $price = new stdClass(); $tax = $data-&gt;cart-&gt;order_subtotal - $data-&gt;cart-&gt;order_subtotal_no_vat - $data-&gt;cart-&gt;order_discount_tax + $data-&gt;cart-&gt;order_shipping_tax; $price-&gt;price_value = $data-&gt;cart-&gt;order_full_price - $tax; $price-&gt;price_value_with_tax = $data-&gt;cart-&gt;order_full_price; $data-&gt;cart-&gt;full_total = new stdClass; $data-&gt;cart-&gt;full_total-&gt;prices = array($price); $data-&gt;cart-&gt;coupon-&gt;discount_value =&amp; $data-&gt;cart-&gt;order_discount_price; if($app-&gt;isAdmin()) { $view = 'order'; } else { $view = 'address'; } $colspan = 4; $customer_name = @$customer-&gt;name; if(empty($customer_name)) $customer_name = @$data-&gt;cart-&gt;billing_address-&gt;address_firstname.' '.@$data-&gt;cart-&gt;billing_address-&gt;address_lastname; $vars = array( 'LIVE_SITE' =&gt; HIKASHOP_LIVE, 'URL' =&gt; $order_url, 'ORDER_PRODUCT_CODE' =&gt; (bool)$config-&gt;get('show_code', false), 'order' =&gt; $data-&gt;cart, 'user' =&gt; $customer, 'billing_address' =&gt; @$data-&gt;cart-&gt;billing_address, 'shipping_address' =&gt; @$data-&gt;cart-&gt;shipping_address, ); $texts = array( 'BILLING_ADDRESS' =&gt; JText::_('HIKASHOP_BILLING_ADDRESS'), 'SHIPPING_ADDRESS' =&gt; JText::_('HIKASHOP_SHIPPING_ADDRESS'), 'SUMMARY_OF_YOUR_ORDER' =&gt; JText::_('SUMMARY_OF_YOUR_ORDER'), 'MAIL_HEADER' =&gt; JText::_('HIKASHOP_MAIL_HEADER'), 'USER_ACCOUNT' =&gt; (bool)@$customer-&gt;user_cms_id, 'PRODUCT_NAME' =&gt; JText::_('CART_PRODUCT_NAME'), 'PRODUCT_CODE' =&gt; JText::_('CART_PRODUCT_CODE'), 'PRODUCT_PRICE' =&gt; JText::_('CART_PRODUCT_UNIT_PRICE'), 'PRODUCT_QUANTITY' =&gt; JText::_('CART_PRODUCT_QUANTITY'), 'PRODUCT_TOTAL' =&gt; JText::_('HIKASHOP_TOTAL'), 'ADDITIONAL_INFORMATION' =&gt; JText::_('ADDITIONAL_INFORMATION'), 'ORDER_TITLE' =&gt; JText::_('YOUR_ORDER'), 'HI_CUSTOMER' =&gt; JText::sprintf('HI_CUSTOMER', $customer_name), 'ORDER_CHANGED' =&gt; JText::sprintf('ORDER_STATUS_CHANGED_TO', $url, $data-&gt;mail_status), 'ORDER_BEGIN_MESSAGE' =&gt; JText::sprintf('THANK_YOU_FOR_YOUR_ORDER_BEGIN', HIKASHOP_LIVE), 'ORDER_END_MESSAGE' =&gt; JText::sprintf('THANK_YOU_FOR_YOUR_ORDER', HIKASHOP_LIVE) . '&lt;br/&gt;' . JText::sprintf('BEST_REGARDS_CUSTOMER',$mail-&gt;from_name.' Team'), ); if(!empty($data-&gt;usermsg-&gt;usermsg)){ $texts['ORDER_CHANGED'] = $data-&gt;usermsg-&gt;usermsg; } $templates = array(); $products_ids = array(); foreach($data-&gt;cart-&gt;products as $item) { $products_ids[] = $item-&gt;product_id; } $productClass-&gt;getProducts($products_ids); $cartProducts = array(); $cartFooters = array(); { $group = $config-&gt;get('group_options',0); $subtotal = 0; foreach($data-&gt;cart-&gt;products as $item) { if($group &amp;&amp; $item-&gt;order_product_option_parent_id) continue; $product = @$productClass-&gt;all_products[$item-&gt;product_id]; $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTITY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, ); if(!empty($item-&gt;images[0]-&gt;file_path) &amp;&amp; $config-&gt;get('thumbnail', 1) != 0) { $img = $imageHelper-&gt;getThumbnail($item-&gt;images[0]-&gt;file_path, array(50, 50), array('forcesize' =&gt; true, 'scale' =&gt; 'outside')); if($img-&gt;success) { if(substr($img-&gt;url, 0, 3) == '../') $image = str_replace('../', HIKASHOP_LIVE, $img-&gt;url); else $image = substr(HIKASHOP_LIVE, 0, strpos(HIKASHOP_LIVE, '/', 9)) . $img-&gt;url; $cartProduct['PRODUCT_IMG'] = '&lt;img src="'.$image.'" alt="" style="float:left;margin-top:3px;margin-bottom:3px;margin-right:6px;"/&gt;'; } } $t = '&lt;p&gt;' . $item-&gt;order_product_name; if($group){ $display_item_price=false; foreach($data-&gt;cart-&gt;products as $j =&gt; $optionElement){ if($optionElement-&gt;order_product_option_parent_id != $item-&gt;order_product_id) continue; if($optionElement-&gt;order_product_price&gt;0){ $display_item_price = true; } } if($display_item_price){ if($config-&gt;get('price_with_tax')){ $t .= ' '.$currencyHelper-&gt;format($item-&gt;order_product_price+$item-&gt;order_product_tax,$data-&gt;cart-&gt;order_currency_id); }else{ $t .= ' '.$currencyHelper-&gt;format($item-&gt;order_product_price,$data-&gt;cart-&gt;order_currency_id); } } } $t .= '&lt;/p&gt;'; if(!empty($itemFields)){ foreach($itemFields as $field){ $namekey = $field-&gt;field_namekey; if(!isset($item-&gt;$namekey) &#124;&#124; (empty($item-&gt;$namekey) &amp;&amp; !strlen($item-&gt;$namekey))) continue; $t .= '&lt;p&gt;'.$fieldsClass-&gt;getFieldName($field).': '.$fieldsClass-&gt;show($field,$item-&gt;$namekey,'user_email').'&lt;/p&gt;'; } } if($group){ foreach($data-&gt;cart-&gt;products as $j =&gt; $optionElement){ if($optionElement-&gt;order_product_option_parent_id != $item-&gt;order_product_id) continue; $item-&gt;order_product_price +=$optionElement-&gt;order_product_price; $item-&gt;order_product_tax +=$optionElement-&gt;order_product_tax; $item-&gt;order_product_total_price+=$optionElement-&gt;order_product_total_price; $item-&gt;order_product_total_price_no_vat+=$optionElement-&gt;order_product_total_price_no_vat; $t .= '&lt;p class="hikashop_order_option_name"&gt;' . $optionElement-&gt;order_product_name; if($optionElement-&gt;order_product_price&gt;0){ if($config-&gt;get('price_with_tax')){ $t .= ' ( + '.$currencyHelper-&gt;format($optionElement-&gt;order_product_price+$optionElement-&gt;order_product_tax,$data-&gt;cart-&gt;order_currency_id).' )'; }else{ $t .= ' ( + '.$currencyHelper-&gt;format($optionElement-&gt;order_product_price,$data-&gt;cart-&gt;order_currency_id).' )'; } } $t .= '&lt;/p&gt;'; } } $cartProduct['PRODUCT_NAME'] = $t; $t = ''; $statusDownload = explode(',',$config-&gt;get('order_status_for_download','confirmed,shipped')); if(!empty($item-&gt;files) &amp;&amp; in_array($data-&gt;order-&gt;order_status,$statusDownload)){ $t .= '&lt;p&gt;'; foreach($item-&gt;files as $file){ $fileName = empty($file-&gt;file_name) ? $file-&gt;file_path : $file-&gt;file_name; $file_pos = empty($file-&gt;file_pos) ? '' : ('&amp;file_pos=' . $file-&gt;file_pos); if(empty($customer-&gt;user_cms_id)) $file_pos .= '&amp;email=' . $customer-&gt;user_email; $oid = $data-&gt;order_id; if(!empty($data-&gt;cart-&gt;order_parent_id)) $oid = $data-&gt;cart-&gt;order_parent_id; $t .= '&lt;a href="'.hikashop_frontendLink('index.php?option=com_hikashop&amp;ctrl=order&amp;task=download&amp;file_id='.$file-&gt;file_id.'&amp;order_id='.$oid.$file_pos.$url_itemid).'"&gt;'.$fileName.'&lt;/a&gt;&lt;br/&gt;'; } $t .= '&lt;/p&gt;'; } $cartProduct['PRODUCT_DOWNLOAD'] = $t; if($config-&gt;get('price_with_tax')){ $unit_price = $currencyHelper-&gt;format($item-&gt;order_product_price+$item-&gt;order_product_tax,$data-&gt;cart-&gt;order_currency_id); $total_price = $currencyHelper-&gt;format($item-&gt;order_product_total_price,$data-&gt;cart-&gt;order_currency_id); $subtotal += $item-&gt;order_product_total_price; }else{ $unit_price = $currencyHelper-&gt;format($item-&gt;order_product_price,$data-&gt;cart-&gt;order_currency_id); $total_price = $currencyHelper-&gt;format($item-&gt;order_product_total_price_no_vat,$data-&gt;cart-&gt;order_currency_id); $subtotal += $item-&gt;order_product_total_price_no_vat; } $cartProduct['PRODUCT_PRICE'] = $unit_price; $cartProduct['PRODUCT_TOTAL'] = $total_price; $cartProducts[] = $cartProduct; } $templates['PRODUCT_LINE'] = $cartProducts; if(bccomp($data-&gt;cart-&gt;order_discount_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_shipping_price,0,5) &#124;&#124; bccomp($data-&gt;cart-&gt;order_payment_price,0,5) &#124;&#124; ($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax) &#124;&#124; !empty($data-&gt;cart-&gt;additional)){ $cartFooters[] = array( 'NAME' =&gt; JText::_('SUBTOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($subtotal,$data-&gt;cart-&gt;order_currency_id) ); } if(bccomp($data-&gt;cart-&gt;order_discount_price,0,5)) { if($config-&gt;get('price_with_tax')) { $t = $currencyHelper-&gt;format($data-&gt;cart-&gt;order_discount_price*-1,$data-&gt;cart-&gt;order_currency_id); }else{ $t = $currencyHelper-&gt;format(($data-&gt;cart-&gt;order_discount_price-@$data-&gt;cart-&gt;order_discount_tax)*-1,$data-&gt;cart-&gt;order_currency_id); } $cartFooters[] = array( 'NAME' =&gt; JText::_('HIKASHOP_COUPON'), 'VALUE' =&gt; $t ); } if(bccomp($data-&gt;cart-&gt;order_shipping_price,0,5)){ if($config-&gt;get('price_with_tax')) { $t = $currencyHelper-&gt;format($data-&gt;cart-&gt;order_shipping_price,$data-&gt;cart-&gt;order_currency_id); }else{ $t = $currencyHelper-&gt;format($data-&gt;cart-&gt;order_shipping_price-@$data-&gt;cart-&gt;order_shipping_tax,$data-&gt;cart-&gt;order_currency_id); } $cartFooters[] = array( 'NAME' =&gt; JText::_('HIKASHOP_SHIPPING'), 'VALUE' =&gt; $t ); } if(bccomp($data-&gt;cart-&gt;order_payment_price,0,5)){ $cartFooters[] = array( 'NAME' =&gt; JText::_('HIKASHOP_PAYMENT'), 'VALUE' =&gt; $currencyHelper-&gt;format($data-&gt;cart-&gt;order_payment_price,$data-&gt;cart-&gt;order_currency_id) ); } if(!empty($data-&gt;cart-&gt;additional)) { $exclude_additionnal = explode(',', $config-&gt;get('order_additional_hide', '')); foreach($data-&gt;cart-&gt;additional as $additional) { if(in_array($additional-&gt;order_product_name, $exclude_additionnal)) continue; if(!empty($additional-&gt;order_product_price) &#124;&#124; empty($additional-&gt;order_product_options)) { if($config-&gt;get('price_with_tax')){ $t = $currencyHelper-&gt;format($additional-&gt;order_product_price + @$additional-&gt;order_product_tax, $data-&gt;cart-&gt;order_currency_id); }else{ $t = $currencyHelper-&gt;format($additional-&gt;order_product_price, $data-&gt;cart-&gt;order_currency_id); } } else { $t = $additional-&gt;order_product_options; } $cartFooters[] = array( 'NAME' =&gt; JText::_($additional-&gt;order_product_name), 'VALUE' =&gt; $t ); } } if($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax) { if($config-&gt;get('detailed_tax_display') &amp;&amp; !empty($data-&gt;cart-&gt;order_tax_info)) { foreach($data-&gt;cart-&gt;order_tax_info as $tax) { $cartFooters[] = array( 'NAME' =&gt; $tax-&gt;tax_namekey, 'VALUE' =&gt; $currencyHelper-&gt;format($tax-&gt;tax_amount,$data-&gt;cart-&gt;order_currency_id) ); } } else { $cartFooters[] = array( 'NAME' =&gt; JText::_('ORDER_TOTAL_WITHOUT_VAT'), 'VALUE' =&gt; $currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value,$data-&gt;cart-&gt;order_currency_id) ); } $cartFooters[] = array( 'NAME' =&gt; JText::_('ORDER_TOTAL_WITH_VAT'), 'VALUE' =&gt; $currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,$data-&gt;cart-&gt;order_currency_id) ); } else { $cartFooters[] = array( 'NAME' =&gt; JText::_('HIKASHOP_TOTAL'), 'VALUE' =&gt; $currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,$data-&gt;cart-&gt;order_currency_id) ); } $templates['ORDER_FOOTER'] = $cartFooters; } if(!empty($data-&gt;cart-&gt;order_payment_method)) { if(!is_numeric($data-&gt;cart-&gt;order_payment_id)){ $vars['PAYMENT'] = $data-&gt;cart-&gt;order_payment_method.' '.$data-&gt;cart-&gt;order_payment_id; }else{ $paymentClass = hikashop_get('class.payment'); $payment = $paymentClass-&gt;get($data-&gt;cart-&gt;order_payment_id); $vars['PAYMENT'] = $payment-&gt;payment_name; unset($paymentClass); } } if(!empty($data-&gt;cart-&gt;order_shipping_id)) { $shippingClass = hikashop_get('class.shipping'); if(!empty($data-&gt;cart-&gt;order_shipping_method)) { if(!is_numeric($data-&gt;cart-&gt;order_shipping_id)){ $shipping_name = $shippingClass-&gt;getShippingName($data-&gt;cart-&gt;order_shipping_method, $data-&gt;cart-&gt;order_shipping_id); $vars['SHIPPING'] = $shipping_name; $vars['SHIPPING_TXT'] = $vars['SHIPPING']; }else{ $shipping = $shippingClass-&gt;get($data-&gt;cart-&gt;order_shipping_id); $vars['SHIPPING'] = $shipping-&gt;shipping_name; $vars['SHIPPING_TXT'] = $vars['SHIPPING']; } } else { $shippings_data = array(); $shipping_ids = explode(';', $data-&gt;cart-&gt;order_shipping_id); $shippingClass = hikashop_get('class.shipping'); foreach($shipping_ids as $key) { $shipping_data = ''; list($k, $w) = explode('@', $key); $shipping_id = $k; if(isset($data-&gt;cart-&gt;shippings[$shipping_id])) { $shipping = $data-&gt;cart-&gt;shippings[$shipping_id]; $shipping_data = $shipping-&gt;shipping_name; } else { foreach($data-&gt;cart-&gt;products as $order_product) { if($order_product-&gt;order_product_shipping_id == $key) { if(!is_numeric($order_product-&gt;order_product_shipping_id)){ $shipping_name = $shippingClass-&gt;getShippingName($order_product-&gt;order_product_shipping_method, $shipping_id); $shipping_data = $shipping_name; }else{ $shipping_method_data = $shippingClass-&gt;get($shipping_id); $shipping_data = $shipping_method_data-&gt;shipping_name; } break; } } if(empty($shipping_data)) $shipping_data = '[ ' . $key . ' ]'; } if(isset($data-&gt;cart-&gt;order_shipping_params-&gt;prices[$key])) { $price_params = $data-&gt;cart-&gt;order_shipping_params-&gt;prices[$key]; if($config-&gt;get('price_with_tax')){ $shipping_data .= ' (' . $currencyHelper-&gt;format($price_params-&gt;price_with_tax, $data-&gt;cart-&gt;order_currency_id) . ')'; }else{ $shipping_data .= ' (' . $currencyHelper-&gt;format($price_params-&gt;price_with_tax - @$price_params-&gt;tax, $data-&gt;cart-&gt;order_currency_id) . ')'; } } $shippings_data[] = $shipping_data; } if(!empty($shippings_data)) { $vars['SHIPPING'] = '&lt;ul&gt;&lt;li&gt;'.implode('&lt;/li&gt;&lt;li&gt;', $shippings_data).'&lt;/li&gt;&lt;/ul&gt;'; $vars['SHIPPING_TXT'] = ' - ' . implode("\r\n - ", $shippings_data); $tracking_link = array(); $tracking = array(); foreach($shippings_data as $ship_method){ if(strpos($ship_method,'FedEx') !== false){ $tracking_link['FedEx']='&lt;a href="http://www.fedex.com/Tracking?action=track&amp;tracknumbers='; } if(strpos($ship_method,'UPS') !== false){ $tracking_link['UPS']='&lt;a href="http://wwwapps.ups.com/WebTracking/track?track=yes&amp;trackNums='; } if(strpos($ship_method,'USPS') !== false){ $tracking_link['USPS']='&lt;a href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='; } } if(!empty($data-&gt;trackingnumber)){ $tracking_number = explode(',',$data-&gt;trackingnumber); foreach($tracking_number as $value){ if(strlen($value) &lt;= 14){ $tracking['FedEx']=$value; } if(substr($value,0,2) === '1Z' &amp;&amp; strlen($value) &lt;= 18){ $tracking['UPS']=$value; } if(substr($value,0,1) === '9' &amp;&amp; strlen($value) &lt;= 22){ $tracking['USPS']=$value; } } $tracking=array_combine(array_intersect_key($tracking_link,$tracking),array_intersect_key($tracking,$tracking_link)); $vars['TRACKING'] = '&lt;ul&gt;'; $vars['TRACKING_TXT'] = ''; foreach($tracking as $key=&gt;$value){ $vars['TRACKING'] .= '&lt;li&gt;'.$key.$value.'"&gt;'.$value.'&lt;/a&gt;'; $vars['TRACKING_TXT'] .= '- '.$value.'\r\n'; } $vars['TRACKING'] .= '&lt;/ul&gt;'; } } } unset($shippingClass); } else { $vars['SHIPPING'] = ''; } ob_start(); $sep = ''; if(hikashop_level(2)) { $fields = $fieldsClass-&gt;getFields('frontcomp',$data,'order',''); foreach($fields as $fieldName =&gt; $oneExtraField) { if(isset($data-&gt;$fieldName) &amp;&amp; !isset($data-&gt;cart-&gt;$fieldName)) $data-&gt;cart-&gt;$fieldName = $data-&gt;$fieldName; 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,'user_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); $vars['BILLING_ADDRESS'] = ''; $vars['SHIPPING_ADDRESS'] = ''; $addressClass = hikashop_get('class.address'); if(!empty($data-&gt;cart-&gt;billing_address) &amp;&amp; !empty($data-&gt;cart-&gt;fields)){ $vars['BILLING_ADDRESS'] = $addressClass-&gt;displayAddress($data-&gt;cart-&gt;fields,$data-&gt;cart-&gt;billing_address,$view); } if(!empty($data-&gt;cart-&gt;override_shipping_address)) { $vars['SHIPPING_ADDRESS'] = $data-&gt;cart-&gt;override_shipping_address; } elseif(!empty($data-&gt;order_shipping_id) &amp;&amp; !empty($data-&gt;cart-&gt;shipping_address) &amp;&amp; !empty($data-&gt;cart-&gt;fields)) { $vars['SHIPPING_ADDRESS'] = $addressClass-&gt;displayAddress($data-&gt;cart-&gt;fields,$data-&gt;cart-&gt;shipping_address,$view); } else { $vars['SHIPPING_ADDRESS'] = $vars['BILLING_ADDRESS']; }

I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?

- [ ![trackingnumber.png](/forum/attachment/30408) ](/forum/attachment/30408 "...kingnumber.png") [ ](/forum/attachment/30408?download=1 "...kingnumber.png")

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

10 years 7 months ago [\#235171](#235171) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235171 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Hi,

I would say that you should use $data-&gt;cart-&gt;trackingnumber instead of $data-&gt;trackingnumber
Because it's highly possible that $data-&gt;trackingnumber is empty.
The variables in $data comes from the data that is being saved by your action on the order. But $data-&gt;cart comes from the data stored in the database for your order.
So if you're not currently saving the tracking number in the database, the variable won't be in $data but it will be in $data-&gt;cart.

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

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

Less More

- Posts: 128
- Thank you received: 3
-
-

10 years 7 months ago [\#235181](#235181) by [deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")  Replied by *[deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235181 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Hey nicolas,
I tried $data-&gt;cart-&gt;trackingnumber but still nothing. I looked at my database tables. After, I create my shipment and get my tracking number I edit the appropriate order in the backend and enter my tracking number into the text field. I noticed that it is being stored in the hikashop_order table. What I can't understand is why this worked perfect before I updated hikashop and joomla and now nothing.

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

10 years 7 months ago [\#235208](#235208) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235208 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Hi,

Do you still have the column of the custom field in the hikashop_order table ?
So after you edit the field and enter the tracking code and save, you don't see it in the details of your order ?

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

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

Less More

- Posts: 128
- Thank you received: 3
-
-

10 years 7 months ago [\#235269](#235269) by [deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")  Replied by *[deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235269 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Yes the custom field is still in my table and yes it does save the number in the backend after i edit it and i can see the changes

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

10 years 7 months ago [\#235270](#235270) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235270 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Then, if the column name of the custom field is trackingnumber and that the value is stored in that column of hikashop_order in the database, the code using $data-&gt;cart-&gt;trackingnumber should definitely find it.
So the problem must be somewhere else. But I guess it will require debugging the custom code added to the preload to find out the root of the issue.

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

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

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

Less More

- Posts: 128
- Thank you received: 3
-
-

10 years 7 months ago [\#235355](#235355) by [deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")  Replied by *[deuce4884](/forum/user/38332-deuce4884 "View deuce4884's Profile")* on topic *[Tracking # custom field not working after update](/forum/30-integrations/883530-tracking-custom-field-not-working-after-update#235355 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.5.0 -- PHP version -- : 5.3.24  I have created a custom field for the order table for tracking numbers.  Once I had an item ready to ship I would take the tracking number and edit the appropriate order in the back end by adding the tracking number into the field. I then had my order status notification email where it would add this tracking number when the status was shipped. Here is my html version of the email  Here is my text version  and here is the preload  I just updated hikashop and now the html version is not working properly. In the preload you can see near the bottom of the code I have where it builds links for the tracking number based on the format to show in the html version. I've tried a UPS number and a USPS number and for some reason since I updated hikashop this is not working anymore. There just nothing there where it is supposed to be (the {VAR:TRACKING} in the html version). What's changed here?")*

Finally, figured out what was going on with this. I had only set up this code in the condition that there was multiple shipping methods selected and that was all I had tested before so, when I tested an order where there was only one shipping method it wasn't working. I ended up having the following code
Code:

$tracking_link = array(); $tracking = array(); if(!empty($data-&gt;cart-&gt;order_shipping_id)) { $shippingClass = hikashop_get('class.shipping'); if(!empty($data-&gt;cart-&gt;order_shipping_method)) { if(!is_numeric($data-&gt;cart-&gt;order_shipping_id)){ $shipping_name = $shippingClass-&gt;getShippingName($data-&gt;cart-&gt;order_shipping_method, $data-&gt;cart-&gt;order_shipping_id); $vars['SHIPPING'] = $shipping_name; $vars['SHIPPING_TXT'] = $vars['SHIPPING']; if(strpos($shipping_name,'FedEx') !== false){ $tracking_link['FedEx']='&lt;a href="http://www.fedex.com/Tracking?action=track&amp;tracknumbers='; } if(strpos($shipping_name,'UPS') !== false){ $tracking_link['UPS']='&lt;a href="http://wwwapps.ups.com/WebTracking/track?track=yes&amp;trackNums='; } if(strpos($shipping_name,'USPS') !== false){ $tracking_link['USPS']='&lt;a href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='; } if(!empty($data-&gt;cart-&gt;trackingnumber)){ $tracking_number = explode(',',$data-&gt;cart-&gt;trackingnumber); foreach($tracking_number as $value){ if(strlen($value) &lt;= 14){ $tracking['FedEx']=$value; } if(substr($value,0,2) === '1Z' &amp;&amp; strlen($value) &lt;= 18){ $tracking['UPS']=$value; } if(substr($value,0,1) === '9' &amp;&amp; strlen($value) &lt;= 22){ $tracking['USPS']=$value; } } $tracking_array=array_combine(array_intersect_key($tracking_link,$tracking),array_intersect_key($tracking,$tracking_link)); $vars['SHIPPING'] .= '&lt;p&gt;Your tracking numbers are:&lt;/p&gt;&lt;ul&gt;'; foreach($tracking_array as $key=&gt;$value){ $vars['SHIPPING'] .= '&lt;li&gt;'.$key.$value.'"&gt;'.$value.'&lt;/a&gt;'; } $vars['SHIPPING'] .= '&lt;/ul&gt;'; } }else{ $shipping = $shippingClass-&gt;get($data-&gt;cart-&gt;order_shipping_id); $vars['SHIPPING'] = $shipping-&gt;shipping_name; $vars['SHIPPING_TXT'] = $vars['SHIPPING']; if(strpos($shipping-&gt;shipping_name,'FedEx') !== false){ $tracking_link['FedEx']='&lt;a href="http://www.fedex.com/Tracking?action=track&amp;tracknumbers='; } if(strpos($shipping-&gt;shipping_name,'UPS') !== false){ $tracking_link['UPS']='&lt;a href="http://wwwapps.ups.com/WebTracking/track?track=yes&amp;trackNums='; } if(strpos($shipping-&gt;shipping_name,'USPS') !== false){ $tracking_link['USPS']='&lt;a href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='; } if(!empty($data-&gt;cart-&gt;trackingnumber)){ $tracking_number = explode(',',$data-&gt;cart-&gt;trackingnumber); foreach($tracking_number as $value){ if(strlen($value) &lt;= 14){ $tracking['FedEx']=$value; } if(substr($value,0,2) === '1Z' &amp;&amp; strlen($value) &lt;= 18){ $tracking['UPS']=$value; } if(substr($value,0,1) === '9' &amp;&amp; strlen($value) &lt;= 22){ $tracking['USPS']=$value; } } $tracking_array=array_combine(array_intersect_key($tracking_link,$tracking),array_intersect_key($tracking,$tracking_link)); $vars['SHIPPING'] .= '&lt;p&gt;Your tracking numbers are:&lt;/p&gt;&lt;ul&gt;'; foreach($tracking_array as $key=&gt;$value){ $vars['SHIPPING'] .= '&lt;li&gt;'.$key.$value.'"&gt;'.$value.'&lt;/a&gt;'; } $vars['SHIPPING'] .= '&lt;/ul&gt;'; } } } else { $shippings_data = array(); $shipping_ids = explode(';', $data-&gt;cart-&gt;order_shipping_id); $shippingClass = hikashop_get('class.shipping'); foreach($shipping_ids as $key) { $shipping_data = ''; list($k, $w) = explode('@', $key); $shipping_id = $k; if(isset($data-&gt;cart-&gt;shippings[$shipping_id])) { $shipping = $data-&gt;cart-&gt;shippings[$shipping_id]; $shipping_data = $shipping-&gt;shipping_name; } else { foreach($data-&gt;cart-&gt;products as $order_product) { if($order_product-&gt;order_product_shipping_id == $key) { if(!is_numeric($order_product-&gt;order_product_shipping_id)){ $shipping_name = $shippingClass-&gt;getShippingName($order_product-&gt;order_product_shipping_method, $shipping_id); $shipping_data = $shipping_name; }else{ $shipping_method_data = $shippingClass-&gt;get($shipping_id); $shipping_data = $shipping_method_data-&gt;shipping_name; } break; } } if(empty($shipping_data)) $shipping_data = '[ ' . $key . ' ]'; } if(isset($data-&gt;cart-&gt;order_shipping_params-&gt;prices[$key])) { $price_params = $data-&gt;cart-&gt;order_shipping_params-&gt;prices[$key]; if($config-&gt;get('price_with_tax')){ $shipping_data .= ' (' . $currencyHelper-&gt;format($price_params-&gt;price_with_tax, $data-&gt;cart-&gt;order_currency_id) . ')'; }else{ $shipping_data .= ' (' . $currencyHelper-&gt;format($price_params-&gt;price_with_tax - @$price_params-&gt;tax, $data-&gt;cart-&gt;order_currency_id) . ')'; } } $shippings_data[] = $shipping_data; } if(!empty($shippings_data)) { $vars['SHIPPING'] = '&lt;ul&gt;&lt;li&gt;'.implode('&lt;/li&gt;&lt;li&gt;', $shippings_data).'&lt;/li&gt;&lt;/ul&gt;'; $vars['SHIPPING_TXT'] = ' - ' . implode("\r\n - ", $shippings_data); foreach($shippings_data as $ship_method){ if(strpos($ship_method,'FedEx') !== false){ $tracking_link['FedEx']='&lt;a href="http://www.fedex.com/Tracking?action=track&amp;tracknumbers='; } if(strpos($ship_method,'UPS') !== false){ $tracking_link['UPS']='&lt;a href="http://wwwapps.ups.com/WebTracking/track?track=yes&amp;trackNums='; } if(strpos($ship_method,'USPS') !== false){ $tracking_link['USPS']='&lt;a href="https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='; } } if(!empty($data-&gt;cart-&gt;trackingnumber)){ $tracking_number = explode(',',$data-&gt;cart-&gt;trackingnumber); foreach($tracking_number as $value){ if(strlen($value) &lt;= 14){ $tracking['FedEx']=$value; } if(substr($value,0,2) === '1Z' &amp;&amp; strlen($value) &lt;= 18){ $tracking['UPS']=$value; } if(substr($value,0,1) === '9' &amp;&amp; strlen($value) &lt;= 22){ $tracking['USPS']=$value; } } $tracking_array=array_combine(array_intersect_key($tracking_link,$tracking),array_intersect_key($tracking,$tracking_link)); $vars['SHIPPING'] .= '&lt;p&gt;Your tracking numbers are:&lt;/p&gt;&lt;ul&gt;'; foreach($tracking_array as $key=&gt;$value){ $vars['SHIPPING'] .= '&lt;li&gt;'.$key.$value.'"&gt;'.$value.'&lt;/a&gt;'; } $vars['SHIPPING'] .= '&lt;/ul&gt;'; } } } unset($shippingClass); } else { $vars['SHIPPING'] = ''; }

Thanks for all your help on this issue. Just a dumb mistake on my part

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

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