catalog/controller/product/category.php
我改变了:
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.stock_status_id';
}
默认情况下,当我刷新页面时,当我选择默认选项时,没有任何操作可用,我看到此代码?sort=p.stock_status_id&order=DESC&limit=100
但尚未按stock_status_id
排序!
答案 0 :(得分:-1)
打开此文件:
catalog/controller/product/category.php
查找
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';
}
将其更改为:
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';
}