2 replies [Last post]
AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Was this information Helpful?

I found thiis bug in Ubercart 1.x, it could be in 2.x as well.

Description
When creating product adjustments, the combination of attributes are written to the database in a serialized form using the ordering field from both the uc_product_attributes table and the uc_attributes table in the uc_product_adjustments_form_submit() function. When attempting to retrieve the unique model number for a specific product adjustment in the _uc_attribute_alter_form() function, only the uc_product_attributes table is used ignoring the uc_attributes table. This can cause the serialized combination of attributes to be different if the default order for attributes is different than the product specific order of attributes which results in a failed attempt to look up a specific product model based on product adjustments.

The attached patch alters the SELECT statement in the _uc_attribute_alter_form() function to include the ordering field from the uc_attribute table when ordering product attributes.

PreviewAttachmentSize
uc_product_adjustments.patch752 bytes

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Bump! Haven't heard anything

Bump!

Haven't heard anything for a week, just making sure this gets seen.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Bump! Haven't heard anything

I think the problem needs to be taken care of more completely, and I'm not sure that standardizing the attribute ordering is enough, even if we change all of the queries.

There are a couple of other bugs in the attribute module that I've been distracted by, and I think most aspects of the adjustments systems probably needs to be reworked. Fortunately, that's really just a small part of the attribute module.