Jump to content

Poner tabla descuento por cantidades en una pestaña


pienso

Recommended Posts

Yo te lo digo en base a la plantilla por defecto de Prestashop 1.5.
 
1º Paso buscar esto:
 

{if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
<!-- quantity discount -->
<ul class="idTabs clearfix">
        <li><a href="#discount" style="cursor: pointer" class="selected">{l s='Sliding scale pricing'}</a></li>
</ul>
<div id="quantityDiscount">
        <table class="std">
        <thead>
            <tr>
                <th>{l s='Product'}</th>
                <th>{l s='From (qty)'}</th>
                <th>{l s='Discount'}</th>
            </tr>
        </thead>
                <tbody>
            {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
            <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
                <td>
                    {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
                        {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
                    {else}
                        {$product->getProductName($quantity_discount.id_product)}
                    {/if}
                </td>
                <td>{$quantity_discount.quantity|intval}</td>
                <td>
                    {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
                       -{convertPrice price=$quantity_discount.real_value|floatval}
                   {else}
                       -{$quantity_discount.real_value|floatval}%
                   {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
        </table>
</div>
{/if}

Y dejarlo asi:
 

{* {if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
<!-- quantity discount -->
<ul class="idTabs clearfix">
        <li><a href="#discount" style="cursor: pointer" class="selected">{l s='Sliding scale pricing'}</a></li>
</ul>
<div id="quantityDiscount">
        <table class="std">
        <thead>
            <tr>
                <th>{l s='Product'}</th>
                <th>{l s='From (qty)'}</th>
                <th>{l s='Discount'}</th>
            </tr>
        </thead>
                <tbody>
            {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
            <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
                <td>
                    {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
                        {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
                    {else}
                        {$product->getProductName($quantity_discount.id_product)}
                    {/if}
                </td>
                <td>{$quantity_discount.quantity|intval}</td>
                <td>
                    {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
                       -{convertPrice price=$quantity_discount.real_value|floatval}
                   {else}
                       -{$quantity_discount.real_value|floatval}%
                   {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
        </table>
</div>
{/if} *}

2º Paso
 
Buscar esto:
 



                {if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if}

y justo debajo añadir esto:
 

         
 {if (isset($quantity_discounts) && count($quantity_discounts) > 0)} <li><a href="#quantityDiscount" >{l s='Sliding scale pricing'}</a></li>{/if}

10º Paso

 

Buscar esto:

   {if isset($product) && $product->description}
                <!-- full description -->
                <div id="idTab1" class="rte">{$product->description}</div>
        {/if}

y debajo añadir esto:

{if (isset($quantity_discounts) && count($quantity_discounts) > 0)}<div id="quantityDiscount">
        <table class="std">
        <thead>
            <tr>
                <th>{l s='Product'}</th>
                <th>{l s='From (qty)'}</th>
                <th>{l s='Discount'}</th>
            </tr>
        </thead>
                <tbody>
            {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
            <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
                <td>
                    {if (isset($quantity_discount.attributes) && ($quantity_discount.attributes))}
                        {$product->getProductName($quantity_discount.id_product, $quantity_discount.id_product_attribute)}
                    {else}
                        {$product->getProductName($quantity_discount.id_product)}
                    {/if}
                </td>
                <td>{$quantity_discount.quantity|intval}</td>
                <td>
                    {if $quantity_discount.price >= 0 OR $quantity_discount.reduction_type == 'amount'}
                       -{convertPrice price=$quantity_discount.real_value|floatval}
                   {else}
                       -{$quantity_discount.real_value|floatval}%
                   {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
        </table>
</div> {/if}
Link to comment
Share on other sites

Tema resuelto!!! Muchas gracias Nadie.

 

Para no abrir otro tema ¿ Se puede poner otro enlace en la descripción corta del producto al lado del enlace que pone "mas información" para que  vaya directamente a la pestaña personalización ?

 

PD: Nadie te vamos a echar mucho de menos por aquí :( Si me pasas tu dirección por privado, te mando un regalo en nombre de la comunidad en forma de agradecimiento.

 

Muchas gracias de corazón, mi tienda online es en gran parte gracias a tí.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...