Home › Forums › Basel support forum › Only 0 left in stock
Only 0 left in stock
- This topic has 11 replies, 2 voices, and was last updated 6 years ago by Elise Noromit.
-
AuthorPosts
-
October 31, 2018 at 2:01 pm #86271
arnoneParticipantHello, 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.October 31, 2018 at 2:25 pm #86282
Elise NoromitMemberHello,
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
October 31, 2018 at 2:50 pm #86293
arnoneParticipantThank 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.October 31, 2018 at 7:09 pm #86335
Elise NoromitMemberHello,
Disable Low stock notification and enable out of stock notification http://prntscr.com/lctl4c
Navigate to WooCommerce > Settings > Product Tab > Invetory
Best Regards
November 1, 2018 at 2:00 pm #86547
arnoneParticipantHello,
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.November 1, 2018 at 3:46 pm #86572
Elise NoromitMemberHello,
Disable “Enable inventory management at the product” level http://prntscr.com/ld6il1
Best Regards
November 1, 2018 at 6:57 pm #86635
arnoneParticipantNovember 2, 2018 at 7:44 am #86728
Elise NoromitMemberHello,
You have not disabled the option in variations. I have disabled and the message has gone
Best Regards
November 2, 2018 at 2:23 pm #86836
arnoneParticipantHello,
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.November 2, 2018 at 2:54 pm #86855
Elise NoromitMemberHello,
Please check the issue on one of the default themes to understand if our theme causes the problem.
Best Regrds
November 6, 2018 at 5:25 pm #87529
arnoneParticipantHello,
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
November 6, 2018 at 6:52 pm #87537
Elise NoromitMemberHello,
Ok. that would be very useful for other visitors as well. Thanks
Best Regards
-
AuthorPosts
Tagged: stock
- You must be logged in to create new topics. Login / Register