Announcement

Collapse
No announcement yet.

Any way to manually change/assign facet options display order?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Any way to manually change/assign facet options display order?

    Is there any way to manually change/assign facet options display order (default sort order is out of "natural sequential order")?

    Denomination:

    1 Dollar Bill
    1 Penny
    10 Cents
    10 Dollar Bill
    20 Dollar Bill
    25 Cents
    5 Cents
    5 Dollar Bill

    Thank you, Bill Davis

    #2
    Originally posted by William Davis View Post
    Is there any way to manually change/assign facet options display order (default sort order is out of "natural sequential order")?

    Denomination:

    1 Dollar Bill
    1 Penny
    10 Cents
    10 Dollar Bill
    20 Dollar Bill
    25 Cents
    5 Cents
    5 Dollar Bill
    I don't have an answer for you other than to say that I believe the sort order isn't necessarily "out of" Natural Sequential Order. Mixing numbers and text will usually default that a number, even if a leading number is treated as TEXT and not a NUMERIC VALUE.

    I had cut and pasted your example into Excel and changed the order and then resorted and came out with the same results you have above.

    Comment


      #3
      Originally posted by SNAGuy View Post

      I don't have an answer for you other than to say that I believe the sort order isn't necessarily "out of" Natural Sequential Order. Mixing numbers and text will usually default that a number, even if a leading number is treated as TEXT and not a NUMERIC VALUE.

      I had cut and pasted your example into Excel and changed the order and then resorted and came out with the same results you have above.
      SNAGuy, true, that is how computers sort numbers. But what I meant that it would be ideal if it can be displayed as follows:

      Denomination:

      [ ] 1 Penny
      [ ] 5 Cents
      [ ] 25 Cents
      [ ] 50 cents
      [ ] 1 Dollar
      [ ] 5 Dollars
      [ ] 10 Dollars
      [ ] 20 Dollars

      Which I thought was called "natural order".
      Thank you, Bill Davis

      Comment


        #4
        Originally posted by William Davis View Post
        Is there any way to manually change/assign facet options display order (default sort order is out of "natural sequential order")?

        Denomination:

        1 Dollar Bill
        1 Penny
        10 Cents
        10 Dollar Bill
        20 Dollar Bill
        25 Cents
        5 Cents
        5 Dollar Bill
        I have not found a way other than to do something like a_Rest of Label, b_Another Label, c_More Labels. Then, in the template, do
        <mvt:assign name="l.setttings:display_label" value="gettoken(l.settings:whatever:label:is, '_', 2)" />

        &mvt:display_label;

        @Brenan We really need things like Display Value and maybe even Display Order for facets. Same with Attributes (at least the Display Name). Choose Size is great for the product page, looks stupid in basket.
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          I searched and found there has been discussion of this dream feature in the forums as far back as 2019. I found a couple of solutions outside of Miva, but haven't tried them. Glendale Designs has a customization listed under their article "Sorting Numeric Search Facets in Miva" found on their website. I also found Steve Soule has a solution at GitHub "Miva - Sort Facets Numerically". Neither of these solve the need for control of display order for sorting apparel sizes or any other ordered list like calendar months, for instance.

          According to Glendale Designs, proper sorting can improve conversions by 20%, so it would seem this is a very desirable feature!


          Shannon Wright
          Xact Xpressions, Inc.

          Comment


            #6
            The logic that is offered in Steven Soule's gist could still be used for sorting text but would need some modifications.

            The most common solution for this issue is to prepend a numerical value to the filter value. The software will output the values in alphanumeric order which you can then use Miva template code within the filters loop to remove the prepended number and output the value.

            Nicholas Adkins
            Technical Training Specialist / Miva, Inc.
            [email protected]
            https://www.miva.com/mivalearn

            Comment


              #7
              Originally posted by Nick View Post
              The logic that is offered in Steven Soule's gist could still be used for sorting text but would need some modifications.

              The most common solution for this issue is to prepend a numerical value to the filter value. The software will output the values in alphanumeric order which you can then use Miva template code within the filters loop to remove the prepended number and output the value.
              AKA

              I have not found a way other than to do something like a_Rest of Label, b_Another Label, c_More Labels. Then, in the template, do
              <mvt:assign name="l.setttings:display_label" value="gettoken(l.settings:whatever:label:is, '_', 2)" />

              &mvt:display_label;
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #8
                Originally posted by Bruce - PhosphorMedia View Post

                I have not found a way other than to do something like a_Rest of Label, b_Another Label, c_More Labels. Then, in the template, do
                <mvt:assign name="l.setttings:display_label" value="gettoken(l.settings:whatever:label:is, '_', 2)" />

                &mvt:display_label;

                Brennan We really need things like Display Value and maybe even Display Order for facets. Same with Attributes (at least the Display Name). Choose Size is great for the product page, looks stupid in basket.
                Correction of name misspelling.
                Thank you, Bill Davis

                Comment

                Working...
                X