X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   General talk (https://forum.x-cart.com/forumdisplay.php?f=29)
-   -   Shipworks.com (https://forum.x-cart.com/showthread.php?t=60446)

Raptor 08-22-2016 11:42 AM

Re: Shipworks.com
Thanks for that

But now i'm getting incorrect username and password in shipworks - wtf ?

Raptor 08-22-2016 12:45 PM

Re: Shipworks.com
I fixed the user/pass issue by rolling back to the previous shipworks module ( - such a pain.

The table fix didn't solve. It didn't upload anything to the db - but not getting any sql error emails either.

Raptor 08-22-2016 01:14 PM

Re: Shipworks.com
I see the error. The order ID doesn't exist - it needs to ADD it

Raptor 08-22-2016 01:28 PM

Re: Shipworks.com
OK somewhat solved it - it adds all the tracking numbers correctly now - they show up in xcart correctly


db_query("update $sql_tbl[order_tracking_numbers] set tracking='$trackingNumber', orderid='$orderid'");

HOWEVER i now get sql error emails

SQL query : update xcart_order_tracking_numbers set tracking='11111111111111111111', orderid='12345'
Error code : 1062
Description : Duplicate entry '12345-11111111111111111111' for key 'PRIMARY'
Request URI: /admin/shipworks3new.php

elmirage001 08-22-2016 02:24 PM

Re: Shipworks.com
Do you get the error with a "New" order with a new 'orderid'?

Raptor 08-22-2016 02:27 PM

Re: Shipworks.com
It needs to be insert and not update.....

INSERT xcart_order_tracking_numbers (tracking, orderid)
VALUES (11111111111111111111,12345);

Raptor 08-22-2016 02:36 PM

Re: Shipworks.com

I fixed the problem. Line 250:

It needs to insert the values and not update as they are now stored in a separate table from the order – update won’t work as the values don’t exist. This will now also support multiple tracking numbers too.

This is for all X-Cart versions above 4.7

PHP Code:

db_query("INSERT $sql_tbl[order_tracking_numbers] (tracking, orderid) VALUES ('$trackingNumber',$orderid)"); 

elmirage001 08-22-2016 02:43 PM

Re: Shipworks.com

Originally Posted by Raptor

PHP Code:

db_query("INSERT $sql_tbl[order_tracking_numbers] (tracking, orderid) VALUES ($trackingNumber,$orderid)"); 

Thanks so much! I appreciate all your hard work! Paul

Raptor 08-22-2016 03:17 PM

Re: Shipworks.com
You can also add your Custom Order Status Codes if you have that module activated. It's easy to find the 2 digital code using something like Firebug

Around Line 258:

PHP Code:

// Returns the status codes supported by XCart
function action_GetStatusCodes()
$codes = array("B" => "Backordered",
"C" => "Complete",
"D" => "Declined",
"F" => "Failed",
"I" => "Not Finished",
"P" => "Processed",
"Q" => "Queued",
"T1" => "Refunded",
"V3" => "Canceled"); 

Raptor 08-22-2016 09:15 PM

Re: Shipworks.com
Also noticed after the upgrade, xcart puts a ton of tracking numbers as "0" in older orders. To easily get rid of all these just run the query

DELETE FROM `xcart_order_tracking_numbers` WHERE `xcart_order_tracking_numbers`.`tracking` = '0';

All times are GMT -8. The time now is 09:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.