Show products but disable add to cart button

I’m trying to show products that we have or carry, but disable the ‘add to cart’ button for those not currently in stock.

Our Sheet has a simple checkbox column for stock availability, i.e true or false.

I can get Glide to show products that are in stock, but those that aren’t are simply not shown.

I can also show all products and their stock availability but cannot seem to get Glide to disable the ‘add to cart’ button.

I can hide the ‘add to cart’ button, but I can’t show it but disable it with a custom message, i.e. out of stock.

Create a second button with an action that does nothing. Then conditionally show each button based on stock availability.

2 Likes

Cheers Jeff, I will try that! Thank you very much :wink:

I used the hint text to show the status and conditionally hide the add to cart button, but would look better aesthetically if there was a disabled button.

1 Like

Quick update: your solution worked a treat! Once again Jeff, thank you, much appreciated!

3 Likes