ScubaLessonsInc Posted May 6, 2011 Share Posted May 6, 2011 I need help, a simple mod to the product list view to add a quantity button now is slowing my site and requires refresh to function. Site is www.DieselSurplusStore.com I followed instructions from this topic: http://www.prestashop.com/forums/viewthread/28136/P0/general_discussion/solved_add_quantity_box_to_product_listing In themes folder find file "product-list.tpl" and replace this code below around line 51 (in 1.4.17) {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Add to cart'} {else} with this code {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Quantity :'} <input type="text" name="ajax_qty_to_add_to_cart[{$product.id_product|intval}]" id="quantity_wanted_{$product.id_product|intval}" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> {l s='Add to cart'} {else} Then in the modules>blockcart folder find the file: ajax-cart.jsand change the code below you will find around line 37 (in version 1.4.17) ajaxCart.add(idProduct, null, false, this); to replace it with this code: ajaxCart.add(idProduct, null, false, this, $('#quantity_wanted_'+idProduct).val()); I got it to work with two exceptions which is my issues here: 1. The animation to add it to the cart when you enter a quantity and then hit add to cart does not work and it will not actually put it into the cart until you refresh your screen. 2. Also the site is now VERY SLOW when it was extremely fast before this mod.I need help.. Any suggestions to these two problems?? Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted May 18, 2011 Author Share Posted May 18, 2011 This forum is going to the birds.. weeks now and no help on this issue.. What is happening here.. I used to post and have an answer within hours.. Now weeks not a single word! HELLO>> HELP PLEASE.. I need help, a simple mod to the product list view to add a quantity button now is slowing my site and requires refresh to function. Site is www.DieselSurplusStore.com I followed instructions from this topic: http://www.prestashop.com/forums/viewthread/28136/P0/general_discussion/solved_add_quantity_box_to_product_listing In themes folder find file "product-list.tpl" and replace this code below around line 51 (in 1.4.17) {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Add to cart'} {else} with this code {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2} {l s='Quantity :'} <input type="text" name="ajax_qty_to_add_to_cart[{$product.id_product|intval}]" id="quantity_wanted_{$product.id_product|intval}" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> {l s='Add to cart'} {else} Then in the modules>blockcart folder find the file: ajax-cart.jsand change the code below you will find around line 37 (in version 1.4.17) ajaxCart.add(idProduct, null, false, this); to replace it with this code: ajaxCart.add(idProduct, null, false, this, $('#quantity_wanted_'+idProduct).val()); I got it to work with two exceptions which is my issues here: 1. The animation to add it to the cart when you enter a quantity and then hit add to cart does not work and it will not actually put it into the cart until you refresh your screen. 2. Also the site is now VERY SLOW when it was extremely fast before this mod.I need help.. Any suggestions to these two problems?? Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted May 18, 2011 Author Share Posted May 18, 2011 ANYONE? HELP PLEASE? What is going on now that 1.4 has come out.. serious lack of response.. miss the great support team! Come back to us please. Link to comment Share on other sites More sharing options...
Asenar Posted June 6, 2011 Share Posted June 6, 2011 Hello Tina,sorry anyone hadn't answered, it was not so easy. I have to add no member of the PrestaTeam were able to help you for that because we are based in France, so we couldn't see anything because of the "restricted by loc" thing.On your custom theme, there was no picture and the problem was this : when adding to the cart, there is a picture animation which crashes if no pic is present.See the modified file ajax-cart.js attached to this post to see the modification I made : "If no picture found, just update cart directly"Regards, ajax-cart.js Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted June 8, 2011 Author Share Posted June 8, 2011 Michael, I was home sick or I would have replied as to just how wonderful you are before now. Thank you so very much! Diamonds you are! Thank you kindly. It works perfectly and so does the other site toolsupplycenter now.. If I could just figure out what is going on with my Javascript on www.turbosupplycenter.com I would be most grateful.. same pass there for you and account already set up! Just in case you get a moment to take a look. I will email you details. Thanks again! Your a prince! Regards, Tina Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted June 8, 2011 Author Share Posted June 8, 2011 One other thing.. for anyone else trying to do this.. once you replace the file.. one needs to go back and make one more change to make it work.. in the module blockcart, file ajax-cart.js ajaxCart.add(idProduct, null, false, this); Replace with ajaxCart.add(idProduct, null, false, this, $('#quantity_wanted_'+idProduct).val()); It is working now.. Here is the proper ajax-cart.js file attached with this change done..ajax-cart.js Link to comment Share on other sites More sharing options...
bchacon Posted August 16, 2011 Share Posted August 16, 2011 Hello. I need file. But I can't to download this file. Can anybody help-me? Thank's. Bia (Twitter: @biazouk) Link to comment Share on other sites More sharing options...
eadrian Posted October 11, 2011 Share Posted October 11, 2011 the download link doesn't work anymore... really need this fix, help pls Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 11, 2011 Author Share Posted October 11, 2011 eadrian, I do have this file in my back up folder.. email me for it.. [email protected] Link to comment Share on other sites More sharing options...
Asenar Posted October 11, 2011 Share Posted October 11, 2011 Hi, Tina, doesn't the "join file" function working anymore on the forum (in "more reply option")? Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 11, 2011 Author Share Posted October 11, 2011 Nope, just tried it. : ( It won't let me attach the file either. : ( Also the new forum has issues with word that are shorter than 3 letters.. or it did. Just FYI. Not to get off topic. Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 11, 2011 Author Share Posted October 11, 2011 ajax-cart.zip Attempt number 3 Lets see Looks like this worked but it would not accept the original file. I had to zip it first. Ahh haaa There ya go Link to comment Share on other sites More sharing options...
Asenar Posted October 11, 2011 Share Posted October 11, 2011 Maybe it's some kind of protection (if you attach js, maybe you can after use it in some html code I don't know). Anyway, at least an explanation message is missing, I report that to Rémi, and sorry for that :s Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 11, 2011 Author Share Posted October 11, 2011 Its all good. Thanks so much for all you do. I am still a loyal Prestashop fan, even more so since you finally convinced me to upgrade all my sites! Link to comment Share on other sites More sharing options...
daniel_caldarus Posted September 4, 2012 Share Posted September 4, 2012 hello, can you help me with the modified files: product-list.tpl and ajax-cart.js? Thank you 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