hi friends. i problem to show image in block.
i create a custom template for block Newest products:
and create files in:
templates/addons/my_changes/blocks/products/custom_item.tpl:
{** block-description:new_product **} {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="addons/my_changes/blocks/product_list_templates/new-product-grid.tpl" products=$items no_sorting="Y" no_pagination="Y" obj_prefix="`$block.block_id`000" show_add_to_cart=$_show_add_to_cart}
templates/addons/my_changes/blocks/product_list_templates/new-product-grid.tpl:
{** template-description:new-product-grid **} {include file="addons/my_changes/blocks/list_templates/new-product-grid.tpl" show_name=true show_sku=false show_price=true show_old_price=true show_clean_price=true show_add_to_cart=$show_add_to_cart|default:true but_role="action" hide_form=true hide_qty_label=true show_product_labels=false show_discount_label=false show_shipping_label=false }
templates/addons/my_changes/blocks/list_templates/new-product-grid.tpl:
{if $products} {script src="js/tygh/exceptions.js"} {if !$no_pagination} {include file="common/pagination.tpl"} {/if} {if !$no_sorting} {include file="views/products/components/sorting.tpl"} {/if} {assign var="image_width" value=$image_width|default:278} {assign var="image_height" value=$image_height|default:173} <div class="ty-compact-list"> {foreach from=$products item="product" key="key" 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} {hook name="products:product_compact_list"} <div class="ty-compact-list__item"> <form {if !$config.tweaks.disable_dhtml}class="cm-ajax cm-ajax-full-render"{/if} action="{""|fn_url}" method="post" name="short_list_form{$obj_prefix}"> <input type="hidden" name="result_ids" value="cart_status*,wish_list*,account_info*" /> <input type="hidden" name="redirect_url" value="{$config.current_url}" /> <div class="ty-compact-list__content"> <div class="ty-compact-list__image"> <a href="{"products.view?product_id=`$product.product_id`"|fn_url}"> {include file="common/image.tpl" image_width=$image_width image_height=$image_height images=$product.main_pair obj_id=$obj_id_prefix} </a> {assign var="product_labels" value="product_labels_`$obj_prefix``$obj_id`"} {$smarty.capture.$product_labels nofilter} </div> <div class="ty-compact-list__title"> {assign var="name" value="name_$obj_id"}<bdi>{$smarty.capture.$name nofilter}</bdi> {$sku = "sku_`$obj_id`"} {$smarty.capture.$sku nofilter} </div> <div class="ty-compact-list__controls"> <div class="ty-compact-list__price"> {assign var="old_price" value="old_price_`$obj_id`"} {if $smarty.capture.$old_price|trim} {$smarty.capture.$old_price nofilter} {/if} {assign var="price" value="price_`$obj_id`"} {$smarty.capture.$price nofilter} {assign var="clean_price" value="clean_price_`$obj_id`"} {$smarty.capture.$clean_price nofilter} </div> {if !$smarty.capture.capt_options_vs_qty} {assign var="product_options" value="product_options_`$obj_id`"} {$smarty.capture.$product_options nofilter} {assign var="qty" value="qty_`$obj_id`"} {$smarty.capture.$qty nofilter} {/if} {if $show_add_to_cart} {assign var="add_to_cart" value="add_to_cart_`$obj_id`"} {$smarty.capture.$add_to_cart nofilter} {/if} <div class="list-countr list-bookmark"> <span class="list-country">England</span> <span id="wrap_button_wishlist_62" class="button-submit button-wrap-left"> <span class="button-submit button-wrap-right"> <button type="submit" id="button_wishlist_62" class="button-submit-big btn-bookmark" name="dispatch[wishlist.add..62]"><i class="icon icon-bookmark"></i></button> </span> </span> </div> </div> </div> </form> </div> {/hook} {/foreach} <div class="clearfix"></div> <div><a class="new-gallery-see-all">see all</a></div> </div> {if !$no_pagination} {include file="common/pagination.tpl" force_ajax=$force_ajax} {/if} {/if}
but not show image:
please help me. tanx.