Jump to content

Problem with duplicate row in product table price


Nico_presta
 Share

Recommended Posts

Hello

I have a concern about this product for example: https://www.urban-nutri-shop.com/bcaa-x5-elite-series-360g-genius-nutrition#/71-format-boite_de_360g_30_portions/75-saveurs- lytchee

I have the regressive price table which duplicates me each line several times. I switched to a default theme but the problem persists. I have also deactivated a few extensions, still the same problem.

Prestashop 1.7.7.1

Can someone help me out?

Thank you very much.

prix specifique.JPG

Share this post


Link to post
Share on other sites

The problem cannot be identified from the image or page.

The mistake will be that you have 8 combinations and it shows you 8 times the same values.


File that displays the table:

./themes/your-theme/templates/catalog/_partials/product-discounts.tpl

and

./controllers/front/ProductController.php

functions:

* getTemplateVarProduct()

 * assignPriceAndTax()

Share this post


Link to post
Share on other sites

Hello

I am posting here the file present in the theme, product-discounts.tpl. Do you see a problem?

<section class="product-discounts">
{if $product.quantity_discounts}
  <div class="product-discounts-wrapper md-bottom">
    <label class="product-discounts-title">{l s='Volume discounts' d='Shop.Theme.Catalog'}</label>

    {block name='product_discount_table'}
      <table class="table table-bordered table-product-discounts">
        <thead class="thead-default">
          <tr>
            <th>{l s='Quantity' d='Shop.Theme.Catalog'}</th>
            <th>{$configuration.quantity_discount.label}</th>
            <th>{l s='You Save' d='Shop.Theme.Catalog'}</th>
          </tr>
        </thead>
        <tbody>
        {foreach from=$product.quantity_discounts item='quantity_discount' name='quantity_discounts'}
          <tr data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value}" data-discount-quantity="{$quantity_discount.quantity}">
            <td>{$quantity_discount.quantity}</td>
            <td>{$quantity_discount.discount}</td>
            <td>{l s='Up to %discount%' d='Shop.Theme.Catalog' sprintf=['%discount%' => $quantity_discount.save]}</td>
          </tr>
        {/foreach}
        </tbody>
      </table>
    {/block}
  </div>
{/if}
</section>

Thanks

Nicolas

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More