Search the Community
Showing results for tags 'Add to cart'.
-
Dear, I have got problem, on some computers (I have only one PC where this error is - Win10 home 32bit, Firefox 56.0.2 (32 bit)) after click add to cart button, Presta shows me that product was added to cart, after click on cart, cart is empty. I have no other computer where it do the same, on this computer in IE and in Chrome it works well. I had call from customer that she can't add products to cart, so it isn't only this PC. PrestaShop 1.6.0.9 I tried: - turn off ccc - empty cache - turn off ajax cart nothing made any changes :-( In firefox i had, in console are these errors - see attachment.
- 15 replies
-
- 1.6
- javascript
-
(and 2 more)
Tagged with:
-
Hello everyone, i'm facing a weird problem with my ps_1.7.8 Close to the 'add to cart' button (and also in the cart checkout and cart itself) I have 2 squares instead of the arrows for increase or decrease quantities. Squares in which i can't really read but looks like FT06 (up) and FT07 (down). at the F5 refresh we can see very shortly the arrows appearing and then disappear under these squares As they appear at least 1/4 second, i guess there is a kind of function that finally erase them. I wondered then a font issue, i'm using a Warehouse theme with Google font Raleway typography (https://fonts.google.com/specimen/Raleway) and it seems that this font do not accept ˄ or ˅. Do you think it could come from that ? I then changed the font in order to see if i had the same result and even with arial or tahoma, there are still these squares... With console i see <span class="input-group-addon bootstrap-touchspin-postfix" style="display: none;"></span> <button class="btn btn-touchspin js-touchspin bootstrap-touchspin-up" type="button"><i class="fa fa-angle-up touchspin-up" aria-hidden="true"></i></button> <button class="btn btn-touchspin js-touchspin bootstrap-touchspin-down" type="button"><i class="fa fa-angle-down touchspin-down" aria-hidden="true"></i></button> Do you think there is any error ? in my previous 1.7.6 (where arrows appear correctly), i had no aria-hidden="true", i don't really know what this is for, is there any chance it comes from that ? Have you ever faced something like this and do you have any idea how to solve it ? Many thanks by advance
-
create "add to cart" and "quantity" field in PrestaShop 1.7.x product list I wrote easy in use guide that creates "quantity" field and "add to cart" button on each products listing in PrestaShop 1.7.x like category pages, search results, manufacturers, homepage modules with products etc. goals of the tutorial: - quantity field on list of products - add to cart button on list of products - function that will handle "add to cart" process in background ("ajax" add to cart process - without page reload) - nice animated "loading" button while "add to cart" process - modification of theme css styles to support new features result of tutorial: video with workflow example: https://drive.google.com/file/d/0B7fGO53dEJzbNkM5aUZXRldlWDA/view link to tutorial: create "add to cart" and "quantity" field in PrestaShop 1.7.x product list
- 3 replies
-
- 4
-
- tutorial
- add to cart
-
(and 1 more)
Tagged with:
-
Bonjour à tous, je suis confronté à un problème étrange avec mon ps_1.7.8 À côté du bouton "ajouter au panier" (et également dans le cart checkout et le panier lui-même) J'ai 2 carrés à la place des flèches pour augmenter ou diminuer les quantités. Carrés dans lesquels je ne peux pas vraiment lire mais qui ressemblent à FT06 (haut) et FT07 (bas). au rafraîchissement F5 on peut voir très brièvement les flèches apparaître puis disparaître sous ces carrés Comme ils apparaissent moins d'1/4 de seconde, je suppose qu'il existe une sorte de fonction qui finit par les effacer. J'ai imaginé un problème de police, j'utilise un thème Warehouse avec la typographie Google font Raleway (https://fonts.google.com/specimen/Raleway) et il semble que cette police n'accepte pas ˄ ou ˅. Vous pensez que ça peut venir de ça ? J'ai ensuite changé la police afin de voir si j'avais le même résultat et même avec arial ou tahoma, et il y a toujours ces carrés... Avec la console je vois <span class="input-group-addon bootstrap-touchspin-postfix" style="display : none ;"></span> <button class="btn btn-touchspin js-touchspin bootstrap-touchspin-up" type="button"><i class="fa fa-angle-up touchspin-up" aria-hidden="true"></i ></bouton> <button class="btn btn-touchspin js-touchspin bootstrap-touchspin-down" type="button"><i class="fa fa-angle-down touchspin-down" aria-hidden="true"></i ></bouton> Pensez-vous qu'il y ai une erreur? dans mon précédent 1.7.6 (où les flèches apparaissaient correctement), je n'avais pas d'aria-hidden="true", je ne sais pas vraiment à quoi cela sert, y a-t-il une chance que cela vienne de ça ? Avez-vous déjà été confronté à quelque chose comme ça et avez-vous une idée de comment le résoudre ? Un grand merci par avance
- 9 replies
-
- add to cart
- panier
-
(and 1 more)
Tagged with:
-
Witam, Presta 1.7.3.0 Szablon classic dodane przyciski dodaj do koszyka na głównej stronie wg. https://www.prestashop.com/forums/topic/605047-product-list-quantity-add-to-cart-button-in-prestashop-17/ ---- Wszystko ładnie działało i nagle przestało Po wejsciu nowego klienta na stronę (lub w trybie incognito) nie działają przyciski dodawania do koszka tj: Po kliknięciu przycisku: a) nie pojawia sie popup z informacja o dodaniu do koszyka b ) nie zmienia sie ilość w koszyku (pokazuje 0) co ciekawe po odświeżeniu strony stan koszyka się aktualizuje i przyciski też zacznają działac. -- Nie było nic w międzyczasie instalowane, debuger nic nie pokazuje, wylacznie wszystkich moudłów z nie presty tez nie pomogło, czyszczenie cache nie pomaga. W chromie widnieje taki błąd: (index):1206 Uncaught ReferenceError: PluginDetect is not defined at HTMLDocument.<anonymous> ((index):1206) at fire (core.js:690) at Object.fireWith [as resolveWith] (core.js:711) at Function.ready (core.js:745) at HTMLDocument.completed (core.js:748) Jak wspomniałem, po odświeżeniu strony błąd znika i wszystko działa. Ktos coś podpowie? Możliwe że to wina po stronie hostingu?
-
I add the product to cart from my custom module by using the following code. It's working. My Javascript file var pid = $('#product_id').val(); $.ajax({ url : url+'&action=savecustomdataAction', type : "POST", data : { customdata : customdata, qty : 1, pid : pid }, success : function(response) { if(response.message == true) { $('#addtocart_form').submit(); } } }); My .tpl file <script> var url ="{url entity='module' name='appcustomizer' controller='ajaxfunc' params = []}"; </script> <form name="addtocart" id="addtocart_form" method="POST" action="{$urls.pages.cart}"> <input type="hidden" name="id_product" id="product_id" value="{Tools::getValue('pid')}" /> <input type="hidden" name="token" value="{$static_token}"> // Your Code Here... <input type="submit" id="addtocart" class="cart-btn" value="Add To Cart" /> My Custom Controller public function displayAjaxsavecustomdataAction() { $customData = Tools::getValue('customdata'); $idProduct = Tools::getValue('pid'); // for me it's always one $qty=Tools::getValue('qty'); // always add one item $attribute = 74; // get cart id if exists if ($this->context->cookie->id_cart) { $cart = new Cart($this->context->cookie->id_cart); } // create new cart if needed if (!isset($cart) OR !$cart->id) { $cart = new Cart($this->context->cookie->id_cart); $cart->id_customer = (int)($this->context->cookie->id_customer); $cart->id_address_delivery = (int) (Address::getFirstCustomerAddressId($cart->id_customer)); $cart->id_address_invoice = $cart->id_address_delivery; $cart->id_lang = (int)($this->context->cookie->id_lang); $cart->id_currency = (int)($this->context->cookie->id_currency); $cart->id_carrier = 1; $cart->recyclable = 0; $cart->gift = 0; $cart->add(); $this->context->cookie->id_cart = (int)($cart->id); } // get product to add into cart $productToAdd = new Product((int)($idProduct), true, (int)($this->context->cookie->id_lang)); $cart->update(); $cart = $this->context->cart; $updateQuantity = $cart->updateQty((int)($qty), (int)($idProduct),(int)($attribute), false); $cart->update(); header('Content-Type: application/json'); die(Tools::jsonEncode(['message' => true])); }
- 1 reply
-
- 2
-
- custom module
- add to cart
-
(and 1 more)
Tagged with:
-
Hello, I've been developing a module to add a "Daily Limit" to customer purchase and basically prevent them from completely adding any product in their shopping cart if it surpass that daily limit. It all went mostly smoothly, except 2 problem I encountered, How do I prevent the item to be added to the shopping card from the "actionCartUpdateQuantityBefore" hook. Why is one of my sites still let customer add an item to their shopping cart but another site does not, even tho both of these sites have the same Stock management setting of not allowing backorder. I will briefly explain what I did for this module: What I did was, add this hook "actionCartUpdateQuantityBefore" to the module, then check where this hook is called, it's from Cart.php, checking the parameters and some code, the important parts is this: $data = array( 'cart' => $this, 'product' => $product, 'id_product_attribute' => $id_product_attribute, 'id_customization' => $id_customization, 'quantity' => $quantity, 'operator' => $operator, 'id_address_delivery' => $id_address_delivery, 'shop' => $shop, 'auto_add_cart_rule' => $auto_add_cart_rule, ); /* @deprecated deprecated since 1.6.1.1 */ // Hook::exec('actionBeforeCartUpdateQty', $data); Hook::exec('actionCartUpdateQuantityBefore', $data); if ((int) $quantity <= 0) { return $this->deleteProduct($id_product, $id_product_attribute, (int) $id_customization); } if (!$product->available_for_order || ( Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_') ) ) { return false; } As you can see from the code above, I get the $data and I used them in my module to check if the user surpassed the daily limit or not. if the "price of his purchase today" + "price of the shopping card" + "price of the product" he is trying to add, is not above the daily limit. Do nothing, otherwise, some new data will be shown using the "displayCartModalContent" to tell them of the daily limit which works fine. Now we reach the first problem: How do I prevent the item to be added to the shopping card from the "actionCartUpdateQuantityBefore" hook. To solve this above problem, I did a simple trick, I simply write $data['product']->available_for_order = false; once this data is changed in my module hook, then the Cart will be returned false. due to this: if (!$product->available_for_order || ( Configuration::isCatalogMode() && !defined('_PS_ADMIN_DIR_') ) ) { return false; } which should work fine, and it indeed worked fine in localhost and my first site, Prestashop Version 1.7.6.4. But then I tried to install this in my 2nd site, which a few years ago was the clone of the first site, but changed a bit over time, and it's Version 1.7.6.5 right now. in this site, while both the "action" and "display" hook from my module works perfectly, The customer can still add the item to it's shopping cart... They see my daily limit error from my display hook showing up and telling them they are over the limit. But their shopping cart still add the product regardless of that. To completely make sure this is not my module's problem, I created a product out of stock, then using a customer account, tried to add it to cart, the button is "disabled" but a simple right click and Inspect Elements, removing the "disabled" attribute from the button and you can click it. Then it will actually add the product to my shopping cart! this is a problem. Same trick does not work in first site, it give an error and does not add the product. Both site seems to have similar settings and configuration, the only difference is Version 1.7.6.4 on first and Version 1.7.6.5 on second site. Any Idea ? Also, is there another way I could use to prevent a product from being added to the shopping cart from the "actionCartUpdateQuantityBefore" hook ? Thanks in advance. Edit: I might as well add that I rather do this simply from my module and without touching any of Prestashop core files or overriding anything.
- 2 replies
-
- cart
- stock managment
-
(and 1 more)
Tagged with:
-
Buenos días abro este post porque estoy teniendo un problema en la version 1.7 de prestashop. El botón añadir al carrito me funciona si entro como cliente no registrado, en caso de iniciar sesion no me deja añadir al carrito... alguien me puede echar un cable con este problema???
-
Bonjour, J'aurais besoin d'aide. J'aimerais utiliser le mode catalogue, et de ce fait, faire disparaître de tout mon site Web le bouton "add to cart". Je pensais qu'il disparaissait automatiquement en mode catalogue. J'utilise la dernière version stable de prestashop. J'ai essayé en CSS, display none, ça marche pas. J'ai noté qu'il s'affiche pas di pas d'attribut et ça marche pas non plus. Est ce que quelqu'un sait comment faire ? J'ai cherché sur le forum et je trouve pas ma réponse. Merci beaucoup par avance pour votre aide. Michel. 😉
- 3 replies
-
- add to cart
- catalogue
-
(and 2 more)
Tagged with:
-
Hi, I am an one-month newbie in prestashop. I have read lots of topics here for solving my problems, so here is my contribution. I found there is no such topic talking about multiple add combinations/attributes of products to cart in ps1.7 version, after one week trying and failure, I finally found the solution. The steps are: first listing the combination, then replacing the default qty input, and add js to make it effect. Then I will explain more specifically. In the following steps I will use the classic theme to show, please adjust it by your theme. 1. Edit the add-to-cart.tpl in yourtheme/templates/catalog/_partials/, after this code <span class="control-label">{l s='Quantity' d='Shop.Theme.Catalog'}</span> we add a condition, which only show if the product has combination or we use the default. Here we delete the qty <div> and we will use ourselves and change data-button-action="add-to-cart" to data-button-action="multi-add-to-cart". {if $product.id_product_attribute > 0} {block name='product_quantity'} <div class="product-quantity clearfix"> <div class="add"> <button class="btn btn-primary add-to-cart" data-button-action="multi-add-to-cart" type="submit" {if !$product.add_to_cart_url} disabled {/if} > <i class="material-icons shopping-cart"></i> {l s='Add to cart' d='Shop.Theme.Actions'} </button> </div> {hook h='displayProductActions' product=$product} </div> {/block} {block name='product_availability'} <span id="product-availability" class="js-product-availability"> {if $product.show_availability && $product.availability_message} {if $product.availability == 'available'} <i class="material-icons rtl-no-flip product-available"></i> {elseif $product.availability == 'last_remaining_items'} <i class="material-icons product-last-items"></i> {else} <i class="material-icons product-unavailable"></i> {/if} {$product.availability_message} {/if} </span> {/block} {block name='product_minimal_quantity'} <p class="product-minimal-quantity js-product-minimal-quantity"> {if $product.minimal_quantity > 1} {l s='The minimum purchase order quantity for the product is %quantity%.' d='Shop.Theme.Checkout' sprintf=['%quantity%' => $product.minimal_quantity] } {/if} </p> {/block} {else} do not forget add another {/if} besides the {/if} in the end of this file. 2. we add ourselves' qty input after the color input. Edit yourtheme/templates/catalog/_partials/product-variants.tpl {elseif $group.group_type == 'color'} <ul id="group_{$id_attribute_group}"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li class="float-xs-left input-container"> <label aria-label="{$group_attribute.name}"> {*you could change the radio type to checkbox and delete {if $group_attribute.selected} checked="checked"{/if}*} <input class="input-color" type="checkbox" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}" title="{$group_attribute.name}"> <span {if $group_attribute.texture} class="color texture" style="background-image: url({$group_attribute.texture})" {elseif $group_attribute.html_color_code} class="color" style="background-color: {$group_attribute.html_color_code}" {/if} ><span class="sr-only">{$group_attribute.name}</span></span> </label> <div class="num"> <span type="button" class="reduc btn btn-md"><i class="icon-minus" id="reduc"></i></span> <input type="text" class="multi_product_quantity" value="0"/> <span type="button" class="add btn btn-md"><i class="icon-plus" id="add"></i></span> </div> </li> {/foreach} or if you wan to add it to other attributes, just paste it before another </li></foreach> {elseif $group.group_type == 'radio'} <ul id="group_{$id_attribute_group}"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li class="input-container float-xs-left"> <label> {*if it not work here please change the input class to input-color or change your css*} <input class="input-radio" type="radio" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}" title="{$group_attribute.name}"{if $group_attribute.selected} checked="checked"{/if}> <span class="radio-label">{$group_attribute.name}</span> </label> <div class="num"> <span type="button" class="reduc btn btn-md"><i class="icon-minus" id="reduc"></i></span> <input type="text" class="multi_product_quantity" value="0"/> <span type="button" class="add btn btn-md"><i class="icon-plus" id="add"></i></span> </div> </li> {/foreach} 3. Add the css like this or whatever you wish: .num{ padding-left:10px; display: inline-block; float: right; } .icon-plus .icon-minus{ font-size: 1.5rem; } 4. The last and most important is add the js. You could put it in yourthemes/assets/js/custom.js or just put it in the end of product-variants.tpl(Not recommended). $(document).ready(function () { //sum the qty input $(".icon-plus").each(function () { $(this).click(function () { var $multi = 0; var vall = $(this).parent().prev().val(); vall++; $(this).parent().prev().val(vall); $multi = parseFloat(vall); if ($multi > 0) { //if you use it for other type attributes please add '.input-radio' into the find('.input-color'). The below as same. $(this).parent().parent().prev().find('.input-color').prop('checked', true); } $(this).parent().prev().find('.multi_product_quantity').val(Math.round($multi)); }) }) //reduc the qty input $(".icon-minus").each(function () { $(this).click(function () { var $multi1 = 0; var vall1 = $(this).parent().next().val(); vall1--; if (vall1 <= 0) { vall1 = 0; $(this).parent().parent().prev().find('.input-color').prop('checked', false); } $(this).parent().next().val(vall1); $multi1 = parseFloat(vall1); $(this).parent().next().val(Math.round($multi1)); }) }) const $body = $('body'); $body.on('click', '[data-button-action="multi-add-to-cart"]', (event) => { event.preventDefault(); const $form = $(event.target.form); const actionURL = $form.attr('action'); //make the quantity to int var wanted_items = $('.multi_product_quantity').filter(function() { return parseInt($(this).val(), 10) > 0; }); //if all the qty input is 0, we give customer a alert if(wanted_items.length == 0) alert("No Selection any product!"); else { // foreach the qty input for(let item of wanted_items){ //if one of these is 0, we go to next if($(item).val()===0){return;} $(item).parent().prev().find('.input-color').prop("checked"); let qty = $(item).val(); let idProduct = document.getElementsByName('id_product')[0].value; let idProductAttribute = $(item).parent().prev().find('.input-color').val(); let group = $(item).parent().prev().find('.input-color').attr('data-product-attribute'); let query = `${$form.serialize()}&add=1&action=update&id_product=${idProduct}&qty=${qty}&group[${group}]=${idProductAttribute}&ipa=${idProductAttribute}`; $.post(actionURL, query, null, 'json') .then((resp) => { prestashop.emit('updateCart', { reason: {}, resp, }); }).fail((resp) => { prestashop.emit('handleError', {eventType: 'addProductToCart', resp,}); }); //after add to cart, set all the qty input to 0 and make the input color or input radio to unchecked. $(item).parent().parent().find('.multi_product_quantity').val("0"); $(item).parent().prev().find('.input-color').prop("unchecked"); }; } }); }); This is my first post on the prestashop forum, maybe this is not good solution but it is free! Hopely it will be useful for you. Hava fun! For other version and solutions you could see here:
-
- combination
- add to cart
-
(and 1 more)
Tagged with:
-
Hello, i want to know how i can modify/replace the add to cart button via the module i will create ? I already know how to place link, text or wathever below the add to cart button with the productActions hook , but now i want to remove the add to cart button directly from my module (when he is installed by the user) not via manual css or tpl modification. Thank in advance for your help P.S : I mean the add to cart button in the product page (see the attached images)
- 4 replies
-
- modify
- add to cart
-
(and 2 more)
Tagged with:
-
I am facing a strange issue, when I click on the 'Add to Cart' button, the product gets added to the Cart BUT the same is not shown till at a time I reload the page? I mean I have to reload the page [probably ajax issue?] to see the updated cart.
- 6 replies
-
- add to cart
- shopping cart
-
(and 1 more)
Tagged with:
-
while I'm add to cart my product and then when i click continue shopping I'm getting error : An error occurred while processing your request Does anyone have idea how to solve it,
- 27 replies
-
- add to cart
- error
-
(and 2 more)
Tagged with:
-
Many e-shop owners, which use Prestashop store in 1.5.x versions said, that the standard template "add to cart" button located in product page is very small. I think exactly the same, so i decided to write little tutorial realted to this case. I will show you how to change button size and layout. I belive, that my tutorial will help you and you will be able to create personalized button, which will looks exactly as you want. You can read tutorial here: Change the size & style of add to cart button in prestashop
-
[SOLVED] Add to cart button does nothing in Prestashop 1.7.5.2
Aidelio posted a topic in Bug reports
Hi everyone, As title says, sometimes adding to cart does nothing - not even a pop up window with confirmation of it opens up. I sometimes manage to test-buy something with newly created users, but after that order buying from that user doesn't work anymore. Can't buy anything with unregistered users either. Tried everything basic - cleaning cache, cookies, etc. Also tried incrementing AUTO_INCREMENT value in ps_cart (answer written here https://www.prestashop.com/forums/topic/392573-solved-empty-cart-problem-1609). Doesn't change anything. Shop url is http://www.avesa.lt/ ( if you test it, try buying something from section 'Perkamiausi' under 'Populiariausi Pasiūlymai' ). Theme is called 'Wiser Pets Store Template' I'm at my wit's end here guys, will appreciate any help. EDIT: The debug mode on the site is always turned on, because whenever I turn it off, Back Office crashes and becomes unavailable. Could the main problem be related to that?- 3 replies
-
- users
- add to cart
-
(and 6 more)
Tagged with:
-
Buongiorno a tutti E' accaduta una cosa strana sul nostro shop PS 1.7.6.1 thema Warehouse. Il problema si verifica quando i clienti che navigano da SAFARI e CHROME su MAC aggiungono prodotti al carrello.. Mi spiego meglio: il cliente MAC entra sul sito, crea un account (ok), fa la login (ok), procede a mettere il prodotto nel carrello, procede al checkout > acquisto corretto e funzionante al 100%- Subito dopo, ancora loggato, va su un prodotto, prova a metterlo nel carrello e qui va in LOOP infinito senza successo. Se effetta il logout e poi rifà la login, tutto torna a funzionare bene (mette il prodotto nel carrello e procede all'acquisto senza problemi). => sembra che chi naviga da safari / chrome su MAC abbai un problema legato alla sessione / ai cookies o qualcosa del genere.. tale accade quanto sopra. A qualcuno di voi è mai accaduta una cosa simile? A noi mai. Grazie a chi saprà darmi indicazioni su dove indagare e provare a risolvere questo difetto che ripeto si verifica SOLO con SAFARI / CHROME su dispositivi MAC. Grazie e buon lavoro a tutti
-
I have an ajax add to cart button on my product page but would like to create another one for Buy Now. It'll be same as Add to Cart but after adding the product to the cart, user will be redirected to the cart page. This question has been discussed before but not recently and their solutions didn't work on the latest prestashop installations (I have 1.6.1). Can anyone help me with that? Or explain how this button functions?
-
Hello everyone! I am having quite the trouble. As everyone knows, this piece of code is used to hide the Add to Cart button in the product.tpl when the applied conditions are met: <div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}> </div> I am using a module called One Click Order which has a button that is displayed below my Add to Cart button. In the One Click Order hook tpl I use the code above to hide the One Click Order button when the Add to Cart button hides. It has been working like that for over two years. But as of today it's not working anymore. Add to Cart button is displayed or hidden when the IF conditions are met, but the One Click Order button stays hidden no matter what. My prestashop version is 1.6.0.6. Yesterday i changet my PHP version from 5.4 to 5.6, could that be the problem?
- 3 replies
-
- product
- add to cart
-
(and 2 more)
Tagged with:
-
Hi, in my shop when the costumer looks at product details page and product list, the pictures show clearly the product combinations costs less than the price per unit (for example if the unit is kilogram). And the costumer sees correctly the prices/kilo correspondant to each of the combination price. But when customer adds to cart, what he/she sees after in all the process is a wrong price/kilo.In fact it shows the price of the combination equal to the price per kilo. I can't solve this issue. Can you help?
-
- 1.7.5
- price per unit
-
(and 1 more)
Tagged with:
-
Hi, I'm trying to use the ajax add to cart function to add a Add to Cart button in my module. I've used the same code from homefeatured.tpl and it generates the correct url: http://www.banditbirds.co.uk/cart?qty=1&id_product=89&token=78324173a44f0692704f811c31e2c8f1&add But this doesn't do anything. Do I need to include the ajax js somehow in my module? blockcart is in the header and I can see the js included in the page's header: <script type="text/javascript" src="/modules/blockcart/ajax-cart.js"></script> Anyone have any ideas? Or ideas how I can debug? <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$banditQuotes[nr].quote_product_link}" href="{$link->getPageLink('cart')}?qty=1&id_product={$banditQuotes[nr].quote_product_link}&token={$static_token}&add" title="{l s='Add to cart' mod='banditquote'}">{l s='Add to cart' mod='banditquote'}</a> Thanks!!
- 16 replies
-
- ajax
- add to cart
-
(and 2 more)
Tagged with:
-
Hello Prestashop users, I’m working on an e-shop for a french clothing brand and I’m strugguling with the same problem for a couple weeks. I’m using Prestashop 1.7. What I’m trying to do is to display the available sizes on the items in the product miniatures while hovering it. Then, when the user click on the size he wants, the item is directly added to his basket, without having to go on the product page or on the quickview. There’s an exemple of what I’m trying to do on this website : https://international.victoriabeckham.com/ What I’ve already done is creating a radio input for each size on the item on the file located in templates>catalog>_partials>miniatures>product.tpl. But these buttons are not connected to the stock and sizes available. I’ve also added a link on these buttons « data-button-action="add-to-cart" ». The link is actually working but it’s not connected to the item and the chosen size. <div class="product-variants"> <div class="clearfix product-variants-item"> <span class="control-label"></span> <li class="shortsize"> <button value="27" title="34"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">34</button> <button value="28" title="36"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">36</button> <button value="29" title="38"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">38</button> <button value="30" title="40"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">40</button> <button value="31" title="42"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">42</button> <button value="32" title="44"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">44</button> <button value="33" title="46"id="group_1" data-product-attribute="1" name="group[1]" data-button-action="add-to-cart" type="submit">46</button> </li> </div> </div> I’ve red this topic and tried the solution offered by Vekia but it doesn’t seem to work on Prestashop 1.7. https://www.prestashop.com/forums/topic/314731-available-product-sizes-on-product-listsolved/ The next thing I’ve tried is to download a free module that adds the « add to cart » link on product miniature : https://www.prestashop.com/forums/topic/661291-free-module-display-add-to-cart-button-in-product-list-pages/ But still not done with my issue.. That’s why I’m here, asking for advices, or any kind of help. Thanks a lot for reading me, I hope I’ve been precise on my issue as much as I had to.
- 1 reply
-
- product miniature
- prosuct-list
-
(and 1 more)
Tagged with:
-
Hello, I am new user of PrestaShop software for its eCommerce application. Very recent, I have encountered some issues after installing and configuration store setup with it. I am using PrestaShop v. 1.7.5.2 with its Classic (default) theme for the shop. The store was fully functional and many of its features were enabled for this store. The display of products, add to cart, checkout, and delivery options were working seamlessly until early part of this week (~10-9-19) when I checked its various features for operational integrity. Three major issues are occurring right now: 1) The add to cart function works, but no products are visibly added to the cart, the checkout icon works, but there is no form for customer checkout, no payment options, and cart is empty with no products being added despite the add button on products working with confirmation page; 2) For payment preferences, the store was using PayPal standard and Braintree payments. There was major update to PayPal and Braintree modules (~9-1-19), when I tried to update them with uninstalling the older versions, I am unable to remove them completely and receive error messages; 3) The store is receiving errors of translation messages in AdminAdvparametersFeature and couple of User Deprecated errors in AdminMarketing and "sensio_framework-extra.router.annotations" and stating to use Sympony\Component\Routing\Annotation\Router Further technical information can be provided upon review and any help to resolve these issues would be great. See JPG files (8)
-
- add to cart
- checkout
- (and 3 more)
-
Hello. In prestashop 1.7 I want to do product customization. To this end, in my module when adding a product to the basket, I want to add my values as a customization. As far as I know, prestashop 1.7 has changed a bit and you can add customization associated with the module. How to make the product receive additional customization from the module?
- 2 replies
-
- customization
- customize
-
(and 4 more)
Tagged with: