Announcement

Collapse
No announcement yet.

Filtering, Sort By custom field value

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

    Filtering, Sort By custom field value

    I have a product custom field that I need to supply as an option for sorting. Good example is a category product listing where the default available options might be price or newest, etc. An example of what I need to be able to sort-by is for instance the brightness of a light bulb where the values are stored in the custom field. That value can be expressed in "lumins" I think it's called.

    Are there built-in API functions to sort a category product listing by custom fields? Or, do I need to write a custom component module to accomplish this?

    If it matters, the RT will probably be Shadows, but could be Colossus.

    Thanks,

    Scott
    Last edited by ids; 09-21-20, 09:40 AM.
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    well, you could just wrap that controls value as a conditional and use the custom field array sort on the current product list array that you showed me :)
    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


      #3
      Ah, That code snippet slipped my mind. And, it likely leads to NOT needing a custom component module for a one-off.

      Now I just need a solution for including the option in the "Sort By" dropdown list. Wondering if the only choice is to rewrite(reconstruct the list) the dropdown code for the SELECT list? That is an acceptable answer, but not if there is already a way to insert the option in the list. In my scenario, I need to be able to insert the selection option to Sort By "Lumins, Highest to Lowest" and "Lumins, Lowest to Highest."

      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        yea, hard coding the list IMO would be the fastest/easiest. remember, a lot of these 'automated' control features where made when miva was basically intended to be built/created by folks who can't even spell HTML.
        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 guess my next question then, is there more flexibility for this sort of thing in Miva 10? Matt?

          (we know it's close to release. :) The docs are being updated in realtime.

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment

          Working...
          X