Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore Add to Cart Form submission using jquery ajax
Tagged: add to cart, ajax, ajax very slow, cart, enable ajax, estore cart
- This topic has 12 replies, 8 voices, and was last updated 6 years, 3 months ago by admin.
-
AuthorPosts
-
November 19, 2011 at 3:05 pm #4814coolvibeMember
I am planing to edit eStore plugin, basically the add to cart button submits the form (with some hidden input fields) and the shopping cart shows up on detecting that product has been added to the cart.
Now, I am planning to edit this functionality instead of full page being submitted, the form (add to cart button) gets submitted and the shopping cart shows up (via ajax calls) to do so which files I should be editing.
November 20, 2011 at 2:16 am #38683adminKeymasterUpdate: See posts below.
July 17, 2012 at 5:14 pm #38684mrjosephMemberI’ve been thinking about adding this.
Just wanted to know when a user clicks add to cart what script is called to perform the add?
July 18, 2012 at 12:45 am #38685adminKeymasterThis option has been added to the plugin. You can enable it using the following instruction:
1) Go to eStore Settings -> Advanced Settings interface.
2) Check the “Enable Ajax on Add to Cart Buttons” option.
3) Save the settings.
Now the add to cart buttons will add items using ajax.
July 26, 2012 at 3:20 am #38686jackiepetersMemberHey, for some reason the .on on line 4 was causing errors for me. I changed it to .live and it worked awesome, just wanted to let you know. Thanks for the update!
July 26, 2012 at 10:43 pm #38687adminKeymasterThank you for notifying. You most likely have an old version of JQuery library included on your web page:
.live() has been deprecated in latest version of JQuery. Using .on() is the better option but if it works then it works
August 11, 2012 at 7:16 pm #38688arturkhMemberHi.
I changed it to “1” but cart shows empty until I reload the page.
I use this line in header.php for cart:
<div id="viewcart"><?php echo do_shortcode("[wp_eStore_display_compact_cart2]"); ?></div>
I just wanted you to know.
August 12, 2012 at 6:17 am #38689adminKeymasterUpdate: All our shopping cart shortcodes now work with the ajax option.
You are using a compact cart. The ajax option works with the full shopping cart at this stage. Use the following shortcodes to use the ajax add to cart option:
[wp_eStore_cart]
June 7, 2013 at 10:31 pm #38690bjspetprojectsMemberSame problem – solution worked great! Thank you!
October 30, 2014 at 7:29 pm #38691trendicoffSpectatorI’m having issues with the compact cart and enabling Ajax. When someone adds a product to cart, the compact cart appears but with no clickable link, just plain text. Any ideas?
October 31, 2014 at 3:24 am #38692adminKeymasterWhich compact cart shortcode are you using? Can you post a link to the page where we can go and check the behavior on your site?
August 15, 2018 at 11:31 pm #38693clem90MemberHi,
I use this option and it’s very slow. Around 5 or 6 second before the product is ad to the cart.
You can try here:
membre.selmer607school.com/test23/
It’s normal or is there a way to speed up this option ?
Thanks
August 16, 2018 at 5:32 am #38694adminKeymasterThis issue is external to the plugin. You have something on your site that is making the ajax query to be slow. I see the following error in console:
Slow network is detected. See <URL> for more details. Fallback font will be used while loading
The following test should be helpful:
https://support.tipsandtricks-hq.com/forums/topic/test-to-identy-a-conflicting-theme-or-plugin
-
AuthorPosts
- You must be logged in to reply to this topic.