Page 1 of 1

p.date_modified broken?

Posted: Sun Jun 03, 2018 10:44 pm
by scottyboyyy
https://demo.opencart.com/index.php?rou ... e_modified

The above sorts by first letter of product name rather than date modified.

When changed to for example date_added:

https://demo.opencart.com/index.php?rou ... date_added

The correct results are shown.

I believe the demo is version 3 but I'm having this issue with my 2.3.0.2 also. And I see threads as far back as 1.5 of people not being able to get this working.

Does anyone know a fix? Or work around?

I am able to access the values for date_modified just seems to not be working for the sort.

Re: p.date_modified broken?

Posted: Mon Jun 04, 2018 12:48 pm
by Qphoria
1. EDIT: catalog/model/catalog/product.php

2. FIND:

Code: Select all

'p.date_added'
3. BEFORE, ADD

Code: Select all

'p.date_modified',
And yes it has been broken since forever.

Re: p.date_modified broken?

Posted: Tue Jun 05, 2018 5:55 am
by scottyboyyy
Qphoria wrote:
Mon Jun 04, 2018 12:48 pm
1. EDIT: catalog/model/catalog/product.php

2. FIND:

Code: Select all

'p.date_added'
3. BEFORE, ADD

Code: Select all

'p.date_modified',
And yes it has been broken since forever.
That's for advice, I've tried that though with no luck.

Do you possibly know how the date_added is sorted / where the code is that telling it how do order? I see none so I'm not sure whether there is some hidden away or whether it's simply numerical. If it's numerical you would think p.date_modified would work though.

Re: p.date_modified broken?

Posted: Wed Dec 19, 2018 3:33 pm
by khurrum
Thanks for the guidance. It is working but when we click on page 2, 3 and onwards, the sort order is changed again. Can you pls check. Thank you
Qphoria wrote:
Mon Jun 04, 2018 12:48 pm
1. EDIT: catalog/model/catalog/product.php

2. FIND:

Code: Select all

'p.date_added'
3. BEFORE, ADD

Code: Select all

'p.date_modified',
And yes it has been broken since forever.