Jump to content

Strange behavior of product images.


Tomi14

Recommended Posts

Some pictures (or thumbnails of the next pictures) after enlargement,  moves to the home page, as soon as I press them.
In other products, photos can be viewed normally.

Examples (just click on product miniature, and after enlargment try to click on image):
Bad: https://vidos-domofony.pl/szyfratory/67--czytnik-linii-papilarnych-vidos-zs70.html

Ok: https://vidos-domofony.pl/akcesoria/111--modul-vidos-b3.html

 

There is even a different mouse pointer when you hover over the picture. One has a finger and the other has a normal cursor.

 

What it depends on?

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

Do you know maybe what files I should check?

 

I know that happen if I add related product:/


Edit.

I think something is wrong in product.tpl from /templates/catalog/_partials/miniatures

{**
 * 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)
 *}

{if !isset($column_val)}
  {$column_val = 'col-lg-3 col-md-4 col-xs-12'}
{/if}

{block name='product_miniature_item'}
<!-- shop-section start -->
    <div class="{$column_val} shop-block-one product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}">
        <div class="inner-box product">
          <div class="product_inside thumbnail-container">

            {block name='product_thumbnail'}
              {if $product.cover}
                <figure class="image-box">
                    <a href="{$product.url}" class="thumbnail product-thumbnail">
                      <img data-src="{$product.cover.bySize.home_default.url}" alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" class="lazy" data-full-size-image-url="{$product.cover.large.url}"/>
                    </a>
                    {include file='catalog/_partials/product-flags.tpl'}
                    <ul class="info-list clearfix">
                        <li>
                          {block name='quick_view'}
                                <a href="{$product.url}">
                                <i class="material-icons search">&#xE8B6;</i> {l s='Zobacz' d='Shop.Theme.Actions'}
                                </a>     
                          {/block}
                        </li>
                    </ul>
                </figure>
              {else}
                <figure class="image-box">
                  <a href="{$product.url}" class="thumbnail product-thumbnail">
                    <img data-src="{$urls.no_picture_image.bySize.home_default.url}" class="lazy" />
                  </a>
                  {include file='catalog/_partials/product-flags.tpl'}
                  <ul class="info-list clearfix">
                       <li>
                          {block name='quick_view'}
                            <a href="{$product.url}">
                                <i class="material-icons search">&#xE8B6;</i> {l s='Zobacz' d='Shop.Theme.Actions'}
                                </a> 
                          {/block}
                      </li>
                   
                  </ul>
                </figure>
              {/if}
            {/block}


            <div class="lower-content">
              {block name='product_name'}
                {if $page.page_name == 'index'}
                    <h2 class="title"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:50:'...'}</a></h2>
                {else}
                    <h2 class="title"><a href="{$product.url}" itemprop="url" content="{$product.url}">{$product.name|truncate:50:'...'}</a></h2>
                {/if}
              {/block}
    
              {block name='product_price_and_shipping'}
                {if $product.show_price}
                  <div class="theme-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'}">
                      {capture name='custom_price'}{hook h='displayProductPriceBlock' product=$product type='custom_price' hook_origin='products_list'}{/capture}
                      {if '' !== $smarty.capture.custom_price}
                        {$smarty.capture.custom_price nofilter}
                      {else}
                        {$product.price}
                      {/if}
                    </span>

              

                    {hook h='displayProductPriceBlock' product=$product type='unit_price'}

                    {hook h='displayProductPriceBlock' product=$product type='weight'}
                  </div>
                {/if}
              {/block}

        {block name='product_man'}
        {if isset($product.manufacturer_name)}<span class="product_manufacturer_name"> {l s='Producent: '} <a href="https://vidos-domofony.pl/">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</span>{/if}
                
        {/block}


              {block name='product_description_short'}
                <div id="product-description-short-{$product.id}" class="product-content" itemprop="description">{$product.description_short nofilter}</div>
              {/block}
              
              <div class="pro_desc_short">{$product.description_short nofilter}</div>

              <div class="product_inside_hover">

                {block name='product_variants'}
                  {if $product.main_variants}
                    {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
                  {/if}
                {/block}

                {block name='product_buy'}
                  <div class="product-addition">
                    <form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
                      <input type="hidden" name="token" value="{$static_token}">
                      <input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
                      {block name='product_add_to_cart'}
                        {include file='catalog/_partials/product-add-to-cart.tpl'}
                      {/block}
                    </form>
                  </div>
                {/block}

              </div>

              {block name='product_reviews'}
                {hook h='displayProductListReviews' product=$product}
              {/block}
            </div>


          </div>
        </div>
    </div>
<!-- shop-section end -->
{/block}

 

Edited by Tomi14 (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...