My company is a fulfillment warehouse. One of our new customers is using Zen Cart, so it has fallen to me to write the integration scripts to take her orders and transmit them to our in-house systems. I installed a test Zen Cart on my own server to explore the database and develop the script(s), but have run into a major snag: Product variants in Zen Cart apparently cannot be assigned individual SKUs. Yikes.
Our warehouse management system requires every unique item description to have its own product id number (SKU).
I don't need to worry about supporting "text" or "file" option types, but I do need to find a way to assign a SKU to each possible combination of the others.
A script will be set to run every hour, look for any orders in the "Processing" status, write the details of each line item of each order to a file, update the status to "Delivered", and transmit the resulting file via FTP to our warehouse's server.
A line of PHP code that could generate a line for this file (after its variables are loaded and escaped, of course) might look similar to this:
Code:
echo “$orderid|$OrderDateTime|$BillName|$ToFirstName|$ToLastName|$ToAddressLine1|$ToAddressLine2|$ToCity|$ToState|$ToPostalCode|$ToCountry|$ToPhone|$ToEmail|$ProductUPC|$ProductDescription|$Quantity|$ShippingType|$CustomerNote\r\n”;
That $ProductUPC is going to be a special challenge when products with multiple options give rise to several variants that don't each have a UPC.
I know I'm not the first to run into this. I've seen mention of this challenge elsewhere in the forum, but I haven't seen any solutions.
Has anybody succeeded at something like this?
Thanks,
Wayne
Bookmarks