Jump to content

imballo

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Matteo
  • Last Name
    Nardi

imballo's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

1

Reputation

  1. Solution (prestashop 1.6.1.10): In Cart.php modify CartCore::getSummaryDetails by adding this line $gift_product['id_cart_rule_gift']= $cart_rule['id_cart_rule']; after $gift_product = $product; $gift_product['cart_quantity'] = 1; $gift_product['price'] = 0; $gift_product['price_wt'] = 0; $gift_product['total_wt'] = 0; $gift_product['total'] = 0; $gift_product['gift'] = true; In shopping-cart.tpl add this line: {assign var='id_cart_rule_gift' value=$product.id_cart_rule_gift} inside this foreach command: {foreach $gift_products as $product} {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute} ... {include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} {/foreach} In shopping-cart-product-line.tpl add: {if !empty($product.gift)} {if strlen($product.id_cart_rule_gift)} <a href="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}?deleteDiscount={$product.id_cart_rule_gift}" class="price_discount_delete" title="{l s='Delete'}"> <i class="icon-trash"></i> </a> {/if} {/if} inside the else part of this conditional command: {if !isset($noDeleteButton) || !$noDeleteButton} <td class="cart_delete text-center" data-title="{l s='Delete'}" ... {if (!isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0) && empty($product.gift)} <div> ... </div> {else} ********************* add here ****************************** {/if} </td> {/if}
×
×
  • Create New...