Makatserchyk Posted November 1, 2016 Share Posted November 1, 2016 Hello. Did anybody know the module for select and add multiple products to cart like https://bsscommerce.com/magento-add-multiple-products-to-cart.html ? very needed Link to comment Share on other sites More sharing options...
NemoPS Posted November 2, 2016 Share Posted November 2, 2016 It should still somehow work on 1.6http://nemops.com/prestashop-cart-multiple-products-quantities/#.WBnMv_nx6Uk Link to comment Share on other sites More sharing options...
Makatserchyk Posted November 2, 2016 Author Share Posted November 2, 2016 It should still somehow work on 1.6 http://nemops.com/prestashop-cart-multiple-products-quantities/#.WBnMv_nx6Uk Thank you. If you have made a module, I think many would be willing to pay for it, including me. I just can not believe that a similar module is in Magento, openсart and wordpress, but it is not for prestashop. It's basic addon for all eshop I think. Link to comment Share on other sites More sharing options...
NemoPS Posted November 4, 2016 Share Posted November 4, 2016 It can't be done in a module as you need to edit core files each time, that's why. They should just implement it into the core Link to comment Share on other sites More sharing options...
Makatserchyk Posted November 30, 2016 Author Share Posted November 30, 2016 (edited) It can't be done in a module as you need to edit core files each time, that's why. They should just implement it into the core I used your tutorial. Thank you very much! It's very helpful. Look please Could you help me one more time? There is the checkbox "Select all" above the table of product list. How to assign check all action for checkboxes below? Best Regards Edited November 30, 2016 by Makatserchyk (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted November 30, 2016 Share Posted November 30, 2016 In jquery $('input[name=cproduct]').attr('checked', 'checked');On click Link to comment Share on other sites More sharing options...
Makatserchyk Posted November 30, 2016 Author Share Posted November 30, 2016 In jquery $('input[name=cproduct]').attr('checked', 'checked'); On click Thank you very much! It worked Link to comment Share on other sites More sharing options...
lionel95200 Posted December 17, 2016 Share Posted December 17, 2016 Hello, Thanks for you tutorial it's very helpful but i need to add differents product on page product : For exemple i am on a page product (pull) and i want to add in one click : 5 Small Size color blue 7 Medium Size color blue 12 Large Size color red Do you know how can i do that ? Thank you Link to comment Share on other sites More sharing options...
NemoPS Posted December 19, 2016 Share Posted December 19, 2016 You need to hardcode those info in each block you are adding, like using data-id_product and data-id_product_attribute for each. Use an $.each look to go through them, and add them one by one like described in the tut Link to comment Share on other sites More sharing options...
Makatserchyk Posted January 3, 2017 Author Share Posted January 3, 2017 You need to hardcode those info in each block you are adding, like using data-id_product and data-id_product_attribute for each. Use an $.each look to go through them, and add them one by one like described in the tut Happy New year NemoPS. Could you help once more please? Each product is placed in a separate shopping cart when I press the button "Add selected to cart". For example: if I select 12 products that 12 shopping carts will be created when I press the button. Most likely this is due to the absence an active shopping cart. How can I check cart existence or use active cart? Link to comment Share on other sites More sharing options...
NemoPS Posted January 4, 2017 Share Posted January 4, 2017 What do you mean it creates 12 shopping carts? There is just one instance of it, what code are you using to add the products?You should also do it one AFTER the other, not simultaneously Link to comment Share on other sites More sharing options...
Makatserchyk Posted January 4, 2017 Author Share Posted January 4, 2017 (edited) What do you mean it creates 12 shopping carts? There is just one instance of it, what code are you using to add the products? You should also do it one AFTER the other, not simultaneously Yes. 12 shopping carts. But when I select next products and press the button It add them into one of the 12 existing. I'm using code from tut. Prestahop 1.6.1.7 Edited January 6, 2017 by Makatserchyk (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 6, 2017 Share Posted January 6, 2017 Use an $.each and add them one by one. Make sure the ajax call has async: false 1 Link to comment Share on other sites More sharing options...
Makatserchyk Posted January 6, 2017 Author Share Posted January 6, 2017 Use an $.each and add them one by one. Make sure the ajax call has async: false Thank you! I changed async to false and it's working Link to comment Share on other sites More sharing options...
Makatserchyk Posted April 4, 2017 Author Share Posted April 4, 2017 (edited) Use an $.each and add them one by one. Make sure the ajax call has async: false Hello Fabio, Could you help me please one more time with your tut. I'll try to add products with attributes and get two variables from checked items <input type="checkbox" name="cproduct" value="{$product.id_product}" value2="{$product.id_product_attribute}" class="add_me_to_cart"/>{l s='Select item'} How can I separate those variables in your code? $('.multi_add').unbind('click').click(function() { // get all checked items var checked_items = $('.add_me_to_cart:checked'); if(checked_items.length == 0) alert(noSelectionTxt); else { $.each(checked_items, function(i, item) { var id_prd = $(item).val(); // val of the checkbox! ajaxCart.add(id_prd, null, false, $(item).parent().parent().find('.ajax_add_to_cart_button')); // uncheck current element $(item).removeAttr('checked'); }); } }); Regards Edited April 4, 2017 by Makatserchyk (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted April 5, 2017 Share Posted April 5, 2017 send the attribute id as second parameter, the one that is currently null 1 Link to comment Share on other sites More sharing options...
Makatserchyk Posted April 5, 2017 Author Share Posted April 5, 2017 send the attribute id as second parameter, the one that is currently null Thank you! Link to comment Share on other sites More sharing options...
dariusbaba Posted August 17, 2017 Share Posted August 17, 2017 You can see some some products here:https://www.mageplaza.com/magento-2-frequently-bought-together/ https://www.mageplaza.com/magento-2-who-bought-this-also-bought/ Link to comment Share on other sites More sharing options...
PsychoZzzorD Posted January 16, 2018 Share Posted January 16, 2018 Hi guys, Thanks a lot to NemoPs and Makatserchyk, I was getting triggered by this multiple cart creation problem. I searched the solution for so long before discovering this post. Thank you again you're my saviors ! Paul Link to comment Share on other sites More sharing options...
tumil Posted August 1, 2018 Share Posted August 1, 2018 Hello, is this going to work on 1.7 too? 1 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