Jump to content

Problème : Prix n'apparait plus sur les miniatures


Recommended Posts

Bonjour tout le monde,

 

Je me permets de vous contacter aujourd'hui car j'ai un soucis ... suite à plusieurs manipulations, le prix n'apparais plus dans mes catégories (alors qu'ils sont dans les sources de la page) :

275748949_exempleproblme.thumb.png.c02adb91da2a489664bde21e5d0361ba.png

Voici à quoi cela ressemblait avant modification :

Old-Version.thumb.png.f9f0609f771b38ebd99d1f69c45b4e49.png

 

J'ai l'impression que c'est un problème de CSS mais je n'ai touché à aucune feuille de style...

Pour info, je suis juste un jeune passionné qui a créé ce site pour me challenger et en même temps apprendre mais j'étais loin d'imaginer à l'époque qu'un mauvais choix de thème puisse m'handicaper autant ... chaque jour à son nouveau problème que je m'amuse à régler !

La raison des modifications :

J'ai modifié et réadapter le code de mes fichiers miniatures/product.tpl et partial_/product_prices.tpl pour les faire correspondre avec les prérequis de Google Search Console (outil de référencement). La première fois qu'il ont scanné les pages de mon site, des erreurs étaient détectés dans les catégories et sur les pages produits (j'ai compris par après que c'était liés aux miniatures des produits et pas les produits en eux-même).

 

J'ai donc modifier le code pour correspondre aux balise du méchant robot-Scanner de Google 😬 mais cela n'était pas censé impacter le résultat "front-user".

(Champ "aggregateRating", Champ "review", Champ "sku", code GTIN, référence fabricant ou ISBN, Product, image, description, offers, etc.)
 

Est-ce que quelqu'un aurait une idée ou une piste de réflexion à mon problème ? Je vous mets ci-joint le code source de ma page miniatures/product.tpl en espérant trouver une solution ...

{**
 * 2007-2018 PrestaShop
 *
 * 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.txt.
 * 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 http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2018 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{block name='product_miniature_item'}
  <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
	<meta itemprop="image" content="{$product.cover.large.url}" />
	<meta itemprop="description" content="{$product.manufacturer_name} {$product.name}" />
	<meta itemprop="sku" content="{$product.reference_to_display}" />
	<div itemprop="offers" itemtype="http://schema.org/Offer" itemscope>
		<meta itemprop="url" content="{$product.url}" />
		<meta itemprop="availability" content="https://schema.org/InStock" />
		<meta itemprop="priceCurrency" content="EUR" />
		<meta itemprop="itemCondition" content="New" />
		<meta itemprop="price" content="{$product.price_amount}" />
		<div itemprop="seller" itemtype="http://schema.org/Organization" itemscope>
			<meta itemprop="name" content="THIS IS THE SELLER's ORGANIZATIONS NAME" />
		</div>
	</div>
	<div itemprop="brand" itemtype="http://schema.org/Thing" itemscope>
		<meta itemprop="name" content="{$product.manufacturer_name}" />
	</div>

	<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="product-description">
        {block name='product_name'}
          {if $page.page_name == 'index'}
            <h3 class="h3 product-title" itemprop="name"><a href="{$product.url}">{$product.name|truncate:30:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title" itemprop="name"><a href="{$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="sr-only">{l s='Regular price' d='Shop.Theme.Catalog'}</span>
                <span class="regular-price">{$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="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
              <span class="price">{$product.price}</span>

              {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>

      {block name='product_flags'}
        <ul class="product-flags">
          {foreach from=$product.flags item=flag}
            <li class="product-flag {$flag.type}">{$flag.label}</li>
          {/foreach}
        </ul>
      {/block}

      <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
        {block name='quick_view'}
          <a class="quick-view" href="#" data-link-action="quickview">
            <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
          </a>
        {/block}

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

    </div>
  </article>
{/block}

Mon site web : https://www.omypool.com

Ma version de PrestaShop 1.7.6.7

 

 

Merci beaucoup pour votre temps et votre aide !

Je reste à votre disposition !

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

Bonjour Remy, 

 

 

Merci pour votre réponse...Je vais me penchez sur votre documentation.

 Le problème c'est qu'avec mon ancienne version, je n'arrive pas à être aux normes vis-à-vis de google... Est-ce que quelqu'un pourrais me donner des pistes de réflexion pour incorporer ces balises ((Champ "aggregateRating", Champ "review", Champ "sku", code GTIN, référence fabricant ou ISBN, Product, image, description, offers, etc.) dans mon ancienne version (que je vous met ci-dessous) :

 

{**
* 2007-2018 PrestaShop
*
* 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.txt.
* 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 http://www.prestashop.com for more information.
*
* @author    PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{block name='product_miniature_item'}
    <div class="product-item">
        <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product">
            <div class="thumbnail-container">
                <div class="product-image-block">
                    {block name='product_thumbnail'}
                        <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>
                    {/block}
                    {if $product.show_price}
                        {if $product.has_discount}
                            {if $product.discount_type === 'percentage'}
                                <span class="discount-percentage">{$product.discount_percentage}</span>
                            {/if}
                        {/if}
                    {/if}
                    {block name='product_flags'}
                        <ul class="product-flags">
                            {foreach from=$product.flags item=flag}
                                <li class="product-flag {$flag.type}">{$flag.label}</li>
                                {/foreach}
                        </ul>
                    {/block}
                    <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down">
                        {block name='quick_view'}
                            <a class="quick-view" href="#" data-link-action="quickview">
                                <i class="material-icons search">&#xE8B6;</i> {l s='Quick view' d='Shop.Theme.Actions'}
                            </a>
                        {/block}
                        {block name='product_variants'}
                            {if $product.main_variants}
                                {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
                            {/if}
                        {/block}
                    </div>
                </div>
                <div class="product-description">
                    {block name='product_name'}
                        <h1 class="h3 product-title" itemprop="name"><a href="{$product.url}">{$product.name|truncate:30:'...'}</a></h1>
                        {/block}
                        {block name='product_description_short'}
                        <div class="product-short-desc" id="product-description-short-{$product.id}" itemprop="description">{$product.description_short nofilter}</div>
                    {/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="sr-only">{l s='Regular price' d='Shop.Theme.Catalog'}</span>
                                    <span class="regular-price">{$product.regular_price}</span>
                                {/if}

                                {hook h='displayProductPriceBlock' product=$product type="before_price"}

                                <span class="sr-only">{l s='Price' d='Shop.Theme.Catalog'}</span>
                                <span itemprop="price" class="price">{$product.price}</span>

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

                                {hook h='displayProductPriceBlock' product=$product type='weight'}
                            </div>
                        {/if}
                    {/block}
                    <div class="add">
                        <form action="{$urls.pages.cart}" class="cart-form-url" method="post">
                            <input type="hidden" name="token" class="cart-form-token" value="{$static_token}">
                            <input type="hidden" value="{$product.id_product}" name="id_product">
                            <input type="hidden" class="input-group form-control" value="1" name="qty" />
                            <button data-button-action="add-to-cart" class="btn btn-primary">{l s='Add to cart' d='Shop.Theme.Actions'}</button>
                        </form>
                    </div>
                    {block name='product_reviews'}
                        {hook h='displayProductListReviews' product=$product}
                    {/block}
                </div>
            </div>
        </article>
    </div>
{/block}

 

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...