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

#   Show ShipStation Tracking Number in Order History

##

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

Less More

- Posts: 303
- Thank you received: 18
-
-

7 years 8 months ago [\#304650](#304650) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  *[Show ShipStation Tracking Number in Order History](/forum/30-integrations/897089-show-shipstation-tracking-number-in-order-history#304650 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Shipstation is sending the shipping number to the order history page.  How would i go about including the tracking number in order listing page in the customer cPanel? The idea would be for the customer to go to order listing in cPanel, click the tracking number and go to the carrier page with tracking info (or modal).")* was created by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")*

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.9.3
-- PHP version -- : 7.2

Shipstation is sending the shipping number to the order history page.

[ ![2019-03-1208&#95;43&#95;59-&#95;Newdocument1-Inkscape.jpg](/forum/attachment/46330) ](/forum/attachment/46330 "...1-Inkscape.jpg")

How would i go about including the tracking number in order listing page in the customer cPanel? The idea would be for the customer to go to order listing in cPanel, click the tracking number and go to the carrier page with tracking info (or modal).

- [ ![2019-03-1208&#95;43&#95;59-&#95;Newdocument1-Inkscape.jpg](/forum/attachment/46330) ](/forum/attachment/46330 "...1-Inkscape.jpg") [ ](/forum/attachment/46330?download=1 "...1-Inkscape.jpg")

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

7 years 8 months ago [\#304652](#304652) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show ShipStation Tracking Number in Order History](/forum/30-integrations/897089-show-shipstation-tracking-number-in-order-history#304652 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Shipstation is sending the shipping number to the order history page.  How would i go about including the tracking number in order listing page in the customer cPanel? The idea would be for the customer to go to order listing in cPanel, click the tracking number and go to the carrier page with tracking info (or modal).")*

HI,

In the cpanel_orders.php view file, that you can edit via the menu Display&gt;Views, you would have to run a MySQL query to load the data from the hikashop_history table for the order based on $order-&gt;order_id.

We'll look at doing something on our end to be able to add that in the future. Thanks for the idea.

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

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

Less More

- Posts: 303
- Thank you received: 18
-
-

7 years 8 months ago [\#304811](#304811) by [mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")  Replied by *[mojooutdoors-holden](/forum/user/12526-mojooutdoors-holden "View mojooutdoors-holden's Profile")* on topic *[Show ShipStation Tracking Number in Order History](/forum/30-integrations/897089-show-shipstation-tracking-number-in-order-history#304811 "-- HikaShop version -- : 3.5.1 -- Joomla version -- : 3.9.3 -- PHP version -- : 7.2  Shipstation is sending the shipping number to the order history page.  How would i go about including the tracking number in order listing page in the customer cPanel? The idea would be for the customer to go to order listing in cPanel, click the tracking number and go to the carrier page with tracking info (or modal).")*

This is probably not the most elegant solution, but it returns the tracking number, carrier and links to the respective carrier tracking page:
Code:

&lt;?php // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db-&gt;getQuery(true); $query-&gt;select($db-&gt;quoteName(array('history_data'))); $query-&gt;from($db-&gt;quoteName('jml_hikashop_history')); $query-&gt;where($db-&gt;quoteName('history_order_id') . ' = '. $db-&gt;quote($row-&gt;order_id)); $query-&gt;where($db-&gt;quoteName('history_new_status') . ' = '. $db-&gt;quote('shipped')); // Reset the query using our newly populated query object. $db-&gt;setQuery($query); // Load the results as a list of stdClass objects (see later for more options on retrieving data). $row = $db-&gt;loadAssoc(); // print_r($row['history_data']); $shipdata = explode('::', $row['history_data']); if ($shipdata[0] == 'USPS') { $track_url = 'https://tools.usps.com/go/TrackConfirmAction?tLabels=' . $shipdata[2];} elseif ($shipdata[0] == 'Fedex'){ $track_url = 'http://www.fedex.com/Tracking?action=track&amp;tracknumbers=' . $shipdata[2];} if($shipdata[2]){ echo '&lt;span class=""&gt; ' . $shipdata[1] . '&lt;br/&gt; Tracking Number: ' . '&lt;a href="' . $track_url . '" target="_blank"&gt; ' . $shipdata[2] . '&lt;/a&gt;&lt;/span&gt;'; } ?&gt;

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

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

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