Shopping cart Icon amount is not updated

This topic has 12 replies, 2 voices, and was last updated 9 months, 3 weeks ago ago by Kristjan

  • Avatar: Kristjan_Rebane
    Kristjan
    Participant
    June 30, 2023 at 14:33

    1. Shopping cart Icon amount in the main menu is not updated when:
    changing item quantity in cart
    It updates with page refresh.

    2. Shopping cart Icon amount is not updated at all after applying a coupon.

    11 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 30, 2023 at 15:43

    Hello, Kristjan,

    Thank you for contacting us and for using XStore.

    Please try to activate Always load “wc-cart-fragments” via Theme Options > Speed Optimization. Clear cache and check the result.

    Kind Regards,
    8theme team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    July 5, 2023 at 14:55

    Well, it helped with popup calculation. But after applying coupon, it still calculates incorrectly even after refreshing the page.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 5, 2023 at 15:30

    Hello, Kristjan,

    Thank you for your response.

    Please record a video of the problem (upload it on a filesharing service, for example – https://wetransfer.com/ , and provide us with URL)and provide temporary wp-admin access, so we can check the situation more deeply.

    Kind Regards,
    8theme team

    Please contact administrator
    for this information.
    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    July 7, 2023 at 14:38

    The video is here: https://hilo.ee/files/booster.mp4
    Free shipping starts from 78 euros.
    As you can see, I have added message in shopping cart myself that calculates correctly.
    I’m using this for cart value:
    WC()->cart->cart_contents_total + WC()->cart->tax_total;
    Changing the setting “Ignore coupons while count free shipping” to “yes” still calculates incorrectly.

    Calculation works fine without applying a coupon.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 7, 2023 at 15:02

    Hello, Kristjan,

    Thank you for your response.

    We need to check the settings on your site more deeply. Please provide temporary wp-admin and FTP access.

    Kind Regards,
    8theme team

    Please contact administrator
    for this information.
    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    July 7, 2023 at 15:31

    Sending info
    You can use “SINUTH10” as a coupon code.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 7, 2023 at 15:37

    Hello, Kristjan,

    Thank you for your response.

    Please provide the correct wp-admin access – https://prnt.sc/JGnDtpvPd8Ou

    Kind Regards,
    8theme team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    July 7, 2023 at 17:15

    Please use this password:

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 9, 2023 at 08:21

    Hello, Kristjan,

    Thank you for your response.

    We will have another specialist review your inquiry in greater detail and will be in touch with you after the weekend.

    Kind Regards,
    8theme team

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 10, 2023 at 15:10

    Hello, Kristjan,

    By default, we use WC()->cart->get_displayed_subtotal() to calculate the amount.
    We have updated the theme and added the et_progress_bar_amount filter to it, which allows you to change the formula for calculating the amount.
    This filter will also be included in the next theme update.
    Using this filter, we have changed the formula to yours.
    The filter is located in the child theme in the functions.php file.
    If you wish, you can change it, for example, to take into amount coupons in the calculation.
    The code of the filter is below.

    /**
      * Change theme progress bar amount.
     */
    add_filter('et_progress_bar_amount', function($amount){
       $amount = WC()->cart->cart_contents_total + WC()->cart->tax_total;
       //Uncomment this to add discount to amount
       //$amount += WC()->cart->get_discount_total();
       return $amount;
    }, 10, 1);

    Kind Regards,
    8theme team

    Avatar: Kristjan_Rebane
    Kristjan
    Participant
    July 10, 2023 at 15:20

    Thanks! It is working now.

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

The issue related to '‘Shopping cart Icon amount is not updated’' 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.