Characteristic values order

  • Posts: 12
  • Thank you received: 0
13 years 4 weeks ago #11921

Hi,
I created the characteristic weight (g).

However, as see attached image; the various values are not
sorted according to the ID.

Can I have values sorted according to ID?

The management of variant-products would be more simple.

Joomla 1.5.22
Hikashop Essenzial 1.4.8.

Sincerely,
Alessandro.

Attachments:

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
13 years 4 weeks ago #11930

Hi,

In the config under the tab "display" you have the option "Characteristics values ordering" where you can choose to order them by ID or by alphabetic order.

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

  • Posts: 12
  • Thank you received: 0
13 years 4 weeks ago #11939

Hi,
the recommended setting is already set to ID.

I note that in the frontend the various values ​​are properly ordered.
In the backend are not properly sorted.
As shown in the image attached to the previous message.

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
13 years 4 weeks ago #11944

Ah yes, in that view there is no ordering done. Is that a problem ?

You can change the line:
$query = 'SELECT * FROM '.hikashop::table('characteristic').' WHERE characteristic_parent_id = '.$characteristic_id;

by:
$config =& hikashop::config();
if($config->get('characteristics_values_sorting')=='old'){
$order = 'characteristic_id ASC';
}else{
$order = 'characteristic_value ASC';
}
$query = 'SELECT * FROM '.hikashop::table('characteristic').' WHERE characteristic_parent_id = '.$characteristic_id.' ORDER BY '.$order;

in the file administrator/components/com_hikashop/views/characteristics/view.html.php in order to get it ordered.

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

  • Posts: 34
  • Thank you received: 0
13 years 4 days ago #14591

Having to change the core to do a sort, especially in the product variant listing, is surely not the best way.

Most lists in Joomla it is possible to click on the column headings to do a sort.

This would be really useful for me (and others I am sure) where I have multiple variant products, i.e 5 sizes and a 3 choices of colour for each size, thats 15 variant products.

does it take much coding to implement this, where you have a choice of which column you can sort on like you have on the main products listing page?

Like in the main products listing:

<a title="Click to sort by this column" href="javascript:tableOrdering('b.product_name','desc','');">Name</a>
It means its much easier to maintain the variants e.g prices etc.


David Craig
Hikashop 1.5.0 Business edition
www.charitycanvasprints.com

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
13 years 4 days ago #14623

That modification has been integrated in the latest version of HikaShop so no need to hack the core to have your values sorted by name there.

There is no point in sorting variants. Variants are combinations of values of characteristics. Sorting the values of the characteristics is what need to be done and it's already in the todo list.

We don't have the time to do all the features everyone is asking. HikaShop's code is open. If you want it help yourself. We will be happy to integrate the changes in HikaShop if they are done correctly.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum