Mantovani Maurizio Posted April 2, 2016 Share Posted April 2, 2016 Hello everyone, I 'm looking for a module similar to this but free : http://addons.prestashop.com/en/19487-ilm-quantity-in-dozen.html Otherwise you can with ( product and cart ) .tpl make a small mod that allows me to be able to use only even numbers in the selection of the amount (2-4-6-8)? I have experience in html / css / js and little php. Please Help me.. Link to comment Share on other sites More sharing options...
Mantovani Maurizio Posted April 2, 2016 Author Share Posted April 2, 2016 (edited) I find a quick solution to the product page. Thx kingsinnersoul: https://www.prestashop.com/forums/topic/239317-change-quantity-with-buttons/ Add this code on product.tpl after {if !$PS_CATALOG_MODE}{/if} {assign var='categories' value=Product::getProductCategoriesFull($product->id, $cookie->id_lang)} {foreach from=$categories key='categoryId' item='category' name='categories'} {/foreach} {if $categoryId == '33' OR $categoryId == '34' OR $categoryId == '37'} {literal} <script type="text/javascript"> $(document).ready(function(){ $('#quantity_wanted').val(2); $('.product_quantity_up').on('click',function(){ if (isNaN(parseInt($('#quantity_wanted').val()))){$('#quantity_wanted').val(1)} else { if(parseInt($('#quantity_wanted').val())<=1){$('#quantity_wanted').val(parseInt($('#quantity_wanted').val())+0)} else {$('#quantity_wanted').val(parseInt($('#quantity_wanted').val())+1)}; } }); $('.product_quantity_down').on('click',function(){ if (isNaN(parseInt($('#quantity_wanted').val()))){$('#quantity_wanted').val(1)} else { if(parseInt($('#quantity_wanted').val())<=1){$('#quantity_wanted').val(parseInt($('#quantity_wanted').val())-1)} else {$('#quantity_wanted').val(parseInt($('#quantity_wanted').val())-1)}; }; }); }); </script> {/literal} {/if} But I miss implement it in the summary of the cart .. I cant find the file .TPL of summary cart order.. ( Steap - 1 ) Help please Edited April 2, 2016 by Mantovani Maurizio (see edit history) Link to comment Share on other sites More sharing options...
Mantovani Maurizio Posted April 2, 2016 Author Share Posted April 2, 2016 Ok i have find shopping-cart-product-line.tpl But my script dont work If press + add 2qty in the input but dont save and record only +1qty.. Please i need HELP 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