View Issue Details

IDProjectCategoryView StatusLast Update
0004080OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:13
Reporteravenger Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version4.5.9 revision 43186 
Summary0004080: Wrong sorting of article list by price
DescriptionIf a category contains both products with and without variants, sorting by price is wrong.

The articles without variants are always sorted at the beginning/end of the list, their prices not being sorted in any way.
Steps To Reproducehttp://vcm24.vcm-gruppe.de/Computer-/Einzel-PCs/?ldtype=line&_artperpage=12&pgNr=0&cl=alist&searchparam=&cnid=651&listorderby=oxvarminprice&listorder=asc
Additional InformationThe reason for the problem is, that the "ORDER BY"-clause of the article selection SQL is like

ORDER BY
    oxvarminprice asc ,
     oc.oxpos,
    oc.oxobjectid

As the articles without variants do not have an "oxvarminprice" these articles are sorted at the beginning/end of the list....

An "ORDER BY"-clause like

ORDER BY
    IF (oxvarminprice, oxvarminprice, oxprice) ASC,
     oc.oxpos,
    oc.oxobjectid

would yield the expected result.
TagsCategory
Attached Files
2012-07-04_1608.png (221,648 bytes)   
2012-07-04_1608.png (221,648 bytes)   
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

svetlana

2012-06-11 13:43

reporter   ~0006850

Reminder sent to: avenger

Hi, thanks a lot for submitting this issue, but unfortunately we can not reproduced it. Could you please send us more details how you reproduced it.

avenger

2012-06-25 10:58

reporter   ~0006971

Well, the information above is all I can provide...

In then Shop-Url given I have fixed it with a module, so this is fine now...

The point is, that for categories containing both variants and non-variant products, the non-variant products are sorted incorrectly on sorting by price, as "oxvarminprice" ist used for sorting, which is 0 for non-variant products.

ORDER BY
    oxvarminprice asc ,
     oc.oxpos,
    oc.oxobjectid

As the articles without variants do not have an "oxvarminprice" these articles are sorted at the beginning/end of the list....

An "ORDER BY"-clause like

ORDER BY
    IF (oxvarminprice, oxvarminprice, oxprice) ASC,
     oc.oxpos,
    oc.oxobjectid

svetlana

2012-07-04 15:40

reporter   ~0007048

Hi,

I tested this case on our demo shop http://demoshop.oxid-esales.com/enterprise-edition/ once again. I added two new products with variants and assigned to Kite category. After sorting by price all products was sorted correct. See the attachment. Sorry, but we still can not reproduce this issue.