[Skip to main content](#vessel-content)

#   Order of variants on Product Page dropdown

##

- **[IP3](/forum/user/6885-ip3 "View IP3's Profile")**
- [![IP3's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6885-ip3 "View IP3's Profile") Topic Author
- [ Offline](/forum/user/6885-ip3)

Less More

- Posts: 30
- Thank you received: 0
-
-

14 years 6 months ago [\#45776](#45776) by [IP3](/forum/user/6885-ip3 "View IP3's Profile")  *[Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")* was created by *[IP3](/forum/user/6885-ip3 "View IP3's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

14 years 6 months ago [\#45942](#45942) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#45942 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[IP3](/forum/user/6885-ip3 "View IP3's Profile")**
- [![IP3's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6885-ip3 "View IP3's Profile") Topic Author
- [ Offline](/forum/user/6885-ip3)

Less More

- Posts: 30
- Thank you received: 0
-
-

14 years 6 months ago [\#46020](#46020) by [IP3](/forum/user/6885-ip3 "View IP3's Profile")  Replied by *[IP3](/forum/user/6885-ip3 "View IP3's Profile")* on topic *[Re: Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#46020 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

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](http://www.ip3inc.com/index.php/ordering) The option product with variants; correct ID ordering
[ www.ip3inc.com/index.php/cisspfull](http://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

14 years 6 months ago [\#46132](#46132) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#46132 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

Hi,

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

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

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[IP3](/forum/user/6885-ip3 "View IP3's Profile")**
- [![IP3's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6885-ip3 "View IP3's Profile") Topic Author
- [ Offline](/forum/user/6885-ip3)

Less More

- Posts: 30
- Thank you received: 0
-
-

14 years 6 months ago [\#46503](#46503) by [IP3](/forum/user/6885-ip3 "View IP3's Profile")  Replied by *[IP3](/forum/user/6885-ip3 "View IP3's Profile")* on topic *[Re: Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#46503 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

line 701

seems to have done the trick.

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[plantpotphil](/forum/user/2189-plantpotphil "View plantpotphil's Profile")**
- [![plantpotphil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2189-plantpotphil "View plantpotphil's Profile")
- [ Offline](/forum/user/2189-plantpotphil)

Less More

- Posts: 152
- Thank you received: 0
-
-
-

14 years 4 months ago [\#53142](#53142) by [plantpotphil](/forum/user/2189-plantpotphil "View plantpotphil's Profile")  Replied by *[plantpotphil](/forum/user/2189-plantpotphil "View plantpotphil's Profile")* on topic *[Re: Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#53142 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

This has helped me also. Thanks Nicolas

---

Create your own style of luxury [ bespoke furniture](http://www.clothierjones.com) online

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[printco](/forum/user/15621-printco "View printco's Profile")**
- [![printco's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar15621.png)](/forum/user/15621-printco "View printco's Profile")
- [ Offline](/forum/user/15621-printco)

Less More

- Posts: 12
- Thank you received: 0
-
-

12 years 10 months ago [\#135246](#135246) by [printco](/forum/user/15621-printco "View printco's Profile")  Replied by *[printco](/forum/user/15621-printco "View printco's Profile")* on topic *[Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#135246 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 10 months ago [\#135265](#135265) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Order of variants on Product Page dropdown](/forum/2-general-talk-about-hikashop/45776-order-of-variants-on-product-page-dropdown#135265 "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&#95;variant table has a relation 'ordering'. Can this be used, even if directly edited in the database?")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzQ1Nzc2LW9yZGVyLW9mLXZhcmlhbnRzLW9uLXByb2R1Y3QtcGFnZS1kcm9wZG93bj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.248 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
