Backend Product Sort by Product Code

  • Posts: 6
  • Thank you received: 0
9 years 6 months ago #232588

-- 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!

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 6 months ago #232592

Hi,

You can simply add parameters in the url:

&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:
<?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.

  • Posts: 6
  • Thank you received: 0
9 years 6 months ago #232726

Thanks Xavier!! That really helps!! :lol: :lol:

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

Time to create page: 0.063 seconds
Powered by Kunena Forum