sickshot Posted October 6, 2023 Share Posted October 6, 2023 so on my website i made some changes and notice that product links only work on product title but not on images. i tried to move a href tag to image and even to whole div its in but it just not working anywhere but product title... its ps 1.7.7.7 default theme but modified. url: https://shorturl.at/boI01 heres product.tpl code i have: {** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License 3.0 (AFL-3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/AFL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors <contact@prestashop.com> * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) *} {block name='product_miniature_item'} <div itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="product"> {if isset($position)}<meta itemprop="position" content="{$position}" />{/if} <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemprop="item" itemscope itemtype="http://schema.org/Product"> <div class="fade1"> <div class="thumbnail-container"> {block name='product_thumbnail'} {if $product.cover} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src="{$product.cover.bySize.home_default.url}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" data-full-size-image-url="{$product.cover.large.url}" /> </a> {else} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src="{$urls.no_picture_image.bySize.home_default.url}" /> </a> {/if} {/block} <div class="overlay"> <div class="text12"><div class="product-description"> {block name='product_name'} {if $page.page_name == 'index'} <h3 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h3> {else} <h2 class="h3 product-title" itemprop="name"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:30:'...'}</a></h2> {/if} {/block} {block name='product_price_and_shipping'} {if $product.show_price} <div class="product-price-and-shipping"> {if $product.has_discount} {hook h='displayProductPriceBlock' product=$product type="old_price"} <span class="regular-price" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span> {if $product.discount_type === 'percentage'} <span class="discount-percentage discount-product">{$product.discount_percentage}</span> {elseif $product.discount_type === 'amount'} <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span> {/if} {/if} {hook h='displayProductPriceBlock' product=$product type="before_price"} <span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible"> <meta itemprop="priceCurrency" content="{$currency.iso_code}" /> <meta itemprop="price" content="{$product.price_amount}" /> </div> {hook h='displayProductPriceBlock' product=$product type='unit_price'} {hook h='displayProductPriceBlock' product=$product type='weight'} </div> {/if} {/block} {block name='product_reviews'} {hook h='displayProductListReviews' product=$product} {/block} </div></div> {include file='catalog/_partials/product-flags.tpl'} </div> </div> </article> </div> {/block} Link to comment Share on other sites More sharing options...
Yelish Posted October 6, 2023 Share Posted October 6, 2023 Hello, how are you? Have you tried clearing the cache? Someone had to say it, and not just through the back office. In the case of PrestaShop 7 and above, physically clear the cache. Then, request a template recompilation and see how it goes. Best regards, and have a great day! Link to comment Share on other sites More sharing options...
sickshot Posted October 7, 2023 Author Share Posted October 7, 2023 On 10/7/2023 at 1:49 AM, Yelish said: Hello, how are you? Have you tried clearing the cache? Someone had to say it, and not just through the back office. In the case of PrestaShop 7 and above, physically clear the cache. Then, request a template recompilation and see how it goes. Best regards, and have a great day! i have cleaned the cache many times from bo, other changes appear but not the hyperlink.. you mean manually delete files from cache/smarty/compile? Link to comment Share on other sites More sharing options...
Yelish Posted October 10, 2023 Share Posted October 10, 2023 To physically delete the cache, delete all the folders inside var/cache. There might be folders named 'dev' or 'prod'; delete them all Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now