1

UPDATE

Looks like it's only related to the particular product page. I can add PRODUCT A to another related page. Taking a look at that next :)

#

I'm not sure what's happening here.

SCENARIO

I have Playa and Stash working together to give me the Categories that the related entries are located.

ISSUE

PRODUCT A is added and select a Category. NOTHING appears on that particular entry page

If I change the Category of an existing product then it changes the category that's displayed.

If I add a NEW category and link PRODUCT A to it nothing appears.

If I change an existing product to the NEW Category it shows up.

Does Stash do some weird caching or something?

Trying to get my head wrapped around this one!

Here's my code:

{exp:stash:set_list name="product_info" parse_tags="yes" parse_depth="2"}
    {exp:playa:parents channel="products_accessories" sort="asc" orderby="title" disable="members"}
        {stash:product_url}{url_title_path='/products/accessories/'}{/stash:product_url}
        {stash:product_title}{title}{/stash:product_title}
        {stash:product_part_number}{products_accessories_part_number}{/stash:product_part_number}
        {stash:product_image}{if products_accessories_images}<div class="accessories_image">{products_accessories_images limit="1"}<p><img src="{exp:ce_img:single src='{image}'{sn_image_product_detail_accessories}}" alt="{alt}" class="img-responsive text-center" />{/products_accessories_images}</p></div>{/if}

        {if products_accessories_images ==''}<div class="accessories_image">{products_accessories_images_old limit="1"}<p><img src="{exp:ce_img:single src='/images/uploads/products/{image}'{sn_image_product_detail_accessories}}" alt="{alt}" class="img-responsive text-center" />{/products_accessories_images_old}</p></div>{/if}

        {/stash:product_image}
        {stash:product_content}{if products_accessories_content}{exp:eehive_hacksaw}{products_accessories_content}{/exp:eehive_hacksaw}{/if}{/stash:product_content}

        {!-- create an index for this product to match against --}
        {stash:categories}{categories}@{category_id}@{/categories}{/stash:categories}

        {categories}
            {exp:stash:append_list name="cat_accessories"}
                {stash:cat_id}{category_id}{/stash:cat_id}
                {stash:cat_name}{category_name}{/stash:cat_name}
            {/exp:stash:append_list}
        {/categories}
    {/exp:playa:parents}
{/exp:stash:set_list}

<div class="panel-group" id="accordion">
    <div class="panel panel-default">
{!-- list unique categories only --}
{exp:stash:get_list name="cat_accessories" unique="cat_id" orderby="cat_name" sort="asc"}
        <div class="panel-heading">
            <h4 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#collapse{cat_id}">{cat_name}</a>
            </h4>
        </div>

{!-- list products that belong to this category --}
        <div id="collapse{cat_id}" class="panel-collapse collapse">
            <div class="panel-body">
{exp:stash:get_list:nested name="product_info" match="#@{cat_id}@#" against="categories" orderby="product_title" sort="asc"}
                <div class="col-md-6 accessories_listings">
                    {product_image}
                    <h5>{product_title}</h5>
                    <p class="product_content">{product_content}</p>
                    <p class="product_number">Product Number: <strong>{product_part_number}</strong></p>
                </div>              
{/exp:stash:get_list:nested}
            </div><!-- end panel-body -->
        </div><!-- end panel-collapse -->
{/exp:stash:get_list}

1 Answer 1

1

Apparently it had to do with the Limit of entries in Playa. I changed the line to this and it works now :)

{exp:playa:parents limit="9999" channel="products_accessories" sort="asc" orderby="title" disable="members"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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