Jump to content

get products images on product tpl 1.7


selin

Recommended Posts

  • agency
  1 hour ago, Nishith said:

Hi...
which ps version you use ?

{$product.cover} user the main cover image of product and {$product.images} use any other image thumbnails

Thanks

Hi Nishith,

1.7.4.4

If I disable the combinations, all images are showed. But If I enable the attributes with images, showing just one image. I want to show all images when the product detail page is first loaded, then If I select a color, one image can be showed: it's okay.

Well,

It's already okay as you said:

{if $product.cover}
        <img class="js-qv-product-cover" src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image">
        <div class="layer hidden-sm-down" data-toggle="modal" data-target="#product-modal">
          <i class="material-icons zoom-in">&#xE8FF;</i>
        </div>
      {else}
        <img src="{$urls.no_picture_image.bySize.large_default.url}" style="width:100%;">
      {/if}

 

BUT:

Although the photo is not shown, photos are not shown.

<ul class="product-images js-qv-product-images">
        {foreach from=$product.images item=image}
          <li class="thumb-container">
            <img
              class="thumb js-thumb {if $image.id_image == $product.cover.id_image} selected {/if}"
              data-image-medium-src="{$image.bySize.medium_default.url}"
              data-image-large-src="{$image.bySize.large_default.url}"
              src="{$image.bySize.home_default.url}"
              alt="{$image.legend}"
              title="{$image.legend}"
              width="100"
              itemprop="image"
            >
          </li>
        {/foreach}
      </ul>

 

Thanks!

Edited by selin (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...