ravuth Posted July 11, 2012 Share Posted July 11, 2012 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 ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 11, 2012 Share Posted July 11, 2012 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.) Quote Link to comment Share on other sites More sharing options...
ravuth Posted July 11, 2012 Author Share Posted July 11, 2012 @bsmither , i try it . unfortunately, it not work.. you have any other idea ? i do appreciate that you so often offer good advice. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 11, 2012 Share Posted July 11, 2012 I keep forgetting to mention that changes to code that could affect how the database gets queried and/or how the page gets displayed, the various caches need to be cleared in the admin section under maintenance. Quote Link to comment Share on other sites More sharing options...
ravuth Posted July 12, 2012 Author Share Posted July 12, 2012 dear Bsmither i try to clear all caches, and it still dont work . please let me know Quote Link to comment Share on other sites More sharing options...
ravuth Posted July 12, 2012 Author Share Posted July 12, 2012 dear bsmither, i submit ticket to cubecart supporter. and now it works. thanks you for your help . Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 12, 2012 Share Posted July 12, 2012 Please share the solution if you can, and I'll mark this thread as resolved. Quote Link to comment Share on other sites More sharing options...
ravuth Posted July 12, 2012 Author Share Posted July 12, 2012 @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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.