Sort on SKU

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
6 years 1 month ago #289468

Hi,

My customer would like to sort products by product SKU.
I couldn't find this setting, so can you tell me where to find it or can you add it?

Kind regards,
Jeroen | Joomill

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

  • Posts: 2143
  • Thank you received: 747
6 years 1 month ago #289482

Hi,

Unless you're using a separate (custom) field for SKU, "product_code" should be what you're looking for.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
6 years 1 month ago #289485

Thanks,

Yes i expected this, but there is also no product_code option to select in the sort-field



Thanks.

Attachments:

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

  • Posts: 2143
  • Thank you received: 747
6 years 1 month ago #289496

Oh, so it's about a filter to apply on "Sort"...
True, product_code is not available there by default.

This thread is already a bit older, but it should still be valid: www.hikashop.com/forum/product-category-...by-product-code.html

Alternatively, you may also consider using a custom field of the type "product" for SKU. It would then be available as "sort by" option.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
6 years 1 month ago #289498

Hi,

Sorry, this way is for v2.6 and don't work anymore for me.
Creating a new field is also no option as we already have 3700+ products in our store.

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

  • Posts: 2143
  • Thank you received: 747
6 years 1 month ago #289500

Joomill wrote: Creating a new field is also no option as we already have 3700+ products in our store.


Well, if I were in your shoes, I'd create the custom field, then use a query in PhpMyAdmin to copy product_code over. But that's not everyone's cup of tea, I guess. ;)

So then, let's see what the official support gurus come up with. Sorry I couldn't help.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 1 month ago #289489

Hi,

In that case, add the line:

			$this->values[] = JHTML::_('select.option', 'b.product_code',JText::_('PRODUCT_CODE'));
after the line:
			$this->values[] = JHTML::_('select.option', 'b.product_name',JText::_('PRODUCT_NAME'));
in the file administrator/components/com_hikashop/types/product_information.php and that should allow you to select them.

The following user(s) said Thank You: lousyfool, Joomill

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

  • Posts: 200
  • Thank you received: 9
  • Hikashop Multisite
6 years 1 month ago #289521

Thank you, this works.
Will this be part of the new Hikashopversion or is there a way i can make an override for this file?

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 1 month ago #289532

We'll add that to the next version.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum