Module, Plugin

Archived
Forum
(read-only)

Reefine

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Patrick Woodcock

     

filter:field_name:orderby=“value1|value2|value3” not working

Bug (Resolved)

jmg
jmg

filter:field_name:orderby functionality doesn’t seem to be working with any fields/values that I’m passing in.

Reference code:

{exp:reefine channel="product_details" 
    
parse="inward" 
    
theme="gear-selector" 
    
method="ajax"
    
category="74|240|241|242|243|244|245|246" {!-- only show all accessories --}
    filter
:color:fields="housing_color"
    
filter:gender:fields="fits_make"
    
filter:fields="fits_model"
    
filter:size:fields="fits_model"
    
filter:size:orderby="s|m|l|xl"
    
}
    {entries}
        {embed
="_partials/gear-product-cards" entryids="{entry_ids}"}
    {
/entries}
{
/exp:reefine} 
Patrick Woodcock
# 1
Developer
Patrick Woodcock

Hi. You have two filter groups “size” and “fits_model”, only the size group has the orderby applied . I suggest this change:

{exp:reefine channel="product_details" 
    
parse="inward" 
    
theme="gear-selector" 
    
method="ajax"
    
category="74|240|241|242|243|244|245|246" {!-- only show all accessories --}
    filter
:color:fields="housing_color"
    
filter:gender:fields="fits_make"
    
filter:fits_model:fields="fits_model"
    
filter:fits_model:orderby="s|m|l|xl"
    
}
    {entries}
        {embed
="_partials/gear-product-cards" entryids="{entry_ids}"}
    {
/entries}
{
/exp:reefine} 
jmg
# 2
jmg

Hi Patrick, I still have the same results when I remove the duplicate and changing to the exact code block you provided.

Patrick Woodcock
# 3
Developer
Patrick Woodcock

Hi

That’s odd. Is it online anywhere I can see it? If you need to send me login details you can email me patrick (at) patrickw.tech

jmg
# 4
jmg

Here’s the link: http://trijdev.jmgstaging.com/products/gear

The additional size variations have been added to the code as well. Let me know if you need login details

Patrick Woodcock
# 5
Developer
Patrick Woodcock

Hi

Can you tell me what the fieldtype of fits_model is? Also could you try using capitals instead eg “S|M|L|XL”

If that doesn’t work email me an admin login and I can take a look.

Patrick.

jmg
# 6
jmg

They are standard text input fields. changing case from ‘s’ to ‘S’ makes no change either. I’ll email you login credentials.