Quote Originally Posted by mc12345678 View Post
Perhaps Chadster can help with the "format" or setup needed within the program, but looking at the Stock by Attributes table in my database (Table Prefix)products_with_attributes_stock, I have 5 columns:
Stock_id (This is used specifically to identify a unique item's stock),
products_id (Which ties back to the (Table Prefix)products table),
stock_attributes (Which identifies which one or more attributes are associated with the stock_id),
quantity (The total number of items that match the stock_attributes for this product_id and stock_id), and
sort (supposedly to be used to sort the particular stock_id when viewing the products_id, though I don't know if or when that is enforced).

So, perhaps the easiest way to implement this is to only be able to deal with existing items that have a stock_id and not to have to add a new one attribute to an item.

In my list, I have a number for a products_id, and one or more numbers in the stock_attributes, these numbers correspond back to the product itself (which to use this mod requires a model number) and a designated attribute (red, black, whatever you have chosen) that is listed in the (Table Prefix)products_attributes table. So, there are ties back to each of those attributes. By exporting the (table prefix)products_with_attributes_stock table substituting the applicable product name (or model number as desired/needed) and the applicable attribute, the user (you) can intelligently understand what product is being referenced. Include in that output the stock_id and the quantity as a minimum, then when importing the data, (going back to probably using the model number) with the stock_id in the downloaded data, the upload is quite easy because there is only one item in the table that has that stock_id; however, it may also be possible (less likely for a user to make an error) to use the model number and the associated attributes to find in the table the one row that has that product_id and only that one attribute combination (it is possible though not desired to have a product_id that has less attributes identified than those that would be sold, but I think that comes through attempting to incorrectly modify the number of attributes while adjusting quantities at the same time, ie. user error. :) )

That's the basic flow/thought process that I see, and although I have just yesterday tried to update a single item using the Full-EP file format, I did look through a bit of the main controller for EP 4 to see what I might need to do to ensure it worked. I would think that Chadster could identify the areas that would need to be worked in to add the above functionality.
Also take a look at a post I put up earlier on a different thread. It takes you to one of the other threads about one/two versions of SBA that are recognized out there. http://www.zen-cart.com/showthread.p...46#post1208146

I implemented the method I described and was able to create SQL that I could use/copy into the admin panel and update the table(s) with the desired information. It is dirty sort of like what you were referring to (using a reference table or something) and is somewhat the foundation to EP, but it also does not afford any type of real checks so would want to implement cautiously. (That means BACKUP, BACKUP, BACKUP and test/check after taking action.)