Jump to content

Resolved - category page sort by the newest first


ravuth

Recommended Posts

my store use cubecart v5.1.1 , and my store products are update daily ,

is any possible way to show products sort by date added (the newest first ) by default ?

is any one know how to customize that ?

Link to comment
Share on other sites

Please try this (I haven't tried it myself):

In catalogue.class.php, about line 426, find:

... $order = false, ...




Change to:


$order = array('date_added' => 'DESC'),

Instead of specifying 'no particular order', we are specifying the 'date added' from highest to lowest.

(Note: I really should be learning about the hook system so that stuff like this will survive updates and can be enhanced if needed. Oh, well.)

Link to comment
Share on other sites

@Dirtybutter, surly here is the solution from cubecart support

Code change required.

OPEN

classes/catalogue.class.php

FIND

$order['name'] = 'ASC';

REPLACE WITH

$order['product_id'] = 'DESC';

Do it twice as two lines to find there.

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...