Home › Forums › WoodMart support forum › Show if product is in stock
Show if product is in stock
- This topic has 8 replies, 2 voices, and was last updated 10 months, 1 week ago by
Hung Pham.
-
AuthorPosts
-
February 19, 2024 at 11:35 pm #541562
raz.soferParticipantHi. We have an elementor widget on our product pages which states if a product is not in stock, but we want it to show if the product is in stock as well.
I have attached photos in privateFebruary 19, 2024 at 11:36 pm #541565
raz.soferParticipantWorth to mention that the stock status is ok on product archive, just missing on product pages
February 20, 2024 at 6:42 pm #541929
Hung PhamKeymasterHi raz.sofer,
Thanks for reaching to us.
You can check
Track stock quantity for this product
box https://prnt.sc/_B-E6ssqg8GjRegards,
February 21, 2024 at 2:03 pm #542310
raz.soferParticipantThank you very much Hung!
I think our stock management system integration wont allow this as they only do 1 or 0 on stock status. Is that the only way?February 22, 2024 at 8:26 am #542601
Hung PhamKeymasterHi raz.sofer,
Sorry, but your reply is a bit unclear to me. Please describe in more details, this will allow me to thoroughly investigate and address your concerns in a more efficient.
Regards,
February 25, 2024 at 10:44 am #543584
raz.soferParticipantThank you Hung.
We have a stock sync plugin with our warehouse management system.
The problem is that the sync only sends to wordpress “In Stock” or “Not in Stock” (without the exact amount that is present)
It is an old warehouse system and it would be very time consuming to fix this issue
Is there another way to bypass the requirement of the stock amount and do it as “1 or 0” method?-
This reply was modified 1 year ago by
raz.sofer.
February 26, 2024 at 5:29 am #543671
Hung PhamKeymasterHi raz.sofer,
Sorry to say there are no options to achieve this.
For specialized assistance and potential solutions, I kindly suggest that you reach out directly to the WooCommerce plugin’s support team https://wordpress.org/support/plugin/woocommerce/, who are better equipped to provide you with the guidance you require or You need to find a third party plugin to achieve more functionality that best suits you.
Regards,
April 26, 2024 at 8:51 pm #561182
raz.soferParticipantHi Hung
I did a code myself. Maybe you could add it to theme options in later updates:// Force front end display of stock status based on product setting and not quantity add_filter('woocommerce_get_availability', function($availability, $product) { // Ignore quantity and use only stock status if ($product->is_in_stock()) { $availability['availability'] = __('In Stock', 'woocommerce'); } else { $availability['availability'] = __('Out of Stock', 'woocommerce'); } return $availability; }, 10, 2);
April 28, 2024 at 12:54 pm #561421
Hung PhamKeymasterHi raz.sofer,
Glad to hear your issue has been resolved and thanks for sharing the code. Keep us in mind for future questions and concerns, we’re always here to help!
Regards,
-
This reply was modified 1 year ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register