sokpet Posted January 3, 2012 Share Posted January 3, 2012 Hi again, To add (input) quantity from product-list I use as follows in the new linked js file: $(document).ready(function(){ $(".ajax_add_to_cart_button").click(function(){ var f=$(this).attr('href'); var id = f.split('&')[1].split('=')[1]; var p="#quantity_wanted_"+id; var qty=$(p).attr('value'); g=f+"&qty="+qty; window.location=''+g; return false; }); }) But when I change minimum order quantity for the item from 1 (disabled) to bigger quantity, the part with input box and add to cart button disappears. The question to developers (so I do not have waste hours), how many and which exactly files control this behavior? Or may be somebody already did the "checkMinimalQuantity" on product list? Thanks Link to comment Share on other sites More sharing options...
sokpet Posted January 3, 2012 Author Share Posted January 3, 2012 By the way, may be it is not bad idea to have product details page OPTIONAL in the future core versions. And allow to sell products directly from product list with the same (or similar) functionality as on product details page. The less clicks - the better. Link to comment Share on other sites More sharing options...
tomerg3 Posted January 3, 2012 Share Posted January 3, 2012 You can check out the following module, that lets you select attributes / quantity from product list page. http://www.prestashop.com/forums/index.php?/topic/79758-module-product-list-attributes-allow-customers-to-select-product-attributes-on-the-category-manufacturer-supplier-and-search-pages/ Link to comment Share on other sites More sharing options...
sokpet Posted January 3, 2012 Author Share Posted January 3, 2012 Sorry tomerg3, i do not see minimal quantity on your demo. ------------------------------ By the way, to make it working on product list just needed to change this part {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} like this {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE} It does not help to show warning and min. quantity on product list but at least it shows Error page with min. quantity and redirect back. Better than nothing for the moment. Link to comment Share on other sites More sharing options...
tomerg3 Posted January 3, 2012 Share Posted January 3, 2012 See http://1417pla.presto-changeo.com/category.php?id_category=2 the Ipod Touch has minimal quantity (different for each attribute) Link to comment Share on other sites More sharing options...
Recommended Posts