I am having issue with add to cart ajax functionality after Woocommerce plugin update. It does add product in the cart but do not show in the counter without refreshing a page.
I have checked at server side there is no cache on.
Can anyone help me in this?
Thanks in Advance.
Related
I've got an issue with AJAX add to cart button on single-product.php.
By now everything works as it should, but with last woocommerce update i've got a problem with variable products.
Everything is fine on simple products, on variable i can also add product to cart, but unfortunetly there is no variation picked while all attributes is selected.
Here You got an example of issue: Product page.
If You add product to cart it will apear there, but as a simple product not variation.
I'm using X for Woocommerce plugin for swatches - when i disable it, everything works fine, but with no AJAX. I need it not only for swatches, but also minicart is powered by AJAX and after reloading page it doesn't work.
I hope someone could help me.
Best regards, Kuba
Please check your DevTools console (F12). There are multiple errors about jQuery being not loaded and "add to cart" scripts mentioned.
I bet that hidden field containing the selected variation ID does not change when you select some variation because there is a problem with jQuery. It stays with the default value which is the parent product ID. So the parent product is added to your cart.
There's a bug in WPML plug-in:
https://wpml.org/errata/wp-6-0-issues-with-terms-assigned-to-posts,
pozdrawiam :)
I have a custom theme options page ( In WordPress Site ) and in that option I have a couple of options for WooCoommerce Mini Cart Customization.
Everything works fine as expected but every time I update some option from backend I can't see that changes right way in frontend due to WooCommerce Cart Session.
As you know WooCommerce mini cart Or custom cart won't be updated automatically if that cart is going through add_to_cart_fragments, So, every time after changing the options I need to update cart session by doing add to cart, remove cart item or update cart item etc.
Honestly, I'm little clueless here, All I want to do is after an update my theme options from backend I want to clear WooCommerce cart session/cache, So, I can see the changes right way without updating or adding anything.
I know WooCommerce cart session can be updated through an ajax But if I going to update theme options in the backend I how can run an ajax in the frontend that will clear WooCommerce cart session for me?
Or have anyone have an idea about it. let me know if you guys don't get me what really I want to do.
Hope it makes sense.
Thanks
Am using the following shortcode for displaying the cart
[woocommerce_cart]
And also am using https://wordpress.org/support/plugin/woocommerce-ajax-cart plugin. When there is no products and am clicking on the button to see the Cart items it shows that the cart is empty but when am refreshing the page am getting that added product.
When i already have one product in the cart it is refreshed by ajax but when no products it did not work.
Any idea why?
Thanks in advance.
In prestashop 1.6
Using Ajax-cart
If i log-in as a Customer and add products to the cart and checkout the order all work.
Then the ajax cart stop working.
If I add a product to the cart and refresh the page the cart return
empty.
If i add a product to the cart and click "go to cart" the cart return empty.
If i log out and log in again, the cart return working for an order, then if i checkout the new order the problem return.
seem to be a problem whith Cookie the is overwritter in some ajax call in ajax-cart.js
I've look this but is not my case :Cart products dissapear on refresh page Prestashop
If i disable ajax cart all work fine.
EDIT
On Google i've found something and seem to be an ajax problem but all the solution suggested don't work.
I was also facing the same issue. You should try the following module and try last two options from the module's configuration and this issue will be gone:
https://github.com/PrestaShop/pscleaner
IMPORTANT: If you are trying it on live site make sure you do not enable first options in this module i.e. Clean up Customers, Clean up Catalog & Orders.
Reply back if you still face the issue.
Cheers!!
I'm using the Magento Shopper Theme (http://shopper.queldorei.com/).
When I add a product to cart, cart doesn't update and show the products added to cart. But if I refresh the page, then it shows the products added in the cart.
Does anybody have an idea of what to do to fix this?
This is your problem. Use chromes debugger to debug ajax requests. Also, you are including jquery but it doesn't exist at the URL specified.
Please Check you have included more that 1 jquery files .