reaction icon indicating copy to clipboard operation
reaction copied to clipboard

Attribute checks in shipping restrictions don't work for nested item properties (e.g. parcel.*)

Open derBretti opened this issue 4 years ago • 0 comments

Issue Description

The checks for shipping restrictions based on an item's properties only work top for level properties such as price. An attribute deny rule that uses the property "weight", as mentioned in the documentation (https://docs.reactioncommerce.com/docs/concepts-fulfillment), does not work, since the property "weight" is nested in "parcel".

Steps to Reproduce

  1. Create a product with the parcel.weight attribute set
  2. Create a shipping method
  3. Create a shipping restriction with the attribute "weight" which would exclude the shipping method for the product if it was applied (as explained in the documentation)
  4. See that the shipping method is available for the product in checkout process

Possible Solution

Access item properties with _.at(item, attribute.property) in attributeDenyCheck.js. Change the property in the documentation to "parcel.weight"

Versions

[email protected] [email protected]

derBretti avatar Feb 20 '21 16:02 derBretti