Author Topic: SOLVED: Order of dropdown entries with multivariants differ on FE/BE  (Read 860 times)

brandiware

  • Beginner
  • *
  • Posts: 49
  • A beginner
Hi all,

when setting up multi-variants on the backend I can select custom labels in the dropdown on the backend according to the order of entries in the custom field.
However, when the multi-variant displays on the frontend, this order is not preserved. Instead it enters the listbox items in the order it finds the according variant.

I figure, the order of entry in the custom labels box on the backend should be shown on the frontend as well ?

Thanks for any help on this
Stefan

StefanSTS

  • Global Moderator
  • Jr. Member
  • *
  • Posts: 331
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #1 on: April 18, 2018, 14:37:02 pm »
The order of the dropdowns in the Multi Variant productdetails view in my case is always like in the backend.

But I might not have understood you, because your explanation is not clear. A bit more details or screenshots might help.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

brandiware

  • Beginner
  • *
  • Posts: 49
  • A beginner
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #2 on: April 20, 2018, 16:08:42 pm »
Hi,

let me try this again (No clue how to insert a screen-print here.):

When specifying multi-variants you can enter custom labels (Benutzerdefinierte Etiketten) for each entry of the according dropdown.
My customer would like these entries to appear on the front-end exactly in the same order as entered.

When you assign the product variants on the backend the labels appear in exactly the right order in the dropdown boxes for each field.
This is unfortunately not the case on the front-end.

Hope this helps to clear things up, thanks for any help


Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2234
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #3 on: April 20, 2018, 16:26:49 pm »
If you have for example
Medium t-shirt black
Medium t-shirt white

You will have to change places of the two if you want white before black in the dropdown in front end
Regards
Jörgen @ Kreativ Fotografi

Klick on attachments and other options to include screenshot
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

brandiware

  • Beginner
  • *
  • Posts: 49
  • A beginner
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #4 on: April 25, 2018, 11:25:11 am »
Hi all,

pls find attached screenshots that show how the order of field labels differ on FE and BE. I would expect the sort order not to differ.
Actually it should be ordered exactly as entered in the field labels box.

Thanks for any help
Stefan

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2234
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #5 on: April 25, 2018, 13:33:18 pm »
Then You have to sort the Products in the backend to accomplish this. The dropdowns are created "on the fly" using Your Products. The order of which you create and Place your Products in the back end decides what option comes first. What should happen when an option isn´t available ? Please. sort Your Products in the backend if You want a preferred sort order.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

brandiware

  • Beginner
  • *
  • Posts: 49
  • A beginner
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #6 on: April 26, 2018, 09:16:32 am »
Thanks Jörgen,

I was not aware of the drag and drop sorting feature in the back-end. The solution is to move the options in the right order to the top of the variant list in the back-end
i.e. not all the list has to be sorted. The listbox on the frontend sorts according to the order of first appearance of the variants in the variant table on the backend.

Note: this is a very cumbersome process for multi-field variants. I guess it could be solved programmatically such that the order of labels is preserved in the drop-downs.

Cheers
Stefan

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2234
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Order of dropdown entries with multivariants differ on FE/BE
« Reply #7 on: April 26, 2018, 09:28:00 am »
Hello Stefan

Thanks for the feedback. Nice to hear that You have it figured out.

regards

Jörgen @ Kreatv Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)