rubenalb90 Posted April 15, 2016 Share Posted April 15, 2016 I was customising the shopping cart summary on the checkout page (i use opc) and I just realised that the 'DELETE' button for each product line has disappeared. When I look in firebug, the <td> is empty, even though the code is where it should be in theme/shopping-cart.tpl. I have restored the original file but even then the DELETE button is missing.How can I find out what is causing this?My site is http://www.litografias.net/ . When you buy a product and you go to the car, you'll see that there is no DELETE button available to remove the product.Any ideas would be greatly appreciated My tbody of the shopping-cart.tpl is the following: <tbody>{assign var='odd' value=0} {assign var='have_non_virtual_products' value=false} {foreach $products as $product} {if $product.is_virtual == 0} {assign var='have_non_virtual_products' value=true} {/if} {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute} {assign var='quantityDisplayed' value=0} {assign var='odd' value=($odd+1)%2} {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId) || count($gift_products)} {* Display the product line *} {include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} {* Then the customized datas ones*} {if isset($customizedDatas.$productId.$productAttributeId)} {foreach $customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] as $id_customization=>$customization} <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="product_customization_for_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}{if $odd} odd{else} even{/if} customization alternate_item {if $product@last && $customization@last && !count($gift_products)}last_item{/if}"> <td></td> <td colspan="3"> {foreach $customization.datas as $type => $custom_data} {if $type == $CUSTOMIZE_FILE} <div class="customizationUploaded"> <ul class="customizationUploaded"> {foreach $custom_data as $picture} <li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li> {/foreach} </ul> </div> {elseif $type == $CUSTOMIZE_TEXTFIELD} <ul class="typedText"> {foreach $custom_data as $textField} <li> {if $textField.name} {$textField.name} {else} {l s='Text #'}{$textField@index+1} {/if} : {$textField.value} </li> {/foreach} </ul> {/if} {/foreach} </td> <td class="cart_quantity" colspan="2"> {if isset($cannotModify) AND $cannotModify == 1} <span>{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span> {else} <input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}_hidden"/> <input type="text" value="{$customization.quantity}" class="cart_quantity_input form-control grey" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}"/> <div class="cart_quantity_button clearfix"> {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} <a id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_down btn btn-default button-minus" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&op=down&token={$token_cart}")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Subtract'}"> <span><i class="icon-minus"></i></span> </a> {else} <a id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="cart_quantity_down btn btn-default button-minus disabled" href="#" title="{l s='Subtract'}"> <span><i class="icon-minus"></i></span> </a> {/if} <a id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_up btn btn-default button-plus" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery}&id_customization={$id_customization}&token={$token_cart}")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add'}"> <span><i class="icon-plus"></i></span> </a> </div> {/if} </td> <td class="cart_delete"> {if isset($cannotModify) AND $cannotModify == 1} {else} <div> <a id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_delete" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Delete'}"> <i class=" icon-trash"></i> </a> </div> {/if} </td> </tr> {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity} {/foreach} {* If it exists also some uncustomized products *} {if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first}{/if} {/if} {/foreach} {assign var='last_was_odd' value=$product@iteration%2} {foreach $gift_products as $product} {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute} {assign var='quantityDisplayed' value=0} {assign var='odd' value=($product@iteration+$last_was_odd)%2} {assign var='ignoreProductLast' value=isset($customizedDatas.$productId.$productAttributeId)} {assign var='cannotModify' value=1} {* Display the gift product line *} {include file="$tpl_dir./shopping-cart-product-line.tpl" productLast=$product@last productFirst=$product@first} {/foreach} </tbody> {if sizeof($discounts)} <tbody> {foreach $discounts as $discount} <tr class="cart_discount {if $discount@last}last_item{elseif $discount@first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}"> <td class="cart_discount_name" colspan="3">{$discount.name}</td> <td class="cart_discount_price"> <span class="price-discount"> {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if} </span> </td> <td class="cart_discount_delete">1</td> <td class="cart_discount_price"> <span class="price-discount price">{if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}</span> </td> <td class="price_discount_del text-center"> {if strlen($discount.code)} <a href="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}?deleteDiscount={$discount.id_discount}" class="price_discount_delete" title="{l s='Delete'}"> <i class="icon-trash"></i> </a> {/if} </td> </tr> {/foreach} </tbody> {/if} </table> Link to comment Share on other sites More sharing options...
premiumpresta Posted April 15, 2016 Share Posted April 15, 2016 I see in your code that the delete link and icon is showed only if the variable $cannotModify is not defined or false: <td class="cart_delete"> {if isset($cannotModify) AND $cannotModify == 1} {else} <div> <a id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" class="cart_quantity_delete" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&id_address_delivery={$product.id_address_delivery}&token={$token_cart}")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Delete'}"> <i class=" icon-trash"></i> </a> </div> {/if} Maybe that variable is set somewhere to be true. Link to comment Share on other sites More sharing options...
rubenalb90 Posted April 19, 2016 Author Share Posted April 19, 2016 No one can help me? I don't know if I'm looking the right .tpl Here you have an image to see what i need to change: http://i.imgur.com/zw44PGJ.png This image should look like this: http://i.imgur.com/TxqRqre.png Link to comment Share on other sites More sharing options...
selectshop.at Posted April 19, 2016 Share Posted April 19, 2016 As premiumpresta told, it is a problem of your fashion theme. Seems that variable is missing, or wrong set. You should ask theme developer for to debug your problem. Link to comment Share on other sites More sharing options...
vivianne Posted November 7, 2017 Share Posted November 7, 2017 On 19.4.2016 at 0:57 PM, selectshop.at said: As premiumpresta told, it is a problem of your fashion theme. Seems that variable is missing, or wrong set. You should ask theme developer for to debug your problem. The "Delete" Button is not showing in Chrome - but it is in Safari as an example. This has nothing to do with a theme feature because I use the default theme. In other threads I found the same problem caused by cookie subjects. Please check this soon - my customers are not happy with this!! Link to comment Share on other sites More sharing options...
selectshop.at Posted November 7, 2017 Share Posted November 7, 2017 @ vivianne - If it is showing in one browser and not in another, so of course it is a problem of the theme as well (css wrong coded). Please inform the URL of your site, so that we can visualize the problem ON YOUR SITE.. Link to comment Share on other sites More sharing options...
ubiq Posted August 30, 2018 Share Posted August 30, 2018 Same problem here on a Prestashop 1.6.1.20 And what is said here is true : https://www.prestashop.com/forums/topic/268725-solved-delete-button-gone-missing-on-cart-page/ It seems to be Cookie related, in a way. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now