How to save the order of the products ascending by price, for example, as default for my store? To assign a order for each product in Admin-->catalog-->Products-->Sort by price-->Change every sort order is to hard.
Second way is using Catalog Search, but I want to customize this on price ascending. How can I do that?
Thank you,
Amedeo
Save default order criteria
Re: Save default order criteria
You want the product to be listed in the catalog sorted buy price?
Re: Save default order criteria
Yes, I want the default order criteria descending by price
Re: Save default order criteria
This is controller in the controllers.
For example in catalog/controller/category.php, at about line 151, you will see the following code.
You can just change it to:
This will disable the choices for now and always sort by price ASC.
This feature is in the side bar options that allow sort be price or by sort aorder ASC or DESC if you had that enabled.
For example in catalog/controller/category.php, at about line 151, you will see the following code.
Code: Select all
if ($default_filter == $language->get('entry_number')){
$search_filter = ' order by p.sort_order, pd.name ';
} else {
$search_filter = ' order by p.price ';
}
If ($default_order == $language->get('entry_ascending')){
$search_order = ' asc ';
} else {
$search_order = ' desc ';
Code: Select all
if ($default_filter == $language->get('entry_number')){
$search_filter = ' order by p.price ';
} else {
$search_filter = ' order by p.price ';
}
If ($default_order == $language->get('entry_ascending')){
$search_order = ' asc ';
} else {
$search_order = ' asc ';
This feature is in the side bar options that allow sort be price or by sort aorder ASC or DESC if you had that enabled.