Post by akgamerx » Fri Mar 23, 2012 5:21 pm

Is there a simple way to make all products within the category pages display as most recently first? The same way most recent products are displayed first within the "latest products" module?

Thank you.

Newbie

Posts

Joined
Tue Aug 09, 2011 2:26 am

Post by inspirio » Fri Mar 23, 2012 5:50 pm

THIS "HACK" WILL BE CHANGE THE DEFAULT LOOK IN YOUR CATEGORY LIKE LOOK (like you click on sort by: button) :P

Search this in:

catalog\controller\product\category.tpl

if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.sort_order'; <--- change to: p.model !!!!!!!!!!!
}

if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'ASC'; <--- change to DESC !!!!!!!!!!!!!!!
}


If you want try with another option :
p.sort_order-ASC = default sort
pd.name ASC">Name (A - Z)
pd.name DESC">Name (Z - A)
p.price ASC">Price (Low > High)
p.price DESC">Price (High > Low)
rating DESC">Rating (Highest)
rating ASC">Rating (Lowest)
p.model ASC">Model (A - Z)
p.model DESC">Model (Z - A)

Image


User avatar
New member

Posts

Joined
Fri Feb 17, 2012 9:11 pm

Post by akgamerx » Sat Mar 24, 2012 4:42 am

Thank you very much for your reply but this doesn't quite get me the results I'm looking for.

There is no way to make all products appear the same way "latest products" do? Newest to Oldest.

Newbie

Posts

Joined
Tue Aug 09, 2011 2:26 am

Post by akgamerx » Sat Mar 24, 2012 4:59 am

Never mind, I feel quite silly. I just did "p.date_added" and "DESC" the same as shown in the latest products module. Very easy =]

For anyone else who wants their products to show in order by the date added the same as the latest product module it's simply this:

catalog/controller/product/category.php

if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.date_added'; <--- (Change from p.sort_order)
}

if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'DESC'; <--- (Change from ASC)
}

Newbie

Posts

Joined
Tue Aug 09, 2011 2:26 am

Post by inspirio » Sat Mar 24, 2012 5:09 am

You did the same that i told you :) Respect man :)

Image


User avatar
New member

Posts

Joined
Fri Feb 17, 2012 9:11 pm

Post by debcampos » Thu Jun 28, 2012 10:34 am

Thank you !

I did exactly what you did and it worked. Also i went a step further and changed the language in the file:
/catalog/language/english/product/category.php

From " Default" to "Latest Added" ;D

New member

Posts

Joined
Fri Jun 15, 2012 4:28 am

Post by DJM » Tue Jul 24, 2012 5:05 pm

Here's a vQmod, tested in version 1.5.1.3, which will change the default sort order to show most recent items first on category and manufacturer pages.

Attachments


User avatar
DJM
Newbie

Posts

Joined
Fri Jan 13, 2012 7:10 pm
Location - Bristol, UK

Post by jimmyharwood » Thu Aug 16, 2012 4:48 am

DJM wrote:Here's a vQmod, tested in version 1.5.1.3, which will change the default sort order to show most recent items first on category and manufacturer pages.
You are the man, this has been driving mad for ages, many thanks

Jimmy

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by adzeds » Fri Aug 17, 2012 6:04 am

Awesome work. Have added to my site!

Newbie

Posts

Joined
Wed May 16, 2012 4:26 am

Post by rikmg67 » Wed Nov 01, 2017 8:21 pm

works even on 2.3.2 :)

Newbie

Posts

Joined
Thu Nov 29, 2012 12:44 am
Who is online

Users browsing this forum: Amazon [Bot] and 32 guests