i have try to manage inventory by attribute so i have did:
01. set inventory to be Manage Stock By Attributes.
02. product has 3 Attribute (2 dropdown list, one textbox) - and i have add Attribute combinations for size attribute only as
Attributes Stock quantity Allow out of stock Sku
Size: m 100 gghgh
Size: s 22 rtrt
Size: l 0 cxxcx
03. now when i try to add item with Size: l to cart - it accept it - and i dont get out of stock message ?! - i try to debug i see that in this method "GetStandardWarnings" in ShoppingCartService - in this line
var combination = _productAttributeParser.FindProductAttributeCombination(product, attributesXml);
always return null - and i don't know why ?
"ProductAttributeCombinations" : [
{
"_id" : "5d3a4457452e35465cee81a1",
"AttributesXml" : "<Attributes><ProductAttribute ID=\"5d3a3fdda758f453c0e1898d\"><ProductAttributeValue><Value>5d3a4058a758f453c0e19662</Value></ProductAttributeValue></ProductAttribute></Attributes>",
"StockQuantity" : NumberInt(100),
"AllowOutOfStockOrders" : false,
"Text" : null,
"Sku" : "gghgh",
"ManufacturerPartNumber" : null,
"Gtin" : null,
"OverriddenPrice" : null,
"NotifyAdminForQuantityBelow" : NumberInt(1),
"PictureId" : null,
"WarehouseInventory" : [
],
"TierPrices" : [
]
},
{
"_id" : "5d3a4469452e35465cee81fc",
"AttributesXml" : "<Attributes><ProductAttribute ID=\"5d3a3fdda758f453c0e1898d\"><ProductAttributeValue><Value>5d3a405ea758f453c0e19680</Value></ProductAttributeValue></ProductAttribute></Attributes>",
"StockQuantity" : NumberInt(22),
"AllowOutOfStockOrders" : false,
"Text" : null,
"Sku" : "rtrt",
"ManufacturerPartNumber" : null,
"Gtin" : null,
"OverriddenPrice" : null,
"NotifyAdminForQuantityBelow" : NumberInt(1),
"PictureId" : null,
"WarehouseInventory" : [
],
"TierPrices" : [
]
},
{
"_id" : "5d3a4483452e35465cee825c",
"AttributesXml" : "<Attributes><ProductAttribute ID=\"5d3a3fdda758f453c0e1898d\"><ProductAttributeValue><Value>5d3a407da758f453c0e1a2fe</Value></ProductAttributeValue></ProductAttribute></Attributes>",
"StockQuantity" : NumberInt(0),
"AllowOutOfStockOrders" : false,
"Text" : null,
"Sku" : "cxxcx",
"ManufacturerPartNumber" : null,
"Gtin" : null,
"OverriddenPrice" : null,
"NotifyAdminForQuantityBelow" : NumberInt(1),
"PictureId" : null,
"WarehouseInventory" : [
],
"TierPrices" : [
]
}
],
hop to get help plz ?