Order of variants on Product Page dropdown

  • Posts: 30
  • Thank you received: 0
12 years 7 months ago #45776

I have created a product with an option product that has variants.
The option product lists on the product page with a dropdown. So far so good.
After trial and error I realized that I could set the default value of the Option Product by selecting the variant and saving the product, ok.
However, I cannot seem to order the variants in the dropdown correctly. (they are actually dates and I want them in date order)
Characteristic ID 'Value' Variant ID
19 Default 52
20 May 51
21 June 50
22 July 53
This results in the dropdown ordered July(22/53) June(21/50) Default(19/52) May(20/51)

The hikashop_variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #45942

The system will either order the values of characteristics by the order you entered them in the characteristic or by alphabetical order based on the option "Characteristics values ordering" of the Display tab of the configuration.

The values and characteristics are stored in the hikashop_characteristic table which doesn't have any ordering. The ordering column of the hikashop_variant table is used for the ordering of the characteristics attached to the product (you can see the ordering field on your product edition page in the "characteristics" area).

But, if you enter your characteristic values in the order you want them, you should be able to have them displayed in that order for all the products/options using that characteristic.

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

  • Posts: 30
  • Thank you received: 0
12 years 7 months ago #46020

Nicolas,
Thank you for your reply.
I commend you on the switch between ID and Alphabetical in your design.
However, it seems to fail when used on an Option product. Please review these urls:
www.ip3inc.com/index.php/ordering The option product with variants; correct ID ordering
www.ip3inc.com/index.php/cisspfull The 'main product' whose option product variants are listed alphabetically

If I have something configured incorrectly please help me understand what that might be.

Paul

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #46132

Hi,

Could you try to change the code:
$key .= $char->characteristic_value.'_';

to:
$key .= $char->$order.'_';

in the file components/com_hikashop/views/product/view.html.php and try again ?

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

  • Posts: 30
  • Thank you received: 0
12 years 7 months ago #46503

line 701

seems to have done the trick.

Thanks!

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

  • Posts: 152
  • Thank you received: 0
12 years 5 months ago #53142

This has helped me also. Thanks Nicolas


Create your own style of luxury bespoke furniture online

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

  • Posts: 12
  • Thank you received: 0
10 years 11 months ago #135246

I'm having a similar problem. It wasn't following the order of the IDs. However, I went into the database and found the characteristics table and manually adjusted that table in the characteric_ordering column and I was able to get it to work. Having trouble finding an area in the Hikashop settings to adjust these values.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 11 months ago #135265

The ordering of the values of characteristics is available when you edit a characteristic.
The ordering of the characteristics themselves is available in the characteristics listing of each product when you edit a product.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum