Page 1 of 1

Hide Price

Posted: Tue Jun 09, 2009 3:23 pm
by thebackup
Again I am new to AC and I want to know if it is possible to completely hide the price of an item, not just hidden in red and then still click-able but completely hidden.
Thanks

Carie

Re: Hide Price

Posted: Wed Jun 10, 2009 3:50 am
by mazhar
Hmm try this, edit your ConLib/ProductPrice.ascx.cs file and then locate Page_InIt method in it. You need to add

Code: Select all

this.Visible = false;
statement at very end so that it look like something

Code: Select all


protected void Page_InIt(Object sender,EventArgs e)
{
............................................................
............................................................
............................................................
 this.Visible = false;
}

Re: Hide Price

Posted: Wed Jun 10, 2009 11:50 am
by thebackup
I tried that and it did not change anything. Also will this change all the prices or just the hidden ones?
Here is what my code looks like.

protected void Page_Init(object sender, EventArgs e)
{
LoadCustomViewState();
//if (Request["__EVENTTARGET"] == AddToCartButton.UniqueID) AddToCart();

string scrollScript = @"var _lastWin;
function initPricePopup(divid)
{
_lastWin = divid;
reposPricePopup();
window.onscroll = reposPricePopup;
}
function reposPricePopup()
{
var div = document.getElementById(_lastWin);
var st = document.body.scrollTop;
if (st == 0) {
if (window.pageYOffset) st = window.pageYOffset;
else st = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
}
div.style.top = 150 + st + ""px"";
this.Visible = false;
}";

Thanks for any help.