All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Using 'Results Tag' as realted product search

aurorameida 22 Aug 2013 13:43 question, complete

Hi ya,

I am tweaking a site at the mo and and adding an automated 'Related Products' feature.

I am also using Stash to help out. The search results are coming through OK. However, I am trying to limit the results to the 'current' products category.

When I add anything to do with a category, the search result is empty. Any ideas where I am going wrong?

{exp:stash:set_list name="related:{segment_2}" parse_tags="yes" parse_depth="5" scope="site" save="no" replace="no" refresh="1440"}
{exp:low_search:results collection='[gen_products|tub_products|filt_products|pump_products]'
category_group='72'
site='ht'
entry_id='not {entry_id}' limit='8'
orderby_sort='random|asc'
}
{sn:product:thumbstash}
{/exp:low_search:results}
{/exp:stash:set_list}

I have tried:
• category_group='72'
• category='72'
• category='[72]'

The latter works, but I presume it is just being ignored by the parser as the results are random and not relate to the cat.

In the docs, under the results tags, you mention:
category:category_group

Many thanks

Replies

  1. Low 22 Aug 2013 14:28

    The parameter syntax never takes square brackets. That goes for all parameters, including collection and category.

    category="72" should work, like the native channel:entries tag. The category:group="" syntax is for combining AND and OR filtering for categories, and isn't relevant in your case, I think.

    Are you pulling entries from a different site, and using MSM, by any chance?

  2. aurorameida 22 Aug 2013 14:31

    Yeah, the current site I am working on is site1 where all the products are based.

    Ah, I thought it a little odd to use [ ]. I will banish them to hell! Thanks.

    Cheers

  3. Low 22 Aug 2013 14:48

    So you're on site 1 pulling search results from site 2? And that's not generating results when you define the category parameter?

  4. aurorameida 22 Aug 2013 14:52

    No, its all good. Currently on site1 and pulling results from site1. I will be adding this to site2/3 shortly though.

    Working like a charm now! Thanks very much Low. I guess I was having one of my many dumbass moments and should have realised not to include the [ ].

    Cheers