Skip Navigation

[Waiting for user confirmation] displaying content based on the product stock conditionally

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 1 voice.

Last updated by Minesh 19 hours, 26 minutes ago.

Assisted by: Minesh.

Author
Posts
#2848769
Captura de pantalla 2026-02-19 a les 17.34.10.png

Hi,

I am displaying content based on the product stock. If the stock is greater than 0, a "buy" button is displayed. If the stock is 0, a "more information" button is displayed.

The page is in Catalan and translated into Spanish. It works well in Catalan. In the translation to Spanish, the conditional does not work and both buttons are displayed at the same time, because the conditional is not working well.

I am attaching an image with the conditional configuration.

How can I fix it?

#2848814

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL and admin access details and let me check what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2848852

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It seems the issue is from your condition.

You added NOT clause for the condition. If you check the screenshot you shared:
- https://toolset.com/wp-content/uploads/2026/02/2848769-Captura_de_pantalla_2026_02_19_a_les_17.34.10.png

You added the conditoin NOT greater then zero that is not a legal conditoin. What if you disable the NOT clause.

I suggest you should output the stock quantity value for both empty and not empty products and then check what you get for emtpy field. If you get empty field value for stock equal to zero then you will have to configure your conditoinal statements accordingly.

If you get zero for stock quantity then condition should be if stock quantity equal to zero - show you things.

For quantity greater then zero the condition should be if stock quantity gerater than zero then show your things.