Hide Price

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
thebackup
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Fri Jun 05, 2009 1:32 pm

Hide Price

Post by thebackup » Tue Jun 09, 2009 3:23 pm

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Hide Price

Post by mazhar » Wed Jun 10, 2009 3:50 am

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;
}

thebackup
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Fri Jun 05, 2009 1:32 pm

Re: Hide Price

Post by thebackup » Wed Jun 10, 2009 11:50 am

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.

Post Reply