Ordering of attributes is different between attribute, product and adjustment pages. This is confusing to users.

Cheers,

Antoine

CommentFileSizeAuthor
#1 ubercart-640928.patch2.41 KBjantoine

Comments

jantoine’s picture

Status: Active » Needs review
StatusFileSize
new2.41 KB

This problem doesn't seem to be too complex. A patch is attached that fixes this issue for me.

Cheers,

Antoine

tr’s picture

Patch applies for me, but I don't see that it changes anything on my site...

Before the patch, the three pages node/#, node/#/edit/attributes, and node/#/edit/adjustments all show the same order for attributes, and if I change that order using the drag and drop at node/#/edit/attributes then the changed order appears on all three pages.

After the patch, I see the same thing.

razorback’s picture

I applied the patch and still not better. options and stock screens are correct. Adjustments and dropdown on product page is incorrect.......

this one has me scratching my head.....

tr’s picture

Status: Needs review » Postponed (maintainer needs more info)

As I said in #2, I don't know what this patch is supposed to do - can you explain?

jantoine’s picture

TR,

Attributes and Options should be sorted first by the ordering field and second by the name field. Depending on the query, other fields can be used for sorting.

This patch only changes two lines in the uc_attribute.admin.inc file. The first line changed adds the ordering field to the query used on the products "add attributes form". The second line changed adds the name field to the query on the product adjustments form. If this does not solve razorback's issues, perhaps it needs more work, but these two changes solved my issues.

Cheers,

Antoine

tr’s picture

I understand that part, what I don't know is what effect I'm supposed to see, and where. As I said in #2, I don't see any visible change on the pages you mentioned, so it's not clear to my why the SQL needs to be modified.

jantoine’s picture

TR,

It has been a while, but I believe that if you don't add the ordering field to the first query, then the products "add attributes form" does not match the ordering set on the store "attributes overview form". Also, if the name field is not added to the second query, I believe the attributes are displayed first using the ordering field and second in the order they were added to the database. I can't verify this tonight, but I am sure that is why I added those fields to the ORDER BY portion of the query. I apologize for the terrible description in my original post.

Cheers,

Antoine

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Still don't know what this was supposed to solve.