Home Forums Basel support forum Only 0 left in stock

Only 0 left in stock

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #86271

    arnone
    Participant

    Hello, when a product is no longer in stock, I have the following message that appears: “Only 0 left in stock” (surrounded by a green frame) on my product page.

    I would like to change this mention and display the words “out of stock” (surrounded by red).
    Please tell me which files I need to modify and how to do it?

    I would also like to make this change for the French language (since currently the French mention is “Plus que 0 en stock” whereas I would like to display “plus en stock” surrounded by a red frame)

    Thank you for your help

    Attachments:
    You must be logged in to view attached files.
    #86282

    Hello,

    You can translate all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    Best Regards

    #86293

    arnone
    Participant

    Thank you for your quick answer, but I think it’s not just a.po file translation I need.

    I must change the mention “Only 0 left in stock” in “Out of stock” when the product is not in stock…..
    I guess it has to go through a php code
    in the style :

    if( $min_value == 0) {
    	?>
    <p class="stock out-stock"> Out of stock</p>
    	<?php
    } 

    or something like that…

    and only after then can I do the translation….. don’t you think?

    What files would I need to modify to do this and don’t you have the php code to do this?
    Thank you.

    #86335

    Hello,

    Disable Low stock notification and enable out of stock notification http://prntscr.com/lctl4c

    Navigate to WooCommerce > Settings > Product Tab > Invetory

    Best Regards

    #86547

    arnone
    Participant

    Hello,
    I tried to do that but it doesn’t work.

    Let’s take the following product as an example:
    https://arnone-project.com/en/boutique/jesus-walk-2/

    on WooCommerce > Settings > Product Tab > Invetory, I’ve disable Low stock notification and enable out of stock notification (please check screenshot_1)…

    but I don’t have the good mention “out of stock” (please check screenshot_2)

    on my admin product page, on the inventory tab, I have activated stock management from product (please check screenshot_3)

    and on the variation tab, I also activated the “manage stock” box on all variations (please check screenshot-4)…

    but that doesn’t change anything, I don’t get the mention “out of stock” (surrounded by red) when the product is no longer in stock. (I remind you that I have the mention “Only 0 left in stock” in green which is displayed” which is not good…)

    Attachments:
    You must be logged in to view attached files.
    #86572

    Hello,

    Disable “Enable inventory management at the product” level http://prntscr.com/ld6il1

    Best Regards

    #86635

    arnone
    Participant

    Hello,

    I’ve tried but it doesn’t work… :/

    Attachments:
    You must be logged in to view attached files.
    #86728

    Hello,

    You have not disabled the option in variations. I have disabled and the message has gone

    Best Regards

    #86836

    arnone
    Participant

    Hello,
    Dear Elise, are you sure you understand my problem?

    I just checked and it still doesn’t work… (see screenshot)

    When there is no more stock on a product, I would like, as on your demo page, that the following mention is displayed: “OUT OF STOCK” (surrounded by a red frame)

    However, when the product is no longer in stock, I have the following mention which appears: “Only 0 left in stock” (surrounded by green). and this is not what I want….

    Please check my screenshots to better understand my problem….

    Attachments:
    You must be logged in to view attached files.
    #86855

    Hello,

    Please check the issue on one of the default themes to understand if our theme causes the problem.

    Best Regrds

    #87529

    arnone
    Participant

    Hello,
    thank for your answer Elise.

    ok I tried changing the theme and disabling the plugins, the problem is still there.
    I deduce that the problem does not come from the theme…but perhaps from the woocommerce version used.

    I updated the latest version of woocommerce 3.5.1…I will try to go back to an earlier version of woocomerce to see if the problem is still there or not…obviously I will keep you informed Elise

    #87537

    Hello,

    Ok. that would be very useful for other visitors as well. Thanks

    Best Regards

Tagged: 

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