I had this scenario working before:
- A Stash "standard.hmtl" template with {exp:stash:get name="maincontent"}
A single-view template for products that looks like this:
{!-- set the page layout --} {stash:embed:layouts:standard} {exp:stash:set name="body_id"}category_index{/exp:stash:set} {!-- main page variables --} {exp:stash:set name="maincontent" parse_tags="yes"} {if no_results OR segment_3!=""}{redirect="404"}{/if} <div id="content"> <div class="intro"> <div class="text"> {ll_intro} </div><!-- /text --> <div class="clear"></div> </div><!-- /intro --> <div class="products-new"> <ul class="noGrid"> {exp:low_variables:pair var="ll_products" multiple="yes" status='{exp:stash:get name="functions:preview-status" file="yes" parse_tags="yes" parse_conditionals="yes"}' parse="inward"} {if no_results:no_results} {exp:stash:get name="sn_no_results" type="snippet"} {/if} {stash:embed name="snippets:productdiv-new" process="start"} {/exp:low_variables:pair} <li class="gap"></li> <li class="gap"></li> </ul> </div> </div><!-- /content --> {/exp:stash:set}
snippets:productdiv-new contains:
<li class="mix {if product_price:plus_tax_numeric > "88.99"}freeshipping{/if} {brand}" data-price="{product_price:plus_tax_numeric}">
{if status == "Draft"}<img class="draft" src="/assets/img/site/draft.png" />{/if}
{exp:entry_age unit="days" max_age="21" entry_date="{entry_date}"}
<a href="{page_url}">
<img class="new-badge" src="/assets/img/site/neu.png" alt="Neu! (ein 'Fähnchen', welches signalisiert, dass dieses Produkt neu in unseren Shop aufgenommen wurde)" />
</a>
{/exp:entry_age}
<a href="{page_url}">
{if produktbilder}
{exp:channel_images:images entry_id="{entry_id}" cover_only="yes"}
<img class="product" src="{image:url:index_thumbnail}" width="{image:width:index_thumbnail}" height="{image:height:index_thumbnail}" alt="{image:title}" />
{/exp:channel_images:images}
{if:else}
<img class="product" src="/assets/img/site/no_picture.png" alt="Platzhaltergrafik mit der Aufschrift 'Kein bild'" />
{/if}
<div class="availability-new">
{if product_inventory == "0"}
<img src="/assets/img/site/availability_red.png" alt="Ampel, die auf rot steht" title="Dieser Artikel ist bald wieder für Sie verfügbar" />{/if}
{if product_inventory > "0"}
<img src="/assets/img/site/availability_green.png" alt="Ampel, die auf rot steht" title="Der Artikel ist auf Lager" />{/if}
</div>
</a>
<div class="meta">
{if product_price:plus_tax_numeric > "88.99"}
<a class="image" href="{page_url}">
<img src="/assets/img/site/truck-green-23.png" alt="Truck" title="Kostenfreier Versand!" />
</a>
{/if}
{if channel_video}
{exp:channel_videos:videos entry_id="{entry_id}"}
<a class="video image" href="{video:url}">
<img src="/assets/img/site/play-red-20.png" alt="Kamerasymbol" title="Zu diesem Artikel ist ein Produktvideo vorhanden" />
</a>
{/exp:channel_videos:videos}
{/if}
</div><!-- /meta -->
<div class="schatten">
<img src="/assets/img/site/shadow_img_index.png" alt="Schatten" style="width: 190px;"/>
</div>
<h3>{title}{if subtitle}<br /><span>{subtitle}</span>{/if}</h3>
<div class="price">
{if product_original_price && product_original_price > product_price}
<span class="reduced_price">{product_price:plus_tax} €</span> <span class="original_price">{product_original_price:plus_tax} €</span>
{if:else}
<div class="price">{product_price:plus_tax} €</div>
{/if}
</div><!-- /price -->
</li>
When pasting the content from snippets:productdiv-new directly into the single-view template everything's working as desired.
When putting the code into a Stash snippet and then calling it like in the above codeblock ({stash:embed name="snippets:productdiv-new" process="start"}) everything works BUT the images from {exp:channel_images:images...} are not being displayed, the inventory doesn't get reflected and videos and freeshipping if conditionals don't get parsed.
So, basiclly all of the if conditionals don't get evaluated.
I had the very same code working before but since upgrading Stash from 2.3.9 to 2.4.4 it isn't working anymore.
Anyone able to spot the problem?
Thanks and Cheers!