shipping id's in order and order_data type L

In the db table ?:order_data type L it stores shipping info.



If an item has free shipping, then it doesn’t create any type L data. But then if you go and type in a tracking number, it does add the type L data. The thing is, the serialized data is an array with one element who’s index is some specific number.



In the case where there is shipping data from the order the index of that shipping data array is stored in shipping_ids in ?:order. That way when that data is pulled, the index is known.



Now when shipping information is added when shipping was free and there was no type L data created, then the shipping type L data is created, but the index for it is not stored in shipping_ids in ?:order

Is that a bug? Could the missing shippming_ids cause issues?



I need to know if there is anything special about this shipping_ids number, sometimes it’s usually 7 or 8. And if it matters at all. I tried changing it for an order where L type data was used, but I don’t think it did anything different.



It seems like shipping_ids can have multiple id’s in it for multiple shipping info, but I can’t determine when that would ever be used for anything. It seems if there were ever multiple shipments then it would use the shipments section and would have to be manually done by some admin. Perhaps that’s remnants of however the system could have had added functionality added to it before the shipments section was created.



I ask this because we are automating the insertion of tracking data into the users account via our FedEx Cafe system.

The index id is the id of the shipping method.

[quote name=‘phazei’]

It seems like shipping_ids can have multiple id’s in it for multiple shipping info, but I can’t determine when that would ever be used for anything. It seems if there were ever multiple shipments then it would use the shipments section and would have to be manually done by some admin. Perhaps that’s remnants of however the system could have had added functionality added to it before the shipments section was created.[/QUOTE]

You might have multiple shipping IDs when using the supplier addon - each supplier might have a different shipping method.



Bob

The order[‘shipping_ids’] array should be filled in with the shipping method (actually id of the shipping method) regardless of whether the shipping is free or not.



As stated above, multiple shipping_ids can happen with different suppliers.

Though it’s not if it is free shipping.

Hence:

[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=1865[/url]

[url]http://forum.cs-cart.com/vbugs.php?do=view&vbug_id=1696[/url]



I just told the product people here to never use ‘Free Shipping’ becuase then the tracking number won’t integrate since the shipping ID’s are missing and the L data isn’t created.

It is when free shipping is a function of a coupon code or catalog promotion.

I’m trying to update my tracking #'s via sql and I have a question, my entries in order_data look like this:


a:1:{
i:13;
a:4:{
s:8:"shipping";
s:10:"UPS Ground";
s:5:"rates";
a:1:{
i:0;i:0;
}
s:15:"tracking_number";
s:18:"1Z4784470300507635";
s:7:"carrier";
s:3:"UPS";
}
}
I think every one is s:18 in the database, which isn’t the shipping id. the shipping id’s are after the i: value on the 2nd line. So is it safe to just add the tracking number under a4 as



s:15:“tracking_number”;

s:18:“XXXXXXXXXXXXXXXXXX”;



?

You’re looking at the serialized instantiation of the data. Your shipping_id is 13 for this method. The 18 is the length of the string.



You’re going to have to extract these records via PHP, unserialize() them, update them, serialize() them and then write them back.



My advise is to NOT write directly to the DB. If you need someone to write you something that will read your tracking numbers from CSV and update your data, then hire someone to do so. Since you don’t understand serialized data, I think you’re going to shoot yourself in the foot.