1

I'm trying to build some filtering into my store listing. The standard 'low to high' and 'high to low' kind of thing.

Dynamic Parameters seemed like a good option

http://ellislab.com/expressionengine/user-guide/add-ons/channel/dynamic_parameters.html

By using $_GET variables, I'm able to control the sort & orderby parameters. However, when I set ?orderby=price on my url, the filtering doesn't work.

?orderby=title works. ?sort=asc/desc works.

Price seems to be the only thing that doesn't. I'm wondering if this is a bug. Since the {exp:store:search} tag augments the native entries tag, maybe something is getting lost in translation.

Below is an abstract of my code:

{exp:store:search
  channel="shop"
  limit="12"
  dynamic_parameters="orderby|sort"
  dynamic="yes"
  paginate="bottom"
  show_future_entries="yes"}

  < Markup in here >

{/exp:store:search}
0

I don't think the Store search tag supports dynamic parameters for internal Store fields.

To work around this, you could put the orderby/sort parameters into segment variables (for example, orderby="{segment_3}".

Alternatively, you could use one of the many EE extensions which allow you to access GET variables as early parsed EE template vars.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.