TranceCode Posted January 17, 2018 Share Posted January 17, 2018 hey guys i have my webstore that i work but whit problem, i change and add a list whit my stock, but when i select for example 13 product of my list and press the button add to cart only add 1, i can select 12, 9, 20 product but allways add 1 product this is my website http://tucan.bri.cl/everwines/shop/index.php?id_category=12&controller=category and this is my code that i add to default template from prestashop 1.7.2.3 Please someone can help me <!-- custom code --> <div class="clearfix atc_div"> <p id="quantity_wanted_p"{if (!$allow_oosp && $product.quantity <= 0) || !$product.available_for_order || $PS_CATALOG_MODE} style="display: block;"{/if}> <select name="qty_{$product.id_product|intval}" id="quantity_to_cart_{$product.id_product|intval}" class="form-control not_unifrom"> {section name=foo_q start=0 loop=$product.quantity step=1} <option value="{$smarty.section.foo_q.index + 1}">{$smarty.section.foo_q.index + 1}</option> {/section} {if $product.quantity_all_versions < 1} <option value="0">0</option> {/if} </select> </p> <!-- Condicion para deshabilitar boton si stock es cero --> {if ($product.allow_oosp || $product.quantity == 0 )} <div class="add"> <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" disabled > <!-- <i class="material-icons shopping-cart"></i> --> <span class="add-text">{l s='Add to cart' d='Shop.Theme.Actions'}</span> <span class="psudo-icon"></span> <!-- Agregar --> </button> </div> {else} <button class="add_to_cart btn btn-primary btn-sm add-to-cart" onclick="mypresta_productListCart.add({literal}$(this){/literal});"> {* < i class="material-icons"> add_shopping_cart </ i>{l s='Add to cart' d='Shop.Theme.Actions'} *} <span class="add-text">{l s='Add to cart' d='Shop.Theme.Actions'}</span> <span class="psudo-icon"></span> {/if} <!-- Termina Condicion para deshabilitar boton si stock es cero --> <!-- fin custom code Testing--> Link to comment Share on other sites More sharing options...
Gianni Posted January 18, 2018 Share Posted January 18, 2018 http://www.chicchiebenessere.it/summer-dresses/7-34-abito-stampato-chiffon.html#/1-dimensione-s/16-colore-giallo if i buy s dimensione the quantity is 30, if i buy m dimensione the quantity is 300 and it's ok but if i try to go again in s dimension the quantity don't change into 30 again. WHY? is a bug? thanks in advance 1 Link to comment Share on other sites More sharing options...
TranceCode Posted January 18, 2018 Author Share Posted January 18, 2018 Hey Gianni, thank for your answer, actually i talk about the product list page, when i add product to my cart, but i talk about my website if you check the url is diferent to default theme, we use the default theme and make change on this. have a problem when we select over 1 product, no take the quantity to select, please check our website and screenshot 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