Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/30/2020 in all areas

  1. 1 point
  2. 1 point
    Yes, have a look below. I'm receiving product id and calculating the quantity of the product based on data form JS. $('.add-all-selected-products-button').click(function(e){ const elements = document.getElementsByName("qtyForm"); const token = prestashop.static_token; const url = prestashop.urls.pages.cart; for(let element of elements) { const idProduct = element.id.replace("quantityForm_to_cart_", ""); const value = $('#quantityForm_to_cart_'+idProduct+'').val(); const step = element.step; const qty = value / step; if (qty !== 0) { const query = 'controller=cart&add=1&action=update&ajax=true&token=' + token + '&id_product=' + idProduct + '&id_customization=0&qty=' + qty; $.post(url, query, null, 'json').then((resp) => { prestashop.emit('updateCart', { reason: {}, resp: resp }); console.log(resp); }).fail((resp) => { prestashop.emit('handleError', {eventType: 'addProductToCart', resp: resp}); }); } } })
  3. 1 point
    Hi Theodor, Sorry for the late reply It did the same on my server, if you delete line 26 on index.php 26: set_time_limit(0); It will be able to install.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More