Skip Navigation

[Resolved] How to made condition for views_woo_in stock

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Rostislav Avtodiychuk 3 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2198309

Tell us what you are trying to do?
I whant made fast order for my product by category but i need hide or highlight the row products in the status - out of stock. I found this solution https://toolset.com/forums/topic/woocommerce-product-in-stock-views-filter-not-updating-properly/ but i don't understand how to apply in my case with blocks hidden link . Thanks for the help.

Is there any documentation that you are following? https://toolset.com/forums/topic/woocommerce-product-in-stock-views-filter-not-updating-properly/

Is there a similar example that we can see?

What is the link to your site? hidden link

#2198649
blocks-stock-condition.png

Hi,

Thank you for contacting us and I'd be happy to assist.

In the Blocks editor, you can compare the static value '1' with the "views_woo_in_stock" field, to check if the product is in stock or not.
( example screenshot attached )

regards,
Waqar

#2198821

I try you condition hidden link in debug field I see - that work right, but not hide my text hidden link
instock debug information
####################
wpv-conditional attributes
####################
Array
(
[if] => NOT ( ( '1, 1, 1, 1' = '0' ) )
[debug] => true
)

####################
Debug information
####################
--------------------
Original expression: NOT ( ( '1, 1, 1, 1' = '0' ) )
--------------------
After replacing 1 general variables and comparing strings: NOT ( ( '1, 1, 1, 1' = 0 ) )
Comparing 1, 1, 1, 1 to 0

out of stock debug information
####################
wpv-conditional attributes
####################
Array
(
[if] => NOT ( ( '0, 0, 0, 0' = '0' ) )
[debug] => true
)

####################
Debug information
####################
--------------------
Original expression: NOT ( ( '0, 0, 0, 0' = '0' ) )
--------------------
After replacing 1 general variables and comparing strings: NOT ( ( '0, 0, 0, 0' = 0 ) )
Comparing 0, 0, 0, 0 to 0

#2200623

Thank you for sharing these details.

I'm seeing different results on my test website, so to troubleshoot this, I'll need to see exactly how this conditional block is set up on your website.

Can you please share temporary admin login details, along with the link to the page with this conditional block?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

#2203359

I apologize for the delay in reply. Your help helped me, it may not work, because the page remained in the cache, after a while everything worked as it should. Thanks for the help.