Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Location
    California
    Posts
    2
    Plugin Contributions
    0

    Default How do I assign unique SKUs to product variants/attributes?

    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

  2. #2
    Join Date
    Jan 2004
    Posts
    65,288
    Blog Entries
    7
    Plugin Contributions
    227

    Default Re: How do I assign unique SKUs to product variants/attributes?

    Might try out one of the Stock By Attribute plugins: Go to the Plugins area and search for "stock by attributes"
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2013
    Location
    California
    Posts
    2
    Plugin Contributions
    0

    Default Re: How do I assign unique SKUs to product variants/attributes?

    That is commonly suggested when this question has come up in the forums, and it seems like a natural thing for that plug in to do, but for whatever reason it seems not to.

    Aside from that, I need to make this integration as non-intrusive as possible so that future customers who are also on Zen Cart will be able to use it as well. I can't necessarily ask that everybody installs a particular plug in.

    I think what I'm going to have to do is add a table outside ZC and write a script that cycles through all the attributes of all the products periodically and populates that table with all the possible combinations. Then my script will look at each products_id and see if it appears in that table. If not, it will use products.products_model, but if so then it will use the appropriate model number from that external table. (Which also means building my own interface to manage the model numbers in that table.)

    This all seems very kludgy. If anybody has a better solution, I'd sure love to hear it. :)

  4. #4
    Join Date
    Jan 2004
    Posts
    65,288
    Blog Entries
    7
    Plugin Contributions
    227

    Default Re: How do I assign unique SKUs to product variants/attributes?

    If you're going to write something bespoke, I suggest at least storing the data in a format that's already common to popular mods. That'll certainly reduce the barrier-to-entry for others who might consider your services.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v150 How to assign unique account numbers OR usernames?
    By FourX in forum Managing Customers and Orders
    Replies: 14
    Last Post: 7 Sep 2012, 02:41 AM
  2. Possible to set unique SKUs for product variants?
    By drs051 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 15 May 2012, 06:23 PM
  3. Product Attributes = different SKUs?!?!
    By grimmy2016 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Dec 2008, 09:12 AM
  4. How do I assign attributes to attributes of a product?
    By stargre in forum General Questions
    Replies: 2
    Last Post: 20 May 2008, 12:01 PM
  5. Unique SKUs for each product variation
    By moltar in forum General Questions
    Replies: 7
    Last Post: 29 May 2007, 03:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR