Changed p.sort_order (default sort) to p.quantity in category.php but category page is not loading products sorted by quantity, it's loading sorted A-Z.. If I'm changing to A-Z sort and back to Default products are sorted by quantity ..Any ideas? I tried to modify in model/journal3/product/filter.php but no result.
controller catalog.php
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 = 'p.quantity';
}
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
But not working ..

In catalog.php:
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';
}
Code: Select all
$data['sorts'][] = array(
'text' => $this->language->get('text_default'),
'value' => 'p.quantity-DESC',
'href' => $this->url->link('product/catalog', '&sort=p.quantity&order=DESC' . $url),
);
Code: Select all
$data['sorts'][] = array(
'text' => $this->language->get('text_default'),
'value' => 'p.quantity-DESC',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.quantity&order=DESC' . $url)
);
As Johnathan said, if you use Journal, the search will not be using the normal file.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Hello,
There is no quantity option at that setting!!!
Only default, date, name, price, rate, model... but not quantity.
Is there any way to do it on Journal?
Web Design: http://www.websanati.com
Personel Blog: http://www.alperheper.com
Journal is not supported on the forum.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 12 guests