View Issue Details

IDProjectCategoryView StatusLast Update
0001670OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:10
Reporteravenger Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version4.2.0 revision 23610 
Fixed in Version4.3.1 revision 27257 
Summary0001670: Attribute display problem
DescriptionThe display of attribute groups in article lists does not obey the attribute sequence defined in the attribute definition...

If e.g. you take this attribute display http://www.heimhifi.com/PLASMA-LCD-L...at=true&lang=1 , the sequence was defined different from the sequence displayed.

I have analyzed the prob, and I believe the reason for this misbehaviour is as follows:

The attributes are collected in "oxcategory.php", "function getAttributes()".

The attribute sequence field ("oxpos") is used for sorting the result in the SQL to fetch the attributes information.

But afterwards the attributes information is stored in an assoziative array, using the attribute-id as key.

As the attribute-ids are constructed like "attr_00001", "attr_00002",..,"attr_0000N", this array gets effectively sorted by the attribute-id instead of the "oxpos" position indicator....

Another drawback of this approach is, that "attr_000010" follows directly after "attr_00001"...
TagsAttributes
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

avenger

2010-02-26 07:45

reporter   ~0002373

I have solved the problem for our customers...

The change is, that I am now using the "oxpos"-field of the attribute-group ("oxattribute" table) as index of the assoziative attributes-array which is generated (instead of the "attrid"-field).

This also requires changes in the "inc/attrib.tpl".

birute_meilutyte

2010-03-22 14:57

reporter   ~0002419

Reminder sent to: avenger

Hello,

Sorry, but I can not reproduce the case. Attributes are sorted according "All Attributes of this Category" position in category page, and according attributes sorting in product details page.
Could you please confirm, that the case can be reproduced on our demoshops? :
http://demoshop.oxid-esales.com/enterprise-edition/
http://demoshop.oxid-esales.com/professional-edition/

Also, your mentioned "inc/attrib.tpl" template does not exist in our shop at all.

greetings,
Birute M.

Moehlis

2010-03-23 09:56

reporter   ~0002421

i had this problem a while ago, but the sorting is a little bit different as discribed.

attributes are sorted by oxcategory2attribute.oxsort, not oxattribute.oxpos (see oxcategory.php:getAttributes():698 (EE 4.2):
"ORDER BY c2a.oxsort , att.oxpos, att.oxtitle{$sLngSuf}, o2a.oxvalue{$sLngSuf}";

bug using the oxid as index doesnt affect the sorting as long as no one ksorts the array.

to change the sorting you can edit the oxcategory2attribute.oxsort or change the assignment of each attrubte to category. this is painfull but so you can define a different sorting for each category, maybe usefull, maybe not. of course assigning attributes in the category menu would be very very (very) helpfull *wink wink*

birute_meilutyte

2010-04-14 10:13

reporter   ~0002531

@developers: please check from source code side, if described issue exist

arvydas_vapsva

2010-04-14 11:01

reporter   ~0002536

Reminder sent to: avenger, Moehlis

In "Admin > Administer Products > Attributes > [some attrobute] > Category > Assign Categories" you can manage your own attribute sorting.

In case you would like to have this functionality accessible from category with a bit different layout - you should submit this request to http://oxid.uservoice.com/ and we implement this feature in some version.