After the product quantity changes can not stay in the same area on the cart page.

This topic has 4 replies, 2 voices, and was last updated 3 months, 1 weeks ago ago by Jack Richardson

  • Avatar: Sam
    Sam
    Participant
    September 8, 2024 at 09:41

    Hi,

    I change the cart quantity on the cart page.
    The cart page should stay in the same area after the product quantity changes but the page goes up and then goes down. This will happen every time you change the quantity of goods.

    (The page can stay in the same area after the product quantity changes on the checkout page.)

    How do I edit to stay in the same area after the product quantity changes on the cart page?

    Wetransfer Platform Download link:
    https://we.tl/t-ugqCYxRhr3

    Thank you very much.

    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 9, 2024 at 10:52

    Dear @Sam,

    I hope this message finds you well. I am writing to address your inquiry regarding the default behavior observed in WooCommerce, specifically related to the autoscrolling feature on the Cart page.

    You can observe this default functionality in action on the official Storefront theme demo, available at: https://themes.woocommerce.com/storefront/cart/.

    Additionally, this topic has been discussed in the WooCommerce GitHub repository. There, you will find various code snippets provided by other users that may help you prevent the autoscrolling when quantities are changed or products are deleted from the Cart page. For more details, please visit: https://github.com/woocommerce/woocommerce/issues/21988.

    One effective solution, as you are using Elementor, would be to remove the ‘WooCommerce Notices’ widget from your Cart page. This will prevent any notices from being displayed, thereby stopping the JavaScript from triggering a scroll to these notices.

    Alternatively, you may try the next solution to consider is adding the following code snippet to your child theme’s functions.php file:
    remove_action('woocommerce_before_cart', 'woocommerce_output_all_notices', 10);

    This code and further discussion can be found at: https://github.com/woocommerce/woocommerce/issues/21988#issuecomment-734146884.

    Should you require any further assistance or have additional questions, please do not hesitate to contact us.

    Best Regards,
    Jack Richardson
    The 8Theme Team

    Avatar: Sam
    Sam
    Participant
    September 9, 2024 at 13:37

    Hi, thank you for your support.

    I add this code to the child theme’s functions.php file.
    The page stays in the same area after the product quantity changes and does not display the notices.

    But, the cart page notice goes to the checkout page to display.
    If I change the product quantity and go to another page.
    The notice will be displayed on another page.

    (The checkout page has not added the “woocommerce notices widget”.)

    Wetransfer Platform Download link:
    https://we.tl/t-DZQzmpVy87

    How do I fix displaying the notices on the checkout page?

    (*I temporarily restore the previous status.)

    Thank you.

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 9, 2024 at 15:15

    Dear @Sam,

    I hope this message finds you well. Regarding the issue you are experiencing, we have identified several potential solutions for you to consider:

    1. You can submit a request for additional customization directly through our website. Please use the following link to access the customization panel: https://www.8theme.com/account/#etheme_customization_panel.

    2. Consider searching for custom solutions, such as adding custom JavaScript snippets, which can help to scroll back after the default WooCommerce scrolling to the top.

    3. You may also contact WooCommerce support to inquire if a global solution can be implemented in their code, especially since this issue is also present in the default Storefront theme.

    4. Submit a request on our Future taskboard -> https://www.8theme.com/roadmap/.

    5. Alternatively, you may choose to retain the current scrolling effect as it is.

    Should you need further assistance or have any questions, please do not hesitate to contact us.

    Kind regards,
    Jack Richardson
    8Theme’s Team

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

You must be logged in to reply to this topic.Log in/Sign up

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