- Posts: 6
- Thank you received: 0
Backend Product Sort by Product Code
10 years 8 months ago #232588
by manlui
Backend Product Sort by Product Code was created by manlui
-- HikaShop version -- : Business 2.6.0
Hi there,
in backend product list, how can I set the default sorting method by product code, but not by product ID?
Thanks!
Hi there,
in backend product list, how can I set the default sorting method by product code, but not by product ID?
Thanks!
Please Log in or Create an account to join the conversation.
10 years 8 months ago #232592
by Xavier
Replied by Xavier on topic Backend Product Sort by Product Code
Hi,
You can simply add parameters in the url:
So the url will be:
To force that any time without having to change the url, you can edit the view "product / listing" in the backend template and add the following code at the top:
You can simply add parameters in the url:
Code:
&filter_order=product_code&filter_order_Dir=asc
administrator/index.php?option=com_hikashop&ctrl=product&filter_order=product_code&filter_order_Dir=asc
To force that any time without having to change the url, you can edit the view "product / listing" in the backend template and add the following code at the top:
Code:
<?php
if($this->pageInfo->filter->order->value != 'product_code'){
$app = JFactory::getApplication();
$app->redirect(JURI::base(true).'/index.php?option=com_hikashop&ctrl=product&filter_order=product_code&filter_order_Dir=asc');
}
?>
The following user(s) said Thank You: manlui
Please Log in or Create an account to join the conversation.
10 years 8 months ago #232726
by manlui
Replied by manlui on topic Backend Product Sort by Product Code
Thanks Xavier!! That really helps!! :lol: :lol:
Please Log in or Create an account to join the conversation.
Time to create page: 0.049 seconds