If a custom adds a product with attributes to the cart and those attributes are removed before that person completes checkout, the cart will still attempt to display these attributes. However, since it can't find the attribute, it just displays either ": _textfield option_" or ": _option_id_". If an attribute is removed from a product while it's still in customer carts, the removed attributes should no longer be displayed, especially since for radio and select list attributes it's just going to show a non-sensical number.
However, I don't think it's scalable to poll through and update all the rows in uc_cart_products that are affected based on the way this stuff is being stored. Instead, Lyle and I talked and it seems like we can simply hide it from display and then when the product moves from a cart product to an order product trim off any non-valid attributes from the data array.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 555088_deleted_attribute.patch | 2.11 KB | Island Usurper |
Comments
Comment #1
Island Usurper commentedActually, once I got to looking at it, _uc_cart_product_get_options() seems like the perfect place to filter out the deleted attributes from the product data. It feeds data to the cart descriptions, and it's also involved when the order products are saved. No more deleted attribute option data floating around.
Comment #2
rszrama commentedIt just works. (TM)