Closed deathgore closed 2 months ago
Hi @deathgore. I don't quite understand the problem you describe. The attributesXml parameter at the input has this format
<Attributes>
<ProductAttribute ID="9">
<ProductAttributeValue>
<Value>21</Value>
</ProductAttributeValue>
</ProductAttribute>
<ProductAttribute ID="10">
<ProductAttributeValue>
<Value>25</Value>
</ProductAttributeValue>
</ProductAttribute>
</Attributes>
after parsing, attributeValuesStr will always contain the value from the Value tag, which contains not a value, but an identifier
Closed #7169
nopCommerce version: 4.70
With upgrade to 4.70 logic for GetShoppingCartItemAttributeWarningsAsync in ShoppingCartService.cs was changed a bit.
Line 865-867 var attributeValuesStr = _productAttributeParser.ParseValues(attributesXml, a1.Id);:
if (productAttributeValues.Any() && !productAttributeValues.Any(x => attributeValuesStr.Contains(x.Id.ToString())))
attributeValuesStr has the value of the attribute and not the Id
Shouldn't it check here that productAttributeValues contains all selected values?