Zen Cart Logo
Forums / Addon Shipping Modules / Integrate ShipRush with TY Package Tracker

Integrate ShipRush with TY Package Tracker

Views: 1,746

Results 1 to 3 of 3
3 Sep 2012, 3:19 AM
#1
robophung avatar

robophung

New Zenner

Join Date:
Jan 2011
Posts:
66
Plugin Contributions:
0

Integrate ShipRush with TY Package Tracker

Here's a cool little code hack for those of you who happen to use ShipRush and TY Package Tracker for your zen-cart.

It simply inserts the Tracking number information that ShipRush automatically inserts in your customer's comments into the Tracking ID field for TY Package Tracker, so that it's no longer necessary to manually update the Tracking ID field after processing a label from ShipRush.

If you have successfully installed ShipRush, then you should have a file in the root of your store folder called "ShippingZZencart.php"

Look for this code:

		```

if(ZENCART_SHIPPED_STATUS_SET_TO_STATUS_3_DELIVERED==1)
{
$db->execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . $this->MakeSqlSafe($OrderNumber,1) . "', '3', now(), '0', '" . $this->MakeSqlSafe($comments). "')");

			//update order status
			 $db->execute(" update ".DB_PREFIX."orders set orders_status='3' where orders_id='". $this->MakeSqlSafe($OrderNumber,1) ."'");
		 } 
		 else
		 {
		 	
			if($current_order_status==1)
				$change_order_status=2;
			else if($current_order_status==2)
				$change_order_status=3;
			else
				$change_order_status=$current_order_status;
			
			 $db->execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
					  (orders_id, orders_status_id, date_added, customer_notified, comments)
					  values ('" . $this->MakeSqlSafe($OrderNumber,1) . "', '".$change_order_status."', now(), '0', '" . $this->MakeSqlSafe($comments). "')");
					  
			if($change_order_status!=$current_order_status)
			$db->execute(" update ".DB_PREFIX."orders set orders_status='$change_order_status' where orders_id='". $this->MakeSqlSafe($OrderNumber,1) ."'");


and replace with...


			```
if(ZENCART_SHIPPED_STATUS_SET_TO_STATUS_3_DELIVERED==1)
			{
				 $db->execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
						  (orders_id, orders_status_id, date_added, customer_notified, comments, track_id1)
						  values ('" . $this->MakeSqlSafe($OrderNumber,1) . "', '3', now(), '0', '" . $this->MakeSqlSafe($comments) . "', '" . $TrackingNumber . "')");
						  
				//update order status
				 $db->execute(" update ".DB_PREFIX."orders set orders_status='3' where orders_id='". $this->MakeSqlSafe($OrderNumber,1) ."'");
			 } 
			 else
			 {
			 	
				if($current_order_status==1)
					$change_order_status=2;
				else if($current_order_status==2)
					$change_order_status=3;
				else
					$change_order_status=$current_order_status;
				
				 $db->execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
						  (orders_id, orders_status_id, date_added, customer_notified, comments, track_id1)
						  values ('" . $this->MakeSqlSafe($OrderNumber,1) . "', '".$change_order_status."', now(), '0', '" . $this->MakeSqlSafe($comments) . "', '" . $TrackingNumber . "')");
						  
				if($change_order_status!=$current_order_status)
				$db->execute(" update ".DB_PREFIX."orders set orders_status='$change_order_status' where orders_id='". $this->MakeSqlSafe($OrderNumber,1) ."'");

WARNING:

Please take care to determine that your track_id1 field settings in your admin area corresponds to the version of ShipRush that you're currently using!

What I mean is that, for specifcally my store, i use Fedex ShipRush and have Fedex configured for Track_ID1 in the Ty Package Tracker configurations (located in admin -> Configuration -> Ty Package Tracker)

You have to make sure that field 1 in your admin settings for Ty Package Tracker corresponds to the shipping service that you use for ShipRush or else, the linking will be to the wrong tracking website for the tracking number.

16 Oct 2012, 7:57 PM
#2
meepy12 avatar

meepy12

New Zenner

Join Date:
Sep 2012
Posts:
38
Plugin Contributions:
0

Re: Integrate ShipRush with TY Package Tracker

hi

you seem knowledgeable about ty can you help?

I have version 1.5 zen cart and just installed ty package tracker.

Installed fine but when turned on in Admin->Tools->Layout Boxes, my website accent, other side boxes and features disappeared, so I turned the two files off. Is it possible to have the ty tracker on its own webpage and not as a side box on store front?

Ty tracker table shows in the sql data base under 'configuration group', but “Settings for Ty Package Tracker features” doesn’t show under admin/ configuration tab. Please let me know where can I configure the Ty Package Tracker features & layout when turned on?

Also how to install it on its own EZ page.

thanks

Meepy

11 Nov 2015, 9:14 PM
#3
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
969
Plugin Contributions:
0

Re: Integrate ShipRush with TY Package Tracker

your mod worked for fedex shiprush. now they have shiprush desktop, is there a way to make it work with that?