With a really simple product (single attribute - no options), when you add to cart $data contains:
Array
(
[attributes] => Array
(
[1] => 123
)
[model] =>
[module] => uc_product
[shippable] => 0
)I'm thinking it would be really nice to have it do something more like :
Array
(
[attributes] => Array
(
[1] => Array
(
[name] => attribute_name
[value] => 123
)
)
[model] =>
[module] => uc_product
[shippable] => 0
)I found this because i'm trying to create a contrib which will validate any attributes with the word "email" in them to be valid email addresses. Could be too edge case, but seems nice to me.
Guessing it would need an extra query in uc_attribute_add_to_cart_data.
What do you think?





Joined: 01/02/2008