mk1_salami Posted November 24, 2013 Share Posted November 24, 2013 I'd like to remove the option for customers to change the quantity of items in their cart. At the moment they can add more than one of each item which I'd like to disable. Is this possible? Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted November 24, 2013 Share Posted November 24, 2013 Hi, by default Prestashop has only "Minimum quantity" option, if you want to remove qty selection from product/cart page, you need to edi product.tpl and shopping-cart-product-line.tpl files and .tpl of blockcart module Regards Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 well, if you want to disable qunatity option from cart you can do it in shopping-cart-product-line.tpl file there is a code: {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} <div class="cart_quantity_button"> <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" 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|intval}&token={$token_cart}")|escape:'html'}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br /> {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" 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|intval}&op=down&token={$token_cart}")|escape:'html'}" title="{l s='Subtract'}"> <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" /> </a> {else} <a class="cart_quantity_down" style="opacity: 0.3;" href="#" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" title="{l s='You must purchase a minimum of %d of this product.' sprintf=$product.minimal_quantity}"> <img src="{$img_dir}icon/quantity_down.gif" width="14" height="9" alt="{l s='Subtract'}" /> </a> {/if} </div> <input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}_hidden" /> <input size="2" type="text" autocomplete="off" class="cart_quantity_input" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{if $quantityDisplayed > 0}nocustom{else}0{/if}_{$product.id_address_delivery|intval}" /> {/if} just remove / comment it 2 Link to comment Share on other sites More sharing options...
mk1_salami Posted November 25, 2013 Author Share Posted November 25, 2013 Vekia - this is perfect and it worked. Thank you so much. Now i'm left with the "QTY" text above the column where the QTY buttons used to be. Do you know how I can remove this? Thanks Link to comment Share on other sites More sharing options...
mk1_salami Posted November 25, 2013 Author Share Posted November 25, 2013 Actually forget it. I've found it in front office translations and simply put a "-" where it should be. Thank you both. Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2013 Share Posted November 25, 2013 ok thank you for confiramtion so it's time to mark this thread as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts