Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1215541

    We have been experiencing issue with our Mobile Cart since we updated to WooCommerce 4+. We have the cart in the menu set to always show and we have the badge notification that shows that there are items in your cart, but when you click view cart, the items disappear and it shows “Your Cart is Empty” message.

    This does not seem to be an issue on the desktop site, only on mobile. We have no warnings/errors from WooCommerce Status page and have tried many of the “Fix the Cart Is Empty” articles from web searches. We had no issue with this Pre-WooCommerce 4+ and changed no code and the Enfold theme is up to date.

    We tried deactivating all the extra plugins besides core WooCommerce plugins and we still experienced the error.

    Any help would be appreciated.

    • This topic was modified 4 years, 6 months ago by darrenpace.
    #1215714

    Hey darrenpace,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1215782
    This reply has been marked as private.
    #1216182

    Hi darrenpace,

    Please disable Wordfence, CSS, and JavaScript merging and see if the issue persists.

    Best regards,
    Victoria

    #1216332

    Victoria,

    I disabled Wordfence, CSS and JavaScript Merging and I cleared the cache after, still not working properly. I also just updated to the latest release of Enfold.

    It is not working for me on an iPhone w/ the Chrome Browser App to give you more information. Sometimes I can get an item to show in the cart and when I get that to happen I can get to the checkout (this doesn’t happen every time), but when I tested this time, I added a product to the cart and it worked, but when I added a second item into the cart it got rid of the first item and replaced it with the newer item. Then I tried to add another item to see if I could repeat it and it ended up removing both items.

    EDIT*: Also not working on iOS Edge or Safari

    Thanks,
    Darren

    • This reply was modified 4 years, 6 months ago by darrenpace.
    #1218606

    Just checking in to see if there is any movement on this ticket? The issue is still not resolved.

    #1218687

    Hi,

    Sorry for the delay. Did you set your phone to block all cookies? Please note that items in the cart are saved using cookies, so it will not work properly if cookies are blocked. Another thing is the privacy cookies — you have to consent to the cookies first before any products can be added to the cart, unless the Privacy & Cookies > Default Cookie Behavior is set to the first option, then you’ll be able to add products without consenting to cookies.

    // https://support.apple.com/en-us/HT201265

    Best regards,
    Ismael

    #1218891

    Hello Ismael,

    I added a have checked on my phone and I am not blocking cookies. This seems to be an issue with multiple customers all on mobile so I wouldn’t think they all would have cookies disabled.

    My Attempt:
    I enabled the cookie bar and cleared the cache, I then cleared my cookies in my iPhone settings and attempted again to add to the cart, the first time works (as usual) but then any other additional product I add, clears the cart, only on the /cart/ page, but everything still remains in the cart in the main menu.

    #1220451

    Hi,

    Thank you for the update.

    We are able to reproduce the issue on MS Edge and found this error which seems to be related to the stripe gateway module or plugin.

    HTTP403: FORBIDDEN – The server understood the request, but is refusing to fulfill it.
    (XHR)POST – https://migdaliapace.com/?wc-ajax=wc_stripe_get_cart_details

    The cart starts working properly again when we deactivate the WooCommerce Stripe Gateway plugin. Unfortunately, we are not that familiar with the plugin, so you may need to contact the plugin authors for additional assistance.

    Best regards,
    Ismael

    #1222153

    Thank you for the update.

    We have deactivated it, but for some reason still experiencing the error, but this time with stripe being deactivated, we are producing this error in our WooCommerce logs pointing at Enfold files.

    2020-06-12T13:42:32+00:00 CRITICAL Uncaught Error: Cannot use string offset as an array in /var/www/wp-content/themes/enfold/config-woocommerce/config.php:1596
    Stack trace:
    #0 /var/www/wp-includes/class-wp-hook.php(287): avia_woocommerce_ajax_search_params('Aumberposts=5&p...')
    #1 /var/www/wp-includes/plugin.php(206): WP_Hook->apply_filters('numberposts=5&p...', Array)
    #2 /var/www/wp-content/themes/enfold/functions-enfold.php(309): apply_filters('avf_ajax_search...', 'numberposts=5&p...')
    #3 /var/www/wp-includes/class-wp-hook.php(287): avia_ajax_search('')
    #4 /var/www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #5 /var/www/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #6 /var/www/wp-admin/admin-ajax.php(190): do_action('wp_ajax_nopriv_...')
    #7 {main}
      thrown in /var/www/wp-content/themes/enfold/config-woocommerce/config.php on line 1596

    That line points to this foreach:

    foreach( $tax_query as $value ) 
    {
    	$params['tax_query'][] = $value;
    }

    Could this be related?

    • This reply was modified 4 years, 5 months ago by darrenpace.
    #1222656

    Hi,

    Where do you see that error? We can’t reproduce it on our end. This is what we see in the cart page after adding an item in it.

    Screenshot: https://imgur.com/a/maQaTzW

    And on a different note, the cart icon is missing because of a CDN or CORS issue. Not really sure what caused that but you can ask your CDN provider to properly configure the server.

    SEC7120: [CORS] The origin ‘https://migdaliapace.com’ did not find ‘https://migdaliapace.com’ in the Access-Control-Allow-Origin response header for cross-origin font resource at ‘https://secureservercdn.net/166.62.108.43/c23.fa4.myftpupload.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/assets/fonts/entypo-fontello.ttf’.

    CSS3119: No fonts available for @font-face rule

    Best regards,
    Ismael

    #1222846

    Thank you Ismael.

    With your suggestion it got me to look at the .htaccess file. I found this line of code at the top of the file with has our url and our staging site url in it, I commented this out and the cart began to work on Mobile again. To test it, I uncommented it and reloaded and got the empty cart issue, commented it once again, reloaded, and the cart appeared once again. It seems that commenting this line of code out fixes that issue.

    # BEGIN GD-SSL
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_USER_AGENT} ^(.+)$
    RewriteCond %{SERVER_NAME} ^migdaliapace\.com$ [OR]
    RewriteCond %{SERVER_NAME} ^fa4\.myftpupload\.com$
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    Header add Strict-Transport-Security "max-age=300"
    Header always set Content-Security-Policy "upgrade-insecure-requests"
    </IfModule>
    # END GD-SSL
    • This reply was modified 4 years, 5 months ago by darrenpace.
    #1222854

    Hi,

    Did you need additional help with this topic or shall we close?

    Best regards,
    Jordan Shannon

    #1223928

    You may close it

    #1223943

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘WooCommerce 4+ Mobile Cart is Empty Issue’ is closed to new replies.