Fix for adding multiple customizations to a single SKU in the cart

Fixes this issue posted to main Slatwall repo.

1. Create a Product with an Order Item Attribute Set for "Custom Name"

2. Add a product to the cart with the Custom Name "Dan"

3. Add a second instance of the same product with the Custom Name "Greg"

Expected Result:

The order will contain two line items, one with the AttributeValues "Dan", and the other with the AttributeValues "Greg"

Actual Result:

One SKU is added to the cart with the AttributeValue "Dan", and a quantity of 2.

Greg stated in the forums that the issue is in the OrderService.cfc lines 360-365. I'm working on a fix, but haven't come to the solution yet.


I'm not sure if I've caught all conditions due to my lack of experience with Slatwall. I'm fairly certain it's also possible to add customizations by attributeCode or ID, and this only takes into account Code. Let me know if this doesn't do the trick.


Several other items have been wrapped up with this, including fixes for additional charges not being applied from order item attributes, and displaying of order item attributes that don't have a valid value.