I would like to change the code for the default sort order so that it displays the items with the most in stock first. Any ideas?
Last edited by 4bco on Thu Oct 13, 2011 8:12 am, edited 1 time in total.
Custom Website Design from BCO ~ Building Companies Online
If we were of assistance to you, please help my family in return with a small donation.
open: catalog/controller/product/category.php
find:
change to
You may also want to do the same for
catalog/controler/product/manufacturer.php
catalog/controler/product/search.php
catalog/controler/product/special.php
find:
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.sort_order';
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'ASC';
}
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.quantity';
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'DESC';
}
catalog/controler/product/manufacturer.php
catalog/controler/product/search.php
catalog/controler/product/special.php
Thanks I will give it a try.....
Could you tell me how to change the code if they want it to sort by name first A-Z....They are having trouble making up their mind as to which way they want it
Thanks for you help!
Could you tell me how to change the code if they want it to sort by name first A-Z....They are having trouble making up their mind as to which way they want it

Thanks for you help!
Custom Website Design from BCO ~ Building Companies Online
If we were of assistance to you, please help my family in return with a small donation.
find
change to
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.sort_order';
}
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'pd.name';
}
ps...It would be great if you could help me with this topic too....
http://forum.opencart.com/viewtopic.php?f=21&t=41766
http://forum.opencart.com/viewtopic.php?f=21&t=41766
Custom Website Design from BCO ~ Building Companies Online
If we were of assistance to you, please help my family in return with a small donation.
Who is online
Users browsing this forum: No registered users and 8 guests