Woocommerce issue: AJAX add to cart working, but page still reloads.
-
Hello,
Theme: Hello theme for Elementor
Plugins: Elementor, Elementor PRO, WooCommerce, Crocoblock suite, Cart flows, lite speed cache
Issue: Even though my AJAX add to cart buttons work, the page still reloads every time, I would like for it to work as intended and not reload the page when the cart is updated.
What I have already tried:?Disabling every plugin, disabling my theme, tweaking with configurations from plugins and WooCommerce, checking and unchecking? ‘Enable AJAX add to cart buttons on archives’ setting under Woocommerce.
I honestly do not know what else I can do, if anyone can provide any insight it would be greatly appreciated.
Thank you!
The page I need help with: [log in to see the link]
-
Hi there @gbneto ??
Thank you for contacting Woo support, and for your patience! We are experiencing an unusually high volume of support requests at the moment, and that has affected our response times.
Even though my AJAX add to cart buttons work, the page still reloads every time, I would like for it to work as intended and not reload the page when the cart is updated.
I understand that a full page refresh takes place, upon adding a product to the cart, instead of the AJAX functionality.
I went ahead with visiting the site at https://homologacao.vinicolabarbaraeliodora.com.br/product/rose-syrah-barbara-eliodora-safra-2022/ and noticed the issue you are describing.
Trying with a test installation of mine, I was not able to reproduce this behavior, using WooCommerce version 8.0.2 (and no other plugin), the Storefront theme active, and server-side caching disabled.
Just to clarify, are you noticing the same issue when trying with settings like the ones I note above, or otherwise?
If yes, can you provide us with a link to that test installation, please?
To help you further, I’d like to understand more about your setup.
Could you please send me a copy of your site’s System Status? You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
.Once you’ve done that, you can paste it here or into our https://Quickforget.com service and send that secret link here.
Also, could you please navigate to
WooCommerce > Status > Logs
and from the dropdown on the right side, please see if there are any logs starting with the words fatal-error.If so, please select
View
and copy and paste them into your reply here.We await your response to better assist you.
Hello @anastas10s Thank you for taking your time to help me with this issue. Yes, i have tried deactivating all my plugins, instaling storefront and disabling cache (which was done by Wp Rocket), and sadly the error persists. Can you explain what would be a link to the test instalation and how i could provide it? And of course! i will post the reports below! /////////////Start report//////////////////
/////////////End report////////////////// I was able to find a "fatal error" report, i will paste it below! /////////////Start report////////////////// 2023-08-12T15:55:39+00:00 CRITICAL Uncaught Error: Call to a member function is_built_with_elementor() on bool in /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-content/plugins/elementor/core/documents-manager.php:511 Stack trace: 0 [internal function]: Elementor\Core\Documents_Manager->ajax_save() 1 /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-content/plugins/elementor/core/common/modules/ajax/module.php(175): call_user_func() 2 /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-includes/class-wp-hook.php(310): Elementor\Core\Common\Modules\Ajax\Module->handle_ajax_request() 3 /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() 4 /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-includes/plugin.php(517): WP_Hook->do_action() 5 /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-admin/admin-ajax.php(188): do_action() 6 {main} thrown in /var/www/homologacao.vinicolabarbaraeliodora.com.br/wp-content/plugins/elementor/core/documents-manager.php on line 511 /////////////End report////////////////// Again, thank you in advance for the help GuilhermeWordPress Environment WordPress address (URL): https://homologacao.vinicolabarbaraeliodora.com.br Site address (URL): https://homologacao.vinicolabarbaraeliodora.com.br WC Version: 8.0.2 REST API Version: ? 8.0.2 WC Blocks Version: ? 10.6.5 Action Scheduler Version: ? 3.6.1 Log Directory Writable: ? WP Version: 6.3 WP Multisite: – WP Memory Limit: 3 GB WP Debug Mode: – WP Cron: ? Language: pt_BR External object cache: – Server Environment Server Info: Apache/2.4.56 (Debian) PHP Version: 7.4.33 PHP Post Max Size: 50 MB PHP Time Limit: 240 PHP Max Input Vars: 10000 cURL Version: 7.74.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 8.0.30 Max Upload Size: 50 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? Database WC Database Version: 8.0.2 WC Database Prefix: homologacao_vinicola Total Database Size: 119.12MB Database Data Size: 112.76MB Database Index Size: 6.36MB homologacao_vinicolawoocommerce_sessions: Data: 0.11MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawoocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawoocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawoocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB homologacao_vinicolawoocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawoocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawoocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB homologacao_vinicolawoocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawoocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolawoocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawoocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolawoocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawoocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawoocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolaactionscheduler_actions: Data: 0.13MB + Index: 0.17MB + Engine InnoDB homologacao_vinicolaactionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolaactionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolaactionscheduler_logs: Data: 0.11MB + Index: 0.09MB + Engine InnoDB homologacao_vinicolacky_banners: Data: 0.05MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolacky_cookie_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolacky_cookies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolacommentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolacomments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB homologacao_vinicolacorreios_postcodes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolae_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolae_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB homologacao_vinicolae_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB homologacao_vinicolae_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolafbv: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolagla_attribute_mapping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolagla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB homologacao_vinicolagla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolagla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolagla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolajet_appointments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_appointments_excluded: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_appointments_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_fb_migrations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_fb_records: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolajet_fb_records_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolajet_fb_records_errors: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolajet_fb_records_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolajet_post_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_review_comments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_review_guests: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_review_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_review_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_reviews: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_search_suggestions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_smart_filters_indexer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_taxonomies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolajet_widgets_styles: Data: 0.27MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolalinks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolalitespeed_img_optming: Data: 0.02MB + Index: 0.05MB + Engine InnoDB homologacao_vinicolaoptions: Data: 7.42MB + Index: 0.14MB + Engine InnoDB homologacao_vinicolapagarme_module_core_charge: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_configuration: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_customer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_hub_install_token: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_order: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_saved_card: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapagarme_module_core_transaction: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolapostmeta: Data: 68.09MB + Index: 3.03MB + Engine InnoDB homologacao_vinicolaposts: Data: 34.02MB + Index: 0.13MB + Engine InnoDB homologacao_vinicolashortpixel_folders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolashortpixel_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolashortpixel_postmeta: Data: 0.50MB + Index: 0.31MB + Engine InnoDB homologacao_vinicolashortpixel_queue: Data: 0.02MB + Index: 0.09MB + Engine InnoDB homologacao_vinicolasmush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolaterm_relationships: Data: 0.05MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolaterm_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolatermmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolaterms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolausermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolausers: Data: 0.02MB + Index: 0.05MB + Engine InnoDB homologacao_vinicolawc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolawc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolawc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB homologacao_vinicolawc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB homologacao_vinicolawc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB homologacao_vinicolawc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB homologacao_vinicolawc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB homologacao_vinicolawc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB homologacao_vinicolawc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB homologacao_vinicolawc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB homologacao_vinicolawpr_rocket_cache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB homologacao_vinicolawpr_rucss_used_css: Data: 0.02MB + Index: 0.09MB + Engine InnoDB Post Type Counts attachment: 219 cartflows_flow: 2 cartflows_step: 4 custom_css: 3 elementor_icons: 1 elementor_library: 56 jet-form-builder: 1 jet-menu: 15 jet-popup: 5 jet-woo-builder: 6 nav_menu_item: 5 page: 13 post: 2 product: 3 revision: 284 shop_order: 5 wp_global_styles: 2 wp_navigation: 1 Security Secure connection (HTTPS): ? Hide errors from visitors: ? Active Plugins (34) All-in-One WP Migration: by ServMask – 7.77 CartFlows: by CartFlows Inc – 1.11.15 CookieYes | GDPR Cookie Consent: by CookieYes – 3.1.2 Crocoblock Wizard: by Crocoblock – 1.2.8 Elementor Pro: by Elementor.com – 3.15.1 Elementor: by Elementor.com – 3.15.3 Folders: by Premio – 2.9.2 Google Listings and Ads: by WooCommerce – 2.5.3 Health Check & Troubleshooting: by The www.ads-software.com community – 1.7.0 JetBlocks For Elementor: by Crocoblock – 1.3.7 JetCompareWishlist For Elementor: by Crocoblock – 1.5.5 JetElements For Elementor: by Crocoblock – 2.6.12.1 JetEngine - dynamic tables builder: by Crocoblock – 1.0.7 JetEngine: by Crocoblock – 3.2.4 JetMenu: by Crocoblock – 2.4.0 JetPopup: by Crocoblock – 2.0.1 JetReviews For Elementor: by Crocoblock – 2.3.1 JetSmartFilters: by Crocoblock – 3.2.0 JetStyleManager: by Crocoblock – 1.3.6 JetTabs For Elementor: by Crocoblock – 2.1.24 JetThemeCore: by Crocoblock – 2.1.1 JetTricks: by Crocoblock – 1.4.4 JetWooBuilder For Elementor: by Crocoblock – 2.1.6.1 JetProductGallery: by Crocoblock – 2.1.13 Melhor Envio: by Melhor Envio – 2.14.0 Pagar.me module for Woocommerce: by Pagar.me – 3.1.4 Really Simple SSL: by Really Simple Plugins – 7.0.8 ShortPixel Image Optimizer: by ShortPixel - Convert WebP/AVIF & Optimize Images – 5.4.0 Checkout Field Editor for WooCommerce: by ThemeHigh – 1.9.0 Claudio Sanches - Correios for WooCommerce: by Claudio Sanches – 3.8.0 Brazilian Market on WooCommerce: by Claudio Sanches – 3.8.2 WooCommerce: by Automattic – 8.0.2 WooCommerce: by Automattic – 8.0.2 WP Rocket: by WP Media – 3.14.4.2 Inactive Plugins (0) Dropin Plugins (1) advanced-cache.php: advanced-cache.php Settings API Enabled: – Force SSL: – Currency: BRL (R$) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ? HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – WC Pages Shop base: #4983 - /loja/ Cart: #4984 - /carrinho/ Checkout: ? Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. My account: #4986 - /minha-conta/ Terms and conditions: ? Page not set Theme Name: Hello Elementor Version: 2.8.1 Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? Templates Overrides: – Admin Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience product-variation-management settings async-product-editor-category-field Daily Cron: ? Next scheduled: 2023-08-23 15:44:45 -03:00 Options: ? Notes: 72 Onboarding: completed Action Scheduler Complete: 407 Oldest: 2023-07-22 15:27:05 -0300 Newest: 2023-08-22 13:42:05 -0300 Failed: 4 Oldest: 2023-08-09 12:54:40 -0300 Newest: 2023-08-22 13:11:36 -0300 Pending: 47 Oldest: 2023-08-22 13:41:07 -0300 Newest: 2023-08-30 21:00:00 -0300 Status report information Generated at: 2023-08-22 13:43:08 -03:00</strong>
Hola @gbneto
Thank you for reaching back, with further information on this!
While investigating the site’s System Status Report (SSR), I noticed the WooCommerce plugin mentioned twice, which is odd.
Yes, i have tried deactivating all my plugins, instaling storefront and disabling cache (which was done by Wp Rocket), and sadly the error persists.
Can you explain what would be a link to the test instalation and how i could provide it?
Feel free to create a fresh installation of WordPress, and install only the WooCommerce plugin, and the Storefront theme. Are you able to reproduce the issue with this set-up, or otherwise?
If your current website host does not offer the ability to create development/testing WordPress installs, feel free to use https://tastewp.com/ as an alternative.
The fatal error report you included points to Elementor. It is best to reach out to their support channel about it, as they would be in a better position to assist you. The support forum is this one: https://www.ads-software.com/support/plugin/elementor/
I hope this is helpful! Please let us know how it went, and if you have any further questions or concerns.
- This reply was modified 1 year, 3 months ago by anastas10s. Reason: typo
Hi,
I’m getting the same issue. When I try to add an item using the “add to cart” button it just refresh the page but doest not add it.
Could you please support me? thanks!Hi @edgarcastrojr,
I’m getting the same issue. When I try to add an item using the “add to cart” button it just refresh the page but doest not add it. Could you please support me?
From what I understand, you’re experiencing an issue where the page refreshes but does not add the item to the cart when you click on the “add to cart” button.
Given that each site setup is unique, and to ensure we adhere to our ?? forum’s best practices, could you kindly initiate a ?? new topic in our support forum? This approach helps us zero in on your specific issue and allows other users facing a similar problem to easily find and benefit from the discussion.
In your new topic, could you please provide as much detail as possible? This might include screenshots, error messages, the steps you’ve already taken to try to resolve the issue, and any other information you think might be relevant.
You can use https://snipboard.io to share screenshots. Just follow the instructions on the page and paste the URL in your reply.
Thank you for your understanding and cooperation. We look forward to assisting you further on the new topic.
- The topic ‘Woocommerce issue: AJAX add to cart working, but page still reloads.’ is closed to new replies.