Home Forums WoodMart support forum Cart Widget

Cart Widget

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

    Angelp357
    Participant

    I am having this issue for the second time. The first time I was able to get it to work as intended but this time I am stuck. I have tried disabling the plugins as was suggested last time I had this issue but the issue still remains.

    Could someone take a look at the site and see if they could identify the issue? I really think it is starting to affect my conversion rate. Thanks.

    #375363

    Angelp357
    Participant

    I just realized I didn’t describe what the actual issue is.

    What happens is if I add an item to the cart it is added as intended but when I leave the cart and try to open the slider/widget it shows as empty. If I add a second item to my cart it will now show both items in the cart but if I leave the cart again and open the slider/widget again it will show as empty again.

    I have hired a developer to direct visitors directly to the cart page every time an item is added to the cart but this is not how I want the website to work. It seems like the conversion rate has dropped ever since this change has been made. I hope this makes sense.

    #375601

    Hello,

    Please deactivate all the third party plugins, activate the parent theme then clear cache and check back.

    If the problem still continues then leave all the third party plugins and tell me then we will troubleshoot with the theme plugins.

    Best Regards

    #376311

    Angelp357
    Participant

    Ok I created a staging site and did everything as instructed above. I am still having the same issue. If you can take a look at it I would appreciate it. Thanks.

    • This reply was modified 2 years, 8 months ago by Angelp357.
    #376410

    Hello,

    As all the third party plugins are deactivated on your website with the parent theme activated. The issue is not appearing.

    Screenshot: https://gyazo.com/2b8e804791c7cca0c90aead6dd3dc346

    Best Regards

    #376595

    Angelp357
    Participant

    I just checked and it’s still doing it. Can you add something to the cart and click on a new page or go back to the shopping page and then check.

    The issue happens when you leave the cart page and go on to another page then try to check your cart again.

    #376828

    Hello,

    When I try to check the issue on your website after adding the products to the cart it is redirected to the cart page of the live site. Please resolve this issue first to let me assist you further.

    Best Regards

    #377312

    Angelp357
    Participant

    I spoke to my developer and he said that shouldn’t be the case since you are using the parent theme and he added that redirect on the child theme so it should be redirecting to the live site at all. It should work like a fresh install.

    #377499

    Hello,

    Could you please check how it works with the default woocommerce theme like storefront. I have checked witht he StoreFront theme as well and it is showing empty, please see the screenshot:
    https://gyazo.com/6acf233874dde1dbf2f0157aecdddba7

    Best Regards.

    #377591

    Angelp357
    Participant

    I have contacted Woocommerce explaining the issue and your findings. Hopefully, they are able to find the issue.

    #377599

    Angelp357
    Participant

    This was the response I received from Woocommerce. Does this make sense to you?

    Hey Angel,

    Thanks for the screenshot as it was helpful.

    Summary
    I am having an issue with my cart widget. I am using the WoodMart theme and I have contacted the developer regarding this issue but they stated that while troubleshooting the issue they changed the theme to Storefront and encountered the same issue.

    The issue I am having is when a visitor adds a product to the cart it shows as intended but when they leave and browse other items the cart goes to 0. If another item is added to the cart both the 1st item added and the new item show. If you leave the cart again and browse another page the same issue continues to occur and the cart goes to 0 again.

    The live site has been modified with a temporary workaround but the staging site is: https://1eaa4897f0.nxcli.net

    Steps Taken
    What I did was compare your code to my test site’s code (with Storefront) to see where the differences are. The thing you should know is that WooCommerce’s display is largely dependent on themes as well as other settings you may have chosen. Based on the following screenshot, the site is missing some code that would show the cost within the cart. My test site code is the one on the top:

    Link: https://d.pr/i/VbBZsP

    The other item to check is whether or not WP Rocket is minimizing JavaScript. WooCommerce relies heavily on JavaScript in order to display. This would affect the cart as well. JS should not be concatenated or minimized. cart, checkout, and my-account pages should also not be cached. More information on how to set up caching plugins for WooCommerce here: https://woocommerce.com/document/configuring-caching-plugins/

    You can also test whether caching is the issue here by disabling WP Rocket for this experiment.

    Any additional troubleshooting would best be done with the theme developer as my basic version of Storefront contains the needed code to display.

    #377637

    Angelp357
    Participant

    I wanted to add, what can I do to make this a high priority? I will pay extra if needed. This issue is affecting our business in a significant way. Our conversion rate has dropped from 3% to less than 0.5% ever since this started and it seems to be getting worse every day.

    Whatever you can do to resolve this issue asap would be greatly appreciated.

    #377887

    Angelp357
    Participant

    So I hired my own developer fix the problem that you claimed was not the theme since I never heard back from anyone. It cost me $400 (which I think I should be reimbursed for) and I am going to leave a bad review over. But he created a patch to fix the issue on the child theme and suggested you need to create a patch on the theme itself. I am attaching it here so you know what was done.

    #377888

    Angelp357
    Participant

    Here it is since I can’t upload the file.

    <script>
    jQuery( document ).ready( function() {
    var data = ‘action=woodmart_ajax_add_to_cart’;
    jQuery.ajax({
    url : woodmart_settings.ajaxurl,
    data : data,
    method : ‘POST’,
    success : function(response) {
    if (!response) {
    return;
    }
    var fragments = response.fragments;
    var cart_hash = response.cart_hash;

    // Block fragments class
    if (fragments) {
    jQuery.each(fragments, function(key) {
    jQuery(key).addClass(‘updating’);
    });
    }

    // Replace fragments
    if (fragments) {
    jQuery.each(fragments, function(key, value) {
    jQuery(key).replaceWith(value);
    });
    }
    // Changes button classes
    // Trigger event so themes can refresh other areas
    // woodmartThemeModule.$body.trigger(‘added_to_cart’, [
    // fragments,
    // cart_hash,
    // null
    // ]);
    },
    error : function() {
    console.log(‘ajax adding to cart error’);
    },
    complete: function() { }
    });
    } );
    </script>

    #377893

    Artem Temos
    Keymaster

    Hello,

    We are sorry that you faced this problem on your website. But, according to WooCommerce’s response, this issue was not caused by our theme. And we already tested it didn’t work with other themes as well. This fix just recreates the standard WooCommerce function that should work without any extra code. So you would better discuss this with WooCommerce further since there is something wrong there and should be fixed in the right way, without additional code snippets like that.

    Kind Regards

Viewing 15 posts - 1 through 15 (of 15 total)