• Resolved head84

    (@head84)


    Hi there,

    I just set up some products with the “Allow, but notify customer” option in the backorders feature.

    In my cart page, I’d like the customer to know how many pieces of the item are in stock and how many are going to be backordered.

    For example, if we have 10 pieces of an item in stock, and the customer buys 24 pieces, I’d like the cart page text “Available on backorder” to be replaced with something like “10 in stock (24 on backorder)”.

    Could you please help me? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think you would need to make a custom template for that. Copy the relevant cart template to:
    wp-content/themes/your-child-theme/woocommerce/…
    and modify the template.

    The process is explained here:
    https://docs.woocommerce.com/document/template-structure/

    Every so often, Woo will update the core template, and your custom template may need modifying, so having custom templates can be an on-going burden.

    Writing the code would be development work which is probably beyond the scope of a forum answer.

    PHP skills would be needed, or you can post a job:
    https://jobs.wordpress.net/
    You would not be obliged to accept any bid.

    Thread Starter head84

    (@head84)

    Hi lorro,

    thank you for your reply. I finally solved adding a filter to the ‘woocommerce_cart_item_backorder_notification’ and putting the new function in my child theme functions.php.

    Kind regards

    • This reply was modified 5 years, 8 months ago by head84.

    Much better solution!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Edit “Available on backorder” text in cart’ is closed to new replies.