User is allowed to checkout out OOS product and no error message is displayed

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

  • Avatar: Abhijeet Kumar
    Abhijeet Kumar
    Participant
    January 14, 2025 at 11:42

    User is allowed to checkout out Out Of Stock product (inventory is removed after product is added to cart) and no error message is being displayed for product being out of stock even though backorder is not allowed

    Steps to replicate:
    1) Add any product to cart like http://refurbraja.com/product/jbl-go-2/#
    2) Remove the inventory after the product is added to cart
    3) Refresh the cart page to see the message for product being out of stock
    4) Try to checkout
    5) User should be displayed error message for product being out of stock and should not be allowed to place order

    Expected Result:
    1) On cart page: User should be displayed message for product being out of stock after the page is refreshed
    2) User should not be allowed to place order and should be displayed error message for product being out of stock

    https://paste.pics/949d26c2dadc990e205cf86739abf9e7

    Please, contact administrator
    for this information.
    4 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    January 14, 2025 at 16:55

    Dear @Abhijeet Kumar,

    We hope this message finds you well.

    Firstly, we would like to kindly ask if you have conducted a test using the default Storefront theme. If so, could you please share the results of your testing? This will help us determine whether the issue is specific to our theme.

    Secondly, in one of our previous discussions, we recommended using the WooCommerce Notices widget on pages such as the Cart and Checkout. However, upon reviewing your setup, we noticed that this widget has not been added to the Checkout page. This may be the reason why notifications from WooCommerce are not appearing as expected.

    Lastly, we kindly request that you avoid duplicating the same information in the private area. The private area is intended for confidential content only, and repeating the same details there does not provide additional value or clarity.

    Thank you for your understanding and cooperation. Should you have any further questions or require assistance, please do not hesitate to reach out.

    Best regards,
    Jack Richardson
    The 8Theme Team

    Avatar: Abhijeet Kumar
    Abhijeet Kumar
    Participant
    January 29, 2025 at 13:15

    This is working fine on the default/ vanilla theme http://155.248.255.99:8080/
    Please refer to screen shot at:
    https://paste.pics/c7bd05b0b39003c4260e64d7a7812359

    Can you help on the enabling of notices on this theme?

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    January 30, 2025 at 16:25

    Dear @Abhijeet Kumar,

    We hope this message finds you well.

    We would like to inform you that we have successfully recreated the issue on our end and have already forwarded the task to our development team for further investigation and resolution.

    In the meantime, we kindly suggest the following temporary solutions:
    1. Use the default shortcode on the Cart page content, which is [woocommerce_cart].
    2. Configure the settings for the Cart page by navigating to Theme Options -> WooCommerce -> Cart/Checkout Layout.

    Please rest assured that we are actively working on this matter, and we will notify you as soon as we have identified a solution.

    Thank you for your understanding and patience. Should you have any further questions or concerns, please do not hesitate to reach out.

    Best regards,
    Jack Richardson
    The 8Theme Team

    Avatar: Justin
    Luca Rossi
    Support staff
    February 4, 2025 at 13:15

    Dear @Abhijeet Kumar,

    We hope this message finds you well.

    We would like to share an alternative solution that you can try to resolve the issue you are experiencing. Please follow the steps below:

    1. Add the following code to the functions.php file located in your child theme:

      
    add_shortcode( 'do_hook', function( $atts = array(), $content = null, $tag = '' ) {  
        if ( isset( $atts['hook'] ) ) {  
            do_action( $atts['hook'] );  
        }  
        return;  
    });  
    

    2. Once the code is added, place two shortcode elements above the Cart Page (default) element, as shown in this screenshot: (https://tinyurl.com/2dhartbh).

    – Shortcode 1:

     
       [do_hook hook="woocommerce_check_cart_items"]  
    

    – Shortcode 2:

     
       [do_hook hook="woocommerce_before_cart"]  
    

    We hope this solution proves helpful in addressing the issue. Should you have any further questions or require additional assistance, please do not hesitate to reach out.

    Best regards,
    The 8Theme Team

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

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

Helpful Topics

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