Iterate through a catalog


hi bc,

 

i need create liquid collection contains every product in specific catalog , render each product using loop:

 

{% item in collectionname.items -%}

  <div class="grid-item grid-sizer wide photography">

     <div class="thumbnail overlay-img-scale-in" data-hover-easing="easeinout" data-hover-speed="700" data-hover-bkg-color="#000000" data-hover-bkg-opacity="0.1">

         <a class="overlay-link" href="{{item.urlwithhost}}">

             <img src="{{item.smallimageurl}}" alt="" />

             <span class="overlay-info">

                 <span>

                     <span>

                         <span class="project-title">{{item.title}}</span>

                         <span class="project-description">{{item.description}}</span>

                     </span>

                 </span>

             </span>

         </a>

     </div>

  </div>

  {% endfor -%}

 

i have tried doing legacy tags despite putting code block module template product layout (small), bc renders products in either table or list. after frustration bc support have figured out way make work , subvert bc engine liquid, can not find reference explains how create liquid collection of products in catalog enables loop work.

 

if can awesome.

 

-jason

so have found work around using module_productfeaturelist , tagging products same tag, getting 4 products , not 15 have loaded admin...

 

here's current working (used loosely) code:

 

{module_productfeaturelist tag="all" collection="productz" template=""}

  {% item in productz.items -%}

  <div class="grid-item grid-sizer photography">

     <div class="thumbnail overlay-img-scale-in" data-hover-easing="easeinout" data-hover-speed="700" data-hover-bkg-color="#000000" data-hover-bkg-opacity="0.3">

         <a class="overlay-link" href="{{item.urlwithhost}}">

             <img src="{{item.smallimageurl}}" alt="" />

             <span class="overlay-info">

                 <span>

                     <span>

                         <span class="project-title">{{item.title}}</span>

                         <span class="project-description">{{item.description}}</span>

                     </span>

                 </span>

             </span>

         </a>

     </div>

  </div>

  {% endfor -%}

 

there has way create collection of products based on catalog there in. why else create catalog...



More discussions in Developer forum


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop