How do you hide the “Add to cart” button when an item is out of the stock?

HelenaG Grulichova asked on September 25, 2012 06:24

How do you hide the “Add to cart” button when an item is out of the stock?

Correct Answer

HelenaG Grulichova answered on September 25, 2012 06:24

Should you want to hide the “Add to cart” button and you are 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) %>'

-jh-
0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.