
Originally Posted by
michael_rebreathe
Sorry to not state what I considered obvious. Each Option Name has its own distinct ID, as does each Option Value. Out of the non-db-constrained unique fields, the only differences between the options is the option name and products_options.products_options_track_stock
Stock ID:
Capacity: Slim (2.5ml) Color: Clear Qty: 3
Capacity: Slim (2.5ml) Color: Black Qty: 8
Capacity: Slim (2.5ml) Color: Blue Qty: 7
Capacity: Slim (2.5ml) Color: Orange Qty: 12
Capacity: Slim (2.5ml) Color: Pink Qty: 4
Capacity: Large (5.0ml) Color: Clear Qty: 6
Capacity: Large (5.0ml) Color: Black Qty: 10
Capacity: Large (5.0ml) Color: Blue Qty: 7
Capacity: Large (5.0ml) Color: Orange Qty: 2
Capacity: Large (5.0ml) Color: Pink Qty: 6
Capacity is one Option with Slim and Large as options values
Color is the other option with Clear, Black, Blue, Orange and Pink as options values
We track all inventory by product for products with no attributes, Product AND attribute 1 for single-option products, and Product AND attribute 1 AND attribute 2 for two-option products. There's no product in our catalog where we stock by one attribute and can change the second attribute on-the-fly.
Each SKU is unique to the products_with_attributes_stock.stock_id (items with attributes) or products.products_id (items without attributes). We have an additional module we created, which creates SKUs for each stocked item, such as
A0832075009. This number is useless to the customer, and would be confusing or irritating, but is essential to fulfilling orders, since it is broken down as such:
A - Department (shelving Unit)
08 - Shelf number
32 - Slot Number *** These three data points give the picker the precise location of the item
07 - counter - Once we no longer stock an item, the stock location is available, so the next item put in the location receives the next number in sequence
50 - Value for the first attribute, such as 50 for 5.0 ml and 25 for 2.5ml
09 - Value for the second attribute *** Once the pickers are familiar with these last two fields, they provide a sanity check to ensure the item in-hand is the right size/color, etc.
Our SKU Module updates the products.products_model OR products_with_attributes_stock.customid with our SKU, depending on whether or not the item has attributes. Our module reads a number of other tables, but only updates these two fields, since Zen Cart/SBA already use them (mostly) how we want/need them to be used. The "mostly" is my question of whether Configuration => Stock => SBA Display Custom ID = false hides the customid on pick slips and invoices as well as the attribute selection dropdowns and shopping cart.
I've already considered deleting and recreating the SBA tracking for this problem child. If you'd like to see the symptom before I try to dump and recreate, PM me and I can get you inside the "down for maintenance" wall.
Bookmarks