Hide Price

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
SamsSteins
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Jul 10, 2008 11:43 am
Location: Lancaster PA
Contact:

Hide Price

Post by SamsSteins » Thu Nov 17, 2011 10:12 am

If a product is hidden, is there a way to hide also price?

User avatar
david-ebt
Captain (CAPT)
Captain (CAPT)
Posts: 253
Joined: Fri Dec 31, 2010 10:12 am

Re: Hide Price

Post by david-ebt » Thu Nov 17, 2011 11:48 am

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.
David
http://www.ecombuildertoday.com
Enhanced Reporting for AbleCommerce
Image

SamsSteins
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Jul 10, 2008 11:43 am
Location: Lancaster PA
Contact:

Re: Hide Price

Post by SamsSteins » Fri Nov 18, 2011 12:35 pm

Thank you!

Post Reply