Can anyone tell me how to change the display order on the category page? My products are being displayed in reverse chronological order (oldest products first) and I would like newest products to display first. I have read several posts but cannot find a good answer. I'm sure it's something simple but I cannot figure it out.
Any help is greatly appreciated.
Any help is greatly appreciated.
Default sortorder is: p.sort_order ASC
Edit catalog/controller/product/category.php.
Find:
Change into:
Find:
Change into:
To set it as default sorting:
Change:
Into:
OR: If you want to add this value to the Sort By:select field:
Find:
After that add:
Edit catalog/language/english/catalog/category.php and before ?> add:
Edit catalog/controller/product/category.php.
Find:
Code: Select all
$sort = 'p.sort_order';
Code: Select all
$sort = 'p.date_added';
Code: Select all
$order = 'ASC';
Code: Select all
$order = 'DESC';
Change:
Code: Select all
'value' => 'p.sort_order-ASC',
Code: Select all
'value' => 'p.date_added-DESC',
Find:
Code: Select all
$this->data['sorts'][] = array(
'text' => $this->language->get('text_default'),
'value' => 'p.sort_order-ASC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url)
);
Code: Select all
$this->data['sorts'][] = array(
'text' => $this->language->get('text_date_added_asc'),
'value' => 'pd.date_added-ASC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.date_added&order=ASC' . $url)
);
$this->data['sorts'][] = array(
'text' => $this->language->get('text_date_added_desc'),
'value' => 'pd.date_added-DESC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=pd.date_added&order=DESC' . $url)
);
Code: Select all
$_['text_model_desc'] = 'Date (Latest - Oldest)';
$_['text_model_asc'] = 'Date (Oldest - Latest)';
Thanks PPRMKR, it didn't work though. When I add a new item, it goes to the bottom of the list. I also added the "sort by" option you suggested and it shows in the drop down, but when you choose sort by newest-oldest, it acutally sorts alphabetically z-a.
Any other ideas?
Thanks,
Any other ideas?
Thanks,
Try attached vQmod ...
Who is online
Users browsing this forum: Majestic-12 [Bot] and 93 guests