How to hide the “Add to cart” button in Kentico, when an item is out of the stock on the site

If you wish to hide “Add to cart” button, you can do using a transformation where you are registering the Shopping Cart Item Selector control, you can just add the following macro-based visible property to it:

******************************************************************************

Visible='<%# IfCompare(ValidationHelper.GetInteger(Eval("SKUAvailableItems"), 0), 0, true, false) %>'

******************************************************************************

- My ASP.NET Application
We use cookies to provide the best possible browsing experience to you. By continuing to use our website, you agree to our Cookie Policy