Although the product attributes still display when using the old attribute format, the attribute data array created for cart items by uc_reorder no longer matches the upstream format. Below are some snippets of print_r($item->data['attributes']) during cart view that demonstrate the change in format.
Normal, item added to cart through product form:
Array
(
[1] => 2
[2] => 6
[3] => Array
(
[7] => 7
[8] => 8
[9] => 0
)
)Reordered item, before patch:
Array
(
[1] => Array
(
[0] => 2
)
[2] => Array
(
[0] => 6
)
[3] => Array
(
[0] => 7
[1] => 8
)
)
Reordered item, after patch:
Array
(
[1] => 2
[2] => 6
[3] => Array
(
[0] => 7
[1] => 8
)
)
AID 1 and 2 are drop-down menus, AID 3 is a series of checkboxes (same format as radio buttons).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | new-attribute-format-1376830-1.patch | 1.05 KB | stewart.adam |
Comments
Comment #1
stewart.adam commentedThe attached patch fixes this issue with the exception of unselected checkboxes. In the normal cart item, the unselected option ID is present but with a value of zero and in the reorder cart item it is omitted.