Skip to main content

Backend Product Sort by Product Code

10 years 8 months ago #232588 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!

Please Log in or Create an account to join the conversation.

10 years 8 months ago #232592 by Xavier
Hi,

You can simply add parameters in the url:
Code:
&filter_order=product_code&filter_order_Dir=asc
So the url will be:

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
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
Powered by Kunena Forum