Wrong category (cat_slug) is shown

  • February 21, 2017 at 10:38 #14138
    Alexandre
    Member

    Hello,

    In ASA 2 Repo > Categories I’ve created 4 different categories, each of them has its own slug (so the slugs are unique). Each category has 10 products. I have 4 different pages. On each page I try to add a smart collection calling a particular cat_slug. For example, on the page “Automatic Expresso Coffee Machines” I have this short code [asa2_smart_collection tpl="Sortable_table" s="cat_slug="top-10-expresso-automatic-coffee-machines"" /], on the page on the page “Top 10 Expresso Coffee Machines” I have this short code [asa2_smart_collection tpl="Sortable_table" s="cat_slug="top-10-expresso-coffee-machines"" /] etc. The problem is that I have the same table on the 4 pages. Altghout the short code is different on each page.

    What can I do ?

    February 21, 2017 at 11:33 #14139
    Timo
    Keymaster

    Hi,

    I am not sure if your shortcodes are right or got changed here by the forum syntax parser, but that option part looks wrong:
    s=”cat_slug=”top-10-expresso-automatic-coffee-machines””

    Option s should contain a search string. In your example it includes the other option cat_slug. I think you do not need option s at all because you just want to filter for cat_slug.

    So I think your shortcodes should look like this:

    [asa2_smart_collection tpl="Sortable_table" cat_slug="top-10-expresso-automatic-coffee-machines" /]

    [asa2_smart_collection tpl="Sortable_table" cat_slug="top-10-expresso-coffee-machines" /]

    More details about the options for shortcode asa2_smart_collection can be found here: http://docs.getasa2.com/shortcodes_asa2_smart_collection.html#cat-slug

    February 22, 2017 at 12:35 #14140
    Alexandre
    Member

    Hi Timo,

    Thank you very much for your help. My problem is resolved.

    I don’t know why asa 2 plugin add the option “s”

    February 26, 2017 at 21:55 #14141
    Timo
    Keymaster

    Thanks for your reply. I am happy that I could help you.

You must be logged in to reply to this topic.

Topic Tags