Jump to content

carga en pagina de producto lenta


Recommended Posts

hola!

Tengo prestashop 1.7.8.7 y desde hace unos días he notado que me carga muuuy lenta la pagina de la ficha de producto, pero el listado y la home me cargan normal. he ido borrando zonas de la pagina para ver cual es la que hace que cargue más lento y es el product-prices.tpl. Si dejo este archivo en blanco, la pagina carga 10 segundos más rápido. El codigo es el siguiente, no consigo saber qué puede haber cambiado para que vaya tan lento.

{**
 * 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
 *}
{if $product.show_price}
    {if ($product.online_only && $customer.is_logged) || !$product.online_only}
      <div class="product-prices">
        {block name='product_discount'}
          {if $product.has_discount}
            <div class="product-discount">
              {hook h='displayProductPriceBlock' product=$product type="old_price"}
              <span class="regular-price">{$product.regular_price}</span>
              {if $product.has_discount}
                {if $product.discount_type === 'percentage'}
                  <span class="discount discount-percentage">{l s='Save %percentage%' d='Shop.Theme.Catalog' sprintf=['%percentage%' => $product.discount_percentage_absolute]}</span>
                {else}
                  <span class="discount discount-amount">
                      {l s='Save %amount%' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.discount_to_display]}
                  </span>
                {/if}
              {/if}
            </div>
          {/if}
        {/block}

        {block name='product_price'}
          <div
            class="product-price h5 {if $product.has_discount}has-discount{/if}"
            itemprop="offers"
            itemscope
            itemtype="https://schema.org/Offer"
          >
            <link itemprop="availability" href="{$product.seo_availability}"/>
            <meta itemprop="priceCurrency" content="{$currency.iso_code}">
            

            <div class="current-price">
              <span itemprop="price" content="{$product.price_amount}">{$product.price}</span>
            </div>

            {block name='product_unit_price'}
              {if $displayUnitPrice}
                <p class="product-unit-price sub">{l s='(%unit_price%)' d='Shop.Theme.Catalog' sprintf=['%unit_price%' => $product.unit_price_full]}</p>
              {/if}
            {/block}
          </div>
        {/block}

        {block name='product_without_taxes'}
          {if $priceDisplay == 2}
            <p class="product-without-taxes">{l s='%price% tax excl.' d='Shop.Theme.Catalog' sprintf=['%price%' => $product.price_tax_exc]}</p>
          {/if}
        {/block}

        {block name='product_pack_price'}
          {if $displayPackPrice}
            <p class="product-pack-price"><span>{l s='Instead of %price%' d='Shop.Theme.Catalog' sprintf=['%price%' => $noPackPrice]}</span></p>
          {/if}
        {/block}

        {block name='product_ecotax'}
          {if $product.ecotax.amount > 0}
            <p class="price-ecotax">{l s='Including %amount% for ecotax' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.ecotax.value]}
              {if $product.has_discount}
                {l s='(not impacted by the discount)' d='Shop.Theme.Catalog'}
              {/if}
            </p>
          {/if}
        {/block}

        {hook h='displayProductPriceBlock' product=$product type="weight" hook_origin='product_sheet'}

        <div class="tax-shipping-delivery-label">
          {if $configuration.display_taxes_label}
            IVA incl.
            {$product.labels.tax_long}
          {/if}
          {hook h='displayProductPriceBlock' product=$product type="price"}
          {hook h='displayProductPriceBlock' product=$product type="after_price"}
          {if $product.additional_delivery_times == 1}
            {if $product.delivery_information}
              <span class="delivery-information">{$product.delivery_information}</span>
            {/if}
          {elseif $product.additional_delivery_times == 2}
            {if $product.quantity > 0}
              <span class="delivery-information">{$product.delivery_in_stock}</span>
            {* Out of stock message should not be displayed if customer can't order the product. *}
            {elseif $product.quantity <= 0 && $product.add_to_cart_url}
              <span class="delivery-information">{$product.delivery_out_stock}</span>
            {/if}
          {/if}
        </div>
        <div class="linea-precio-imp-exc">
        {$product.price_tax_exc|number_format:2:',':'.'} € <span>Sin IVA</span>
        </div>
      </div>
    {/if}
{else}
    <div class="product-add-to-cart">
    <span id="product-availability sinprecio" style="margin-top:30px";>             
    
    {if true}  
          {if $product.quantity > 2}
            <i class="material-icons rtl-no-flip product-available">&#xE5CA;</i> En stock
          {elseif $product.quantity >=1}
            <i class="material-icons icon-image-preview product-warning">warning</i> Últimas uds
          {else}
            <i class="material-icons icon-image-preview product-ask">help</i> Consultar
          {/if}
    {/if}
    </span>
        
    
    </div>
{/if}

 

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