Viewing 15 posts - 1 through 15 (of 15 total)
  • #163275
    Slim
    Member
    Post count: 422

    Hi friends,
    In stocks quantity , I want when it comes 1 unit of product, appear the message “you can buy, but can take up to 6 weeks to arrive your home”

    Can you help me?

    Thankz;))

    #163317
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am not sure about it. Please ask at Woocommerce Support https://support.woothemes.com/ about it.
    Thanks
    Mohammad

    #163407
    Slim
    Member
    Post count: 422

    I don’t have login on this site mohammad

    #163408
    Slim
    Member
    Post count: 422

    I created one;)
    Thankz

    #163411
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    
    add_filter( 'woocommerce_short_description', 'custom_stock_messages', 25 );
    function custom_stock_messages($desc) {
        global $product;
        $prodquantity = $product->get_stock_quantity();
        
            if ( $prodquantity == 1 ) {
                $desc .= '<p>you can buy, but can take up to 6 weeks to arrive your home.</p>';
                return $desc;
            }
            else {
                return $desc;
            }
        
    }

    Thanks
    Mohammad

    #163413
    Slim
    Member
    Post count: 422

    Thankz man! it works;))

    #163416
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome.
    Thanks
    Mohammad

    #164683
    Slim
    Member
    Post count: 422
    This reply has been marked as private.
    #164688
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That’s something you should set in Woocommerce Settings to allow purchases without stock.

    Check with woocommerce support, they are in better position to help you out.

    -Rui

    #164786
    Slim
    Member
    Post count: 422
    This reply has been marked as private.
    #164826
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    This is something managed at a product level(set this in each product)
    https://www.dropbox.com/s/p9fbprezhm382rn/product_backorders.png?dl=0

    Please contact Woocommerce support for further details on this.

    -Rui

    #164837
    Slim
    Member
    Post count: 422

    each product? impossible man, i have a lot of products! it’s hard to do this for all products ,are so many .

    I ‘ve already contacted but have not told me anything yet!

    Thankz rui;)

    #164840
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    That’s the only way that I’m aware.
    wait a while for their reply.

    -Rui

    #164842
    Slim
    Member
    Post count: 422

    ye, i tried your solution, and works!! I’ll wait for their response, and then I will probably do what you said.

    Thankz rui!;)

    #164843
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem.
    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register