Minicart quantity doesn’t update pricing and increasing quantity in basket/cart duplicates fields

This topic has 23 replies, 4 voices, and was last updated 1 months, 1 weeks ago ago by Luca Rossi

  • Avatar: Trev
    Offcomer
    Participant
    March 9, 2025 at 19:22

    Hi!
    I’m assuming these two issues are related – increasing or decreasing product quantities in the minicart doesn’t show the recalculated price, and increasing/decreasing item quantities duplicates the Product and the Basket Totals fields on the basket page (doubling these on one click, and increasing them 8-fold on a second click. Refreshing the Basket page restores order.
    I’ve seen lots of mentions on these issues but no solutions I can apply that fix these.
    The only “guilty” plugin I use seems to be Elementor Pro, but while disabling this restores correct functionality, I lose a lot of my site’s features.
    I have even rolled back WooCommerce to the last version that is marked as being fully compatible with the latest version of XStore. I have cleared caches both from the dashboard and within the different web browsers I use for testing (IE, Opera, FF, Chrome), but the result’s the same.
    Any ideas?
    Cheers

    22 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 10, 2025 at 08:16

    Hello, Offcomer,

    Thank you for reaching out to us.

    1/ To assist you more effectively, we kindly request that you record video demonstrating of issues and the steps leading to them. This will help us better understand and replicate problems on our end.
    Upload videos on a filesharing service, for example – https://wetransfer.com/ , and provide us with URLs.

    2/ Could you please provide temporary wp-admin access? We need to check your settings.

    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    Warm Regards,
    The 8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 10, 2025 at 11:26

    Hi
    Thanks for getting back to me quickly.
    I’ve provided the link to the video download and the login info you need.
    The video covers the essential cart/basket behaviour before and after disabling Elementor Pro (PRO Elements does the same thing, btw).
    Look forward to hearing you.

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 11, 2025 at 16:25

    Dear @Offcomer,

    We hope you are doing well.

    We conducted a test using the default shortcode [woocommerce_cart] on your cart page, which displays the basic cart content. However, we noticed that any action involving cart item elements results in content duplication, as shown in the following screenshot: https://prnt.sc/bMg0z2SPlVcb.

    This behavior suggests that a specific plugin configuration may be causing the issue, because we tested on our local web-sites and there are no such issues. To help identify the root cause, we kindly ask you to test your website with only the required plugins activated. The required plugins for your website are:

    – XStore Core
    – Elementor
    – Elementor PRO
    – WooCommerce

    Please deactivate all other plugins temporarily and check if the issue persists. This will help us determine whether a third-party plugin is responsible for the duplication.

    We appreciate your cooperation and look forward to your feedback.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 11, 2025 at 17:24

    Hi
    For information, I had done this prior to contacting you, which allowed me to identify Elementor Pro as the sole culprit.
    Doing it again and deactivating everything except XStore Core, Woocommerce, Elementor and Elementor Pro results in the Minicart ajax behaviour being restored, but not the cart/basket behaviour.
    Going one step further and deactivating Elementor Pro results in the minicart and the cart behaving correctly.
    Prior to contacting you, I had tested every other plugin in turn to see if there was a conflict, and there wasn’t.
    Any ideas?
    Cheers,

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 12, 2025 at 16:38

    Dear @Offcomer,

    As you are a valued customer of the Elementor PRO plugin, we would like to address the duplication issue you have encountered. Based on our previous tests, we have observed that this issue persists even when using the default WooCommerce shortcode. Therefore, we kindly recommend reaching out to Elementor PRO’s support team for further assistance.

    Additionally, we would like to highlight that this issue does not occur on our local websites, which suggests that it may be related to a hidden setting within Elementor PRO. As their developers are more familiar with the intricacies of their code, they would be best suited to investigate and resolve this matter.

    We appreciate your understanding and adherence to our support guidelines. Kindly inform us once you receive a response from Elementor PRO, as we would like to be aware of the specific setting that caused this issue. This information may also be helpful for assisting other clients who might encounter a similar problem.

    Thank you for your cooperation.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 12, 2025 at 16:44

    Hi
    I did indeed begin by asking the guys/gals at Elementor PRO if they could tell me what the problem was.
    When they saw I was using the XStore Theme, they told me to contact you.
    Is this the part where we start going round in circles?
    I hope not.
    I will contact them again to see if they’ll take another look at this, but I’m not holding my breath.
    Regards,
    Trevor

    Avatar: Trev
    Offcomer
    Participant
    March 14, 2025 at 13:35

    Hi

    Here is Elementor’s reply :

    I have taken a look at the issue you’re facing, and unfortunately, this is out of the scope of Elementor’s technical support. Our technical support doesn’t provide assistance with third-party plugin features, shortcode functionalities, any custom code, or help with troubleshooting code for errors.

    Since the entire shop page, add to cart, products view, cart page, checkout, etc. system has been made without Elementor, but with XStore elements, we can only suggest you get in touch with them, as our Technical support channels here only provides support for Elementor widgets and our system if they are not working correctly.

    If there is an issue that their support needs fixed from our side to make their widgets work, they may contact our developers on GitHub and work with them to resolve this:
    -https://github.com/elementor/elementor

    If you wish to receive support from Elementor’s technical support channels here, you would have to make the Shop page with our Products Archive template. Use our Archive products / Products / Loop Grid widgets to display the products. Make the Cart page with our Cart widget, use our Menu cart widget in the header, etc.

    So where do I go from here?
    A complete rebuild? In which case do I stick with XStore, or move over to a 100% Elementor site?
    Or do I abandon Elementor Pro and stick to the basic (and very limited) Elementor toolset?

    Please share your thoughts.
    Thanks,

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 14, 2025 at 17:04

    Dear @Offcomer,

    We hope you are doing well.

    Would it be possible for us to test the functionality of the Cart page on your web-site using a default theme, such as Storefront? We would like to conduct this test on your website to determine whether the issue originates from Elementor PRO or if it is related to the compatibility between our theme and Elementor PRO’s configuration.

    Once we complete the testing, we will share the results with you. This will help us identify the root cause of the issue based on factual findings and determine who should address the necessary fixes.

    We appreciate your cooperation and look forward to your response.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 15, 2025 at 14:13

    Hi
    Yes, of course.
    Do you want to do it on the staging site or will you be doing it on the live site?
    On the staging site, I will leave this up and not touch it until you get back to me with your results.
    Many thanks,

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 17, 2025 at 09:06

    Hello @Offcomer,

    If it is possible to create a staging website that will have same content as live one where we can enable or disable features without affecting the live website, that would be highly beneficial.

    Kindly provide us with the details of such a staging environment so that we can conduct the necessary testing for you.

    We appreciate your support and look forward to your response.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 17, 2025 at 09:34

    Hi
    Please see private content area.
    Many thanks

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    March 17, 2025 at 16:19

    Dear @Offcomer,

    Thank you for providing access to the staging website. We have conducted multiple tests and observed that the issue appears to be related to the structure of the cart page content.

    To further investigate and implement the necessary modifications, we kindly request FTP access to the staging website. This will allow us to make adjustments to the cart page template files and check for any structural issues.

    Could you please share the FTP access details with us at your earliest convenience?

    We appreciate your support and look forward to your response.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 17, 2025 at 17:27

    Supplied.
    See private content area.

    Please contact administrator
    for this information.
    Avatar: Justin
    Luca Rossi
    Support staff
    March 20, 2025 at 19:01

    Dear @Offcomer,

    We would like to inform you that the issue you encountered appears to be a known bug related to the Elementor Pro/Pro Elements plugin when used with the latest version of WooCommerce:

    https://github.com/woocommerce/woocommerce/issues/27130#issuecomment-2659263497

    To resolve this, we have applied a temporary fix to your staging site, and everything is now functioning correctly. The implemented solution is as follows:

    
    add_action('wp_footer', 'n2t_wp_footer', 100);
    function n2t_wp_footer(){
    	?>
    <script>
    function checkAndRemoveDuplicatedCarts() {
        const woocommerceCartForm = document.querySelectorAll(".woocommerce-cart-form"); // -> check the selector in your site
        const cart_totals = document.querySelectorAll(".cart_totals");// ->check the selector too
    
        if (woocommerceCartForm.length > 1) {
            for (let index = 1; index < woocommerceCartForm.length; index++) {
                woocommerceCartForm[index].remove();
            }
        }
    
        if (cart_totals.length > 1) {
            for (let index = 1; index < cart_totals.length; index++) {
                cart_totals[index].remove();   
            }
        }
    }
    
    /* UPDATED SECTION */
    window.onload = addMutationObserver;
    function addMutationObserver() {
      // add a mutationObserver
      //https://developer.mozilla.org/fr/docs/Web/API/MutationObserver
      var targetNodeObserver = document.getElementById("cart"); // use the ID of your cart widget
      var configObsever = { 
        attributes: true,
        characterData: true,
        childList: true,
        subtree: true,
        attributeOldValue: true,
        characterDataOldValue: true 
      };
    
      // callback function
      var callbackObserver = function (mutationsList) {
        for (var mutation of mutationsList) {
          if (mutation.type == "childList") {
            console.log("node changed.");
          } else if (mutation.type == "attributes") {
            console.log("attibute '" + mutation.attributeName + "'  has changed.");
          }
        }
        checkAndRemoveDuplicatedCarts(); // it launch the function here when there is a change
      };
    
      // create instance
      var observer = new MutationObserver(callbackObserver);
    
      // Observe the node
      observer.observe(targetNodeObserver, configObsever);
    }
    </script>
    	<?php
    }
    

    To ensure the same fix is applied to your live site, could you please copy this code into the functions.php file of your live environment as well?

    Should you require any further assistance, please do not hesitate to reach out.

    Best regards,
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 21, 2025 at 09:47

    Thanks for the solution.
    However, which functions.php file do I need to edit?
    I have 36 functions.php files on the site 😂 and while most are clearly not the ones you refer to, editing the most obvious one didn’t do anything.
    More efficient to ask you, the expert, than to try and solve this using trial & error.
    Many thanks

    Avatar: Justin
    Luca Rossi
    Support staff
    March 21, 2025 at 13:08

    Dear @Offcomer,

    That file should locate under: /wp-content/themes/xstore-child/functions.php

    Best Regards,
    8Theme’s Team

    Avatar: Trev
    Offcomer
    Participant
    March 21, 2025 at 14:40

    First attempt – problem not fixed.

    The existing code in my functions.php file is :

    Avatar: Justin
    Luca Rossi
    Support staff
    March 21, 2025 at 16:44

    Hi @Offcomer,

    Could you please check again?

    Thank you!

    Avatar: Trev
    Offcomer
    Participant
    March 21, 2025 at 17:43

    Hi again

    Just reinserted the code, cleared the Elementor and XStore/Woocommerce caches, opened the site in a new browser in privacy mode, and…

    The darned cart is now working properly 😎👍

    Thanks for your help. I most certainly couldn’t have done this without your help.

    I now just need to determine why when I clear the contents of my cart, the formatting I set for my empty cart message is not being observed (though it does display correctly if I hit the browser’s refresh button).

    Thanks again

    Avatar: Justin
    Luca Rossi
    Support staff
    March 22, 2025 at 09:18

    Dear @Offcomer,

    We have updated the CSS Print Method setting to Internal Embedding, and as a result, the empty cart now appears correctly.

    https://prnt.sc/5qDkOc2RAWLv

    https://prnt.sc/LLsU4LgVAynD

    Could you kindly confirm if everything is working fine on your end as well?

    Thank you for your time and assistance.

    Best regards,
    8Theme Team

    Avatar: Trev
    Offcomer
    Participant
    March 22, 2025 at 16:26

    Yup! Brilliant.
    Seems to be working fine now.
    Very many thanks for that.
    Have a great weekend. 😎

    Avatar: Justin
    Luca Rossi
    Support staff
    March 23, 2025 at 17:10

    Hello @Offcomer,

    Thank you for your kind words! We are pleased to hear that everything is working fine now.

    Should you need any further assistance, please do not hesitate to reach out.

    Best regards,
    8Theme’s Team

  • Viewing 23 results - 1 through 23 (of 23 total)

The issue related to '‘Minicart quantity doesn’t update pricing and increasing quantity in basket/cart duplicates fields’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.