Ludwig1 Posted June 30, 2015 Share Posted June 30, 2015 Hi!Is it possible to put the wanted quantity box in the product list? (See attached file)I have tried to use the code from my product.tpl in product-list.tpl but without success: <!-- quantity wanted --> {if !$PS_CATALOG_MODE} <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> <label>{l s='Quantity'}</label> <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" /> <a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down"> <span><i class="icon-minus"></i></span> </a> <a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up"> <span><i class="icon-plus"></i></span> </a> <span class="clearfix"></span> </p> {/if} <!-- minimal quantity wanted --> <p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {l s='The minimum purchase order quantity for the product is'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> </p> {if isset($groups)} Anyone who knows how to do?Thank you in advance! Link to comment Share on other sites More sharing options...
Rolige Posted June 30, 2015 Share Posted June 30, 2015 That code is wrong, you has taken it from the product page, but in product list is different, also, is not only the input needed, if the Ajax car is enabled, then you need modify the .js file also. Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2015 Share Posted June 30, 2015 tested it while ago with 1.6.0.9 it works: https://www.prestashop.com/forums/topic/265025-tutorial-quantity-field-on-product-listing-pages-categories-search-etc/ but you will have to do it carefully Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2015 Share Posted June 30, 2015 here it is: product list quantity field in prestashop 1.6 1 Link to comment Share on other sites More sharing options...
Ludwig1 Posted July 1, 2015 Author Share Posted July 1, 2015 here it is: product list quantity field in prestashop 1.6 Great! Thank you vekia! I search for it, but could not find anything in this area. Is it possible to add the + - sign to this? Link to comment Share on other sites More sharing options...
vekia Posted July 1, 2015 Share Posted July 1, 2015 it is but there is not enough space so we have to decide where we want to display these buttons Link to comment Share on other sites More sharing options...
Ludwig1 Posted July 1, 2015 Author Share Posted July 1, 2015 it is but there is not enough space so we have to decide where we want to display these buttons Ok! I would like it to be displayed as shown in my attached file in this thread. Thank you in advance! Link to comment Share on other sites More sharing options...
vekia Posted July 4, 2015 Share Posted July 4, 2015 okay now i understand i will extend my tutorial today :-) keep in touch! Link to comment Share on other sites More sharing options...
Ludwig1 Posted July 4, 2015 Author Share Posted July 4, 2015 okay now i understand i will extend my tutorial today :-) keep in touch! That is perfect! Thank you very much! Have a nice weekend. Link to comment Share on other sites More sharing options...
pouncepony Posted April 7, 2016 Share Posted April 7, 2016 (edited) Hi, I am attempting to get this implemented in 1.6.1.2 with default-bootstrap and plus and minus buttons. I have added what haypro added here: https://www.prestashop.com/forums/topic/450698-tutorial-quantity-field-in-category-view-product-listing-prestashop-16/?p=2159205 It works, but the layout in the product list (not grid) view does not look good. I would like for it to look like I have copied the following into the product-list.css /* quantity_wanted */ #quantity_wanted_p input { width: 78px; height: 27px; padding: 0 6px; float: left; border: 1px solid #d6d4d4; line-height: 27px; } #quantity_wanted_p .btn { float: left; margin-left: 3px; } #quantity_wanted_p label { display: block; margin-bottom: 7px; } .product_attributes, { -moz-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05); -webkit-box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05); box-shadow: inset 0 6px 6px rgba(0, 0, 0, 0.05); padding: 19px 19px 17px; } I am pretty clueless about CSS. Any help would be appreciated Edited April 7, 2016 by pouncepony (see edit history) 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