Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Add New Product Template Rate Topic   - - - - -

 
  • MichaelG
  • Newbie
  • Trial users
  • Join Date: 11-Apr 17
  • 4 posts

Posted 24 April 2019 - 11:59 AM #1

Hi There,

 

I am adding a new product template for our store. I am using the following link to add a new view, but when i add the thumbnails there then it will display the following class:

ty-no-image__icon ty-icon-image

How can i fix this to display the thumbnails?

 

Thanks in advance.

Attached Files



 
  • galtinbaeva
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3365 posts

Posted 24 April 2019 - 01:39 PM #2

Hi There,

 

I am adding a new product template for our store. I am using the following link to add a new view, but when i add the thumbnails there then it will display the following class:

ty-no-image__icon ty-icon-image

How can i fix this to display the thumbnails?

 

Thanks in advance.

 

Hello,

 

How do you add thumbnails? Please send a piece of code.


Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Google Analytics Enhanced Ecommerce - get advanced ecommerce analytics


 
  • MichaelG
  • Newbie
  • Trial users
  • Join Date: 11-Apr 17
  • 4 posts

Posted 24 April 2019 - 01:50 PM #3

{include file="common/image.tpl" image_width="70" image_height="70" images=$product.main_pair obj_id=$obj_id_prefix no_ids=true class="ty-thumbnail-list__img"}

I use the code from links_thumb.tpl as a exemple.



 
  • MichaelG
  • Newbie
  • Trial users
  • Join Date: 11-Apr 17
  • 4 posts

Posted 01 May 2019 - 11:59 AM #4

I am using the following code to display the products as a grid list. This is a copy of links_thumbs.tpl

 

 

 /list_template/cards.tpl

<div class="grid-container">
    {foreach from=$products item="product" name="products"}
        {assign var="obj_id" value=$product.product_id}
        {assign var="obj_id_prefix" value="`$obj_prefix``$product.product_id`"}
        {include file="common/product_data.tpl" product=$product}
        <div class="product-card">
            <a class="ty-thumbnail-list__img-block" href="{"products.view?product_id=`$product.product_id`"|fn_url}">{include file="common/image.tpl" image_width="70" image_height="70" images=$product.main_pair obj_id=$obj_id_prefix no_ids=true class="ty-thumbnail-list__img"}</a>
            <div class="ty-thumbnail-list__name">{if $block.properties.item_number == "Y"}{$smarty.foreach.products.iteration}.&nbsp;{/if}
            {assign var="name" value="name_$obj_id"}<bdi>{$smarty.capture.$name nofilter}</bdi></div>

            {$smarty.capture.$price nofilter}
        </div>
    {/foreach}
</div>

/products/products_card.tpl

{** block-description:cards **}

{if $block.properties.hide_add_to_cart_button == "Y"}
    {assign var="_show_add_to_cart" value=false}
{else}
    {assign var="_show_add_to_cart" value=true}
{/if}


{assign var="_show_name" value="true"}

{include file="blocks/list_templates/cards.tpl" 
products=$items 
obj_prefix="`$block.block_id`000" 
item_number=$block.properties.item_number
show_name=$_show_name
no_pagination=true
show_price=false
show_rating=false 
show_add_to_cart=$_show_add_to_cart 
show_list_buttons=false
add_to_cart_meta="text-button-add"
but_role="text"}

I am still getting the no-images class. Do i something wrong or missing something?