0

Note: This is a duplicate of a support request in Devot:ee but unfortunately I haven't had a response.

I’m having an issue with counter which could really cause me headaches further down the line in the site that I'm developing. Counter doesn’t appear to update according to my url. I am using several categories to filter a list of products, and while the filter works perfectly with the entries that it outputs, the counter doesn’t. This means that the code is also outputting category options (on the second or third stage of filtering) which are empty. Hopefully my code helps explain this:

// EXAMPLE URL - domain.co.uk/paper-card
{if triggers:cat_name_1 == ""}
  <h2>Colour Range</h2>
  {exp:zoo_triggers:categories status="open" channel="pm_paper_card" style="list" cat_group_id="1" show_counter="yes" show_empty="no"}
{/if}

// EXAMPLE URL - domain.co.uk/paper-card/category/whites
{if triggers:cat_name_1 != "" AND triggers:cat_name_2 == ""}
  <h2>Sheet Size</h2>
  {exp:zoo_triggers:categories status="open" channel="pm_paper_card" style="list" cat_group_id="2" show_counter="yes" show_empty="no" path="{triggers:original_uri}" all_path="no"}
{/if}

// EXAMPLE URL - domain.co.uk/paper-card/category/whites/a4
{if triggers:cat_name_2 != "" AND triggers:cat_name_3 == ""}
  <h2>Pack Size</h2>
  {exp:zoo_triggers:categories status="open" channel="pm_paper_card" style="list" cat_group_id="3" show_counter="yes" show_empty="no"  path="{triggers:original_uri}"}
{/if}

// BELOW HERE IS WORKING FINE
// EXAMPLE URL - domain.co.uk/paper-card/category/whites/a4/small-box
{if triggers:segment_5 == "small-box" OR triggers:segment_5 == "midi-box" OR triggers:segment_5 == "mega-box" OR triggers:segment_5 == "a3-box"}
  <h2>Pick &amp; Mix - {triggers:cat_name_3}</h2>
  {exp:stash:get_list name="products"}
    <p>{title} - {weight}</p>
  {/exp:stash:get_list}
{/if}

{if triggers:segment_5 == "packs"}
  <h2>{triggers:cat_name_3}</h2>
  {exp:stash:get_list name="products"}
    <p>{title} - {weight}</p>
  {/exp:stash:get_list}
{/if} 

My problem is, in stage one I have 3 categories:

  • Whites (13)
  • Colours (1)
  • Pearlised (1)

If I select Whites, in stage two I have 2 categories, however the total count for each category is taken from all entries, not the filtered list as I would expect:

  • A4 (14)
  • A3 (1)

Also, this becomes an issue if I select Colours or Pearlised, where I have only 1 product, neither of which have A3 as a category but it still shows A3 as a category option (and the incorrect counters).

This is the first time I’ve used Zoo Triggers so I appreciate I could be making some glaring mistake or have overlooked something in the docs.

If anyone can point out where I am going wrong it would be greatly appreciated as I feel I have exhausted the docs. Thanks.

0

Updating question to state that after direct contact from Zoo, it appears that this is beyond the scope of Zoo Triggers functionality.

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.