Page 1 of 1

Hide Price

Posted: Thu Nov 17, 2011 10:12 am
by SamsSteins
If a product is hidden, is there a way to hide also price?

Re: Hide Price

Posted: Thu Nov 17, 2011 11:48 am
by david-ebt
You can add a check for the product visibility inside the Conlib\BuyProductDialog.ascx.cs code-behind file. Change the ShowAddToBasket function to:

Code: Select all

    private void ShowAddToBasket()
    {
        AddToBasketButton.Visible = true;
        rowQuantity.Visible = true;
        if (_Product.Visibility == CatalogVisibility.Hidden)
        {
           trRegPrice.Visible = false;
           trOurPrice.Visible = false;
           trVariablePrice.Visible = false;
        }
    }
You'll also need to add this reference at the top of the file:

Code: Select all

using CommerceBuilder.Catalog;
You can also turn off the AddToBasket and quantity fields here if you need to.

Re: Hide Price

Posted: Fri Nov 18, 2011 12:35 pm
by SamsSteins
Thank you!