Automatically open cart on variable products not working
-
Hello,
Automatically open cart on variable products is not working. When adding product to cart, then the cart does not automatically open. Actually it does, but only for 0.1 sec and then it automatically closes. https://www.josephinemathea.dk/plakat-planter-og-mennesket/
Automatically open cart on single products is working just fine. https://www.josephinemathea.dk/som-et-froe/
How can i fix this?
The page I need help with: [log in to see the link]
-
Hi @jonasojczyk
I understand that your cart is opening for single products but not for variable products.
Can you go to WooCommerce > Settings > Products > General, and check “Redirect to the cart page after successful addition” to see if that helps?

Link to image: https://snipboard.io/9I7HDc.jpgIf it still doesn’t work, can you please try the snippet shared on this thread? https://stackoverflow.com/questions/54865565/add-to-cart-and-redirect-to-checkout-for-variable-products-in-woocommerce
Let us know how it goes.
Hello @margaretwporg
I tried enabling the “Redirect to the cart page after succesful addition”, but that didnt make the cart sidebar widget open when adding product with variable options to cart.
Also tried adding the code, but that didnt help either.
Any other solution?
Hi @jonasojczyk
I understand that neither of the solutions worked in your case.
So that we can check your configuration and assist you further, could you please share a copy of your site’s System Status?
You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
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? Let us know what you find.Status report:
### WordPress Environment ### WordPress address (URL): https://www.josephinemathea.dk Site address (URL): https://www.josephinemathea.dk WC Version: 6.8.2 REST API Version: ✔ 6.8.2 WC Blocks Version: ✔ 8.0.0 Action Scheduler Version: ✔ 3.4.0 Log Directory Writable: ✔ WP Version: 6.0.2 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: ✔ Language: da_DK External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.30 PHP Post Max Size: 1 GB PHP Time Limit: 300 PHP Max Input Vars: 5000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 5.7.39-42-log Max Upload Size: 1 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 6.8.2 WC Database Prefix: clk_f5c910f307_ Total Database Size: 12.91MB Database Data Size: 9.59MB Database Index Size: 3.32MB clk_f5c910f307_woocommerce_sessions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_actionscheduler_actions: Data: 0.36MB + Index: 0.55MB + Engine InnoDB clk_f5c910f307_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB clk_f5c910f307_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_e_notes: Data: 0.02MB + Index: 0.17MB + Engine InnoDB clk_f5c910f307_e_notes_users_relations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB clk_f5c910f307_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB clk_f5c910f307_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB clk_f5c910f307_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_imagify_files: Data: 0.02MB + Index: 0.08MB + Engine InnoDB clk_f5c910f307_imagify_folders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_options: Data: 2.41MB + Index: 0.08MB + Engine InnoDB clk_f5c910f307_postmeta: Data: 4.41MB + Index: 0.22MB + Engine InnoDB clk_f5c910f307_posts: Data: 1.11MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_po_plugins: Data: 0.02MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_rank_math_analytics_gsc: Data: 0.02MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_rank_math_analytics_inspections: Data: 0.02MB + Index: 0.11MB + Engine InnoDB clk_f5c910f307_rank_math_analytics_objects: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_rank_math_internal_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_rank_math_redirections: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_rank_math_redirections_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB clk_f5c910f307_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB clk_f5c910f307_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB clk_f5c910f307_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB clk_f5c910f307_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB clk_f5c910f307_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB clk_f5c910f307_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB clk_f5c910f307_wpr_rocket_cache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB clk_f5c910f307_wpr_rucss_used_css: Data: 0.02MB + Index: 0.08MB + Engine InnoDB ### Post Type Counts ### attachment: 61 custom_css: 4 customize_changeset: 89 elementor_library: 8 nav_menu_item: 5 page: 11 post: 1 product: 16 product_variation: 22 revision: 853 shop_order: 19 wp_global_styles: 4 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (17) ### Advanced Database Cleaner PRO: by Younes JFR. – 3.2.1 Disable Bloat for WordPress & WooCommerce: by Disable Bloat – 3.0.3 Duplicate Page: by mndpsingh287 – 4.4.9 Elementor Pro: by Elementor.com – 3.7.5 Elementor: by Elementor.com – 3.7.4 Site Kit by Google: by Google – 1.82.0 Imagify: by Imagify - Optimize Images & Convert WebP – 2.0 Mediamatic Lite: by plugincraft – 2.8.1 Plugin Organizer: by Jeff Sterup – 10.1.6 Self-Hosted Google Fonts: by asadkn – 1.0.1 Rank Math SEO: by Rank Math – 1.0.96 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.22.20 WooCommerce PensoPay: by PensoPay – 6.2.2 WooCommerce: by Automattic – 6.8.2 Asset CleanUp: Page Speed Booster: by Gabe Livan – 1.3.8.5 WP Rocket: by WP Media – 3.12.0.5 Smart Image Resize PRO: by Nabil Lemsieh – 1.7.6.4 ### Inactive Plugins (0) ### ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Must Use Plugins (1) ### Plugin Organizer MU: by Jeff Sterup – 10.1.6 ### Settings ### API Enabled: – Force SSL: – Currency: DKK (kr.) Currency Position: right_space Thousand Separator: . Decimal Separator: . Number of Decimals: 0 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: – ### WC Pages ### Shop base: #13 - /shop/ Cart: ❌ Page not set Checkout: ❌ Page does not contain the [woocommerce_checkout] shortcode or the woocommerce/checkout block. My account: ❌ Page not set Terms and conditions: #3055 - /handelsbetingelser/ ### Theme ### Name: Hello Elementor Child Version: 1.0.1 Author URL: https://elementor.com/ Child Theme: ✔ Parent Theme Name: Hello Elementor Parent Theme Version: 2.6.1 Parent Theme Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash WooCommerce Support: ✔ ### Templates ### Overrides: – ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour 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 wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ✔ Next scheduled: 2022-09-06 13:15:07 +00:00 Options: ✔ Notes: 43 Onboarding: completed ### Action Scheduler ### Complete: 1,678 Oldest: 2022-09-04 09:04:55 +0000 Newest: 2022-09-06 11:56:22 +0000 Pending: 3 Oldest: 2022-09-07 07:09:30 +0000 Newest: 2022-10-05 00:01:03 +0000 ### Status report information ### Generated at: 2022-09-06 12:29:00 +00:00Status logs:
2022-09-03T11:48:39+00:00 CRITICAL syntax error, unexpected '$', expecting variable (T_VARIABLE) i /var/www/josephinemathea.dk/public_html/wp-content/themes/hello-elementor/functions.php på linje 242 2022-09-03T11:48:39+00:00 CRITICAL syntax error, unexpected '$', expecting variable (T_VARIABLE) i /var/www/josephinemathea.dk/public_html/wp-content/themes/hello-elementor/functions.php på linje 242 2022-09-03T12:47:28+00:00 CRITICAL syntax error, unexpected 'if' (T_IF), expecting ']' i /var/www/josephinemathea.dk/public_html/wp-content/themes/hello-elementor/functions.php på linje 242Hi @jonasojczyk
Thanks for sharing the System Status Report and the error logs.
The system report shows that your
Cart,Checkout, andMy accountpages are not set. To install the missing WooCommerce pages, please go to WooCommerce > Status > Tools and use the page installer tool. You may find this document helpful: https://woocommerce.com/document/woocommerce-pages/#install-pages-againPlease let us know how if the problem persists even after correcting this.
The critical errors are originating from your Hello Elementor child theme, so you may need to get in touch with your developer in this regard.
I have created the missing pages and the problem is still present.
Also tried to disable plugins and see i that worked, it didnt.
Switched theme and problem is still present.
Hi @jonasojczyk
The Cart sidebar widget you are referring to is not coming from the core
WooCommerceplugin. I have checked and can see that this functionality is coming fromElementor Proplugin.In this case, you are best to reach out to the support of Elementor, and they are in the best position to help you resolve the issue. 🙂
Hey Rafy,
Thank you 🙂
Hi @jonasojczyk
Thank you 🙂
You are welcome!
I am marking this thread as resolved, but please let us know if any additional issues arise!
Thank you!
The topic ‘Automatically open cart on variable products not working’ is closed to new replies.