I'm attempting to re-write the Inventory control under Manage > Inventory - our client wants to update stock levels and price from this point, as well as ordering on Sku and searching on the same field..
Does the original inventory control actually work? Does it allow the administrator to update the stock levels for variants??
Admin Inventory control
Re: Admin Inventory control
Yes you can update variant stock.
Re: Admin Inventory control
Mazhar,
I can see that the "out-of-the-box" inventory control works..
But in building a bespoke version, I'm unsure of the relationship between ac_ProductVariants (esp. in relation to the values in Option1 -
and ac_OptionChoices..
In the ac_ProductVAriants some products seem to have two records (same ProductId, different ProductVariantIds) even though there are 3 or more variants associated with the product, while other products have the same number of records as variants associated with the product.
Any ideas??
I can see that the "out-of-the-box" inventory control works..
But in building a bespoke version, I'm unsure of the relationship between ac_ProductVariants (esp. in relation to the values in Option1 -

In the ac_ProductVAriants some products seem to have two records (same ProductId, different ProductVariantIds) even though there are 3 or more variants associated with the product, while other products have the same number of records as variants associated with the product.
Any ideas??
Re: Admin Inventory control
Does this look to be along the right lines for integration with the inventory control??
NB. binds a gridview
NB. binds a gridview
Code: Select all
SELECT t.ProductId, s.ProductVariantId, t.Name, t.Price, t.Sku, t.InStock, t.InStockWarningLevel, t.InventoryModeId, s.InStock AS VariantInStock,
s.InStockWarningLevel AS VariantStockWarningLevel, ac_OptionChoices.Name AS VariantName, s.InStock AS VariantInStock,
s.InStockWarningLevel AS VariantStockWarningLevel
FROM ac_Products AS t LEFT OUTER JOIN
ac_ProductVariants AS s INNER JOIN
ac_ProductOptions ON s.ProductId = ac_ProductOptions.ProductId INNER JOIN
ac_OptionChoices ON ac_ProductOptions.OptionId = ac_OptionChoices.OptionId ON t.ProductId = s.ProductId