# Define variants order on detail page

**URL:** <https://forum.shopware.com/t/define-variants-order-on-detail-page/52712>\
**Category:** International (English Only)\
**Tags:** general\
**Created:** [3. Mai 2018 um 09:08 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712 "2018-05-03T09:08:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberto](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@roberto](https://forum.shopware.com/u/roberto)\
**Post date:** [3. Mai 2018 um 09:08 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/1 "2018-05-03T09:08:43Z")

</div>

Hi,

I’m trying to get the variants organised in a specific order as I’m working with sizes and the actual order is a bit messy but can’t see a way to order this variants to be shown as I want, is this possible?

Thanks

---

<div class="post-metadata">

**Author:** ![vanwittlaer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/vanwittlaer/32/8499_2.png) [@vanwittlaer](https://forum.shopware.com/u/vanwittlaer)\
**Post date:** [3. Mai 2018 um 10:27 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/2 "2018-05-03T10:27:47Z")

</div>

Hi Roberto,

You may want to sort the options by drag-and-drop for the variants of an article in the backend - edit article, Variants \> Configuration, select a group. (There is no place or text that explains this list is drag-and-droppable though it is.)

This works nicely. When filling the options/values using the API, there is a position parameter.

Happy selling,

Geert

---

<div class="post-metadata">

**Author:** ![roberto](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@roberto](https://forum.shopware.com/u/roberto)\
**Post date:** [3. Mai 2018 um 12:06 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/3 "2018-05-03T12:06:44Z")

</div>

Hi @vanwittlaer‍

I added the variants in the desired order but that doesn’t worked. Draging and droping did so thanks for the advice! 😃 Would say the position is not assigned if this drag and drop action is not performed

---

<div class="post-metadata">

**Author:** ![roberto](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@roberto](https://forum.shopware.com/u/roberto)\
**Post date:** [4. Mai 2018 um 09:45 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/4 "2018-05-04T09:45:53Z")

</div>

I know this is solved now but this is absolutely related, is there a way to make those modifications for all the products? I want to define the sizes order but there are more than 3000 products so it’s not a great deal changing one by one, is this possible?

---

<div class="post-metadata">

**Author:** ![vanwittlaer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/vanwittlaer/32/8499_2.png) [@vanwittlaer](https://forum.shopware.com/u/vanwittlaer)\
**Post date:** [4. Mai 2018 um 09:56 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/5 "2018-05-04T09:56:11Z")

</div>

You should be able to do it by means of SQL. The table s\_article\_configurator\_options has a position column. You’d need to select all options for a group (say color) according to its group\_id and then set the positions for the options as you like.

Good luck,

Geert

---

<div class="post-metadata">

**Author:** ![roberto](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@roberto](https://forum.shopware.com/u/roberto)\
**Post date:** [4. Mai 2018 um 09:59 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/6 "2018-05-04T09:59:45Z")

</div>

I’m playin around with the export files but that’s probably a better idea, nice one! I’ll keep you all informed on how to achieve this.

Thank you!

---

<div class="post-metadata">

**Author:** ![vanwittlaer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/vanwittlaer/32/8499_2.png) [@vanwittlaer](https://forum.shopware.com/u/vanwittlaer)\
**Post date:** [4. Mai 2018 um 10:05 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/7 "2018-05-04T10:05:16Z")

</div>

You can set the position when using the restAPI, but I would not bet the import/export plugin does it correctly. The thing is you can add options w/o specifying the position, and the system will probably make an arbitrary chose for it.

---

<div class="post-metadata">

**Author:** ![roberto](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@roberto](https://forum.shopware.com/u/roberto)\
**Post date:** [4. Mai 2018 um 10:23 UTC](https://forum.shopware.com/t/define-variants-order-on-detail-page/52712/8 "2018-05-04T10:23:27Z")

</div>

I’ve used the database, changing the values in s\_article\_configurator\_options and clearing the cache makes the trick, now all my products variations are in the correct order. Much easier to be honest than using the import/export plugin, it’s a small table and just need to change the position value, brilliant. Thank you very much for your help!!
