How do i hide the add to cart button when pricing is not being shown (e.g. to guest users until registered/logged in)
e.g. http://evidentdental.co.uk/index.php/k2 ... -72-detail
price is hidden but you can still add to cart !
new SmoothScroll();
if(document.getElements('.PricesalesPrice')) {
var el = document('.addtocart-area');
for (vari =0;i < el.length;i++) {
el[i].addClass('nodisplay');
}
}
.nodisplay {
display:none !important;
}
if(document.getElements('.PricesalesPrice')) {
var el = document('.addtocart-area');
for (var i =0;i < el.length;i++) {
el[i].addClass('nodisplay');
}
}
});
// function to set cookie
function setCookie(c_name, value, expire) {
var exdate=new Date();
exdate.setDate(exdate.getDate()+expire);
document.cookie=c_name+ "=" +escape(value) + ((expire==null) ? "" : ";expires=" + exdate.toUTCString());
}
var elm = document.getElements('.PricesalesPrice');
if(elm == null) {
var el = document.getElements('.addtocart-area');
for (var i =0;i < el.length;i++) {
el[i].addClass('nodisplay');
}
}
});
// function to set cookie
function setCookie(c_name, value, expire) {
var exdate=new Date();
exdate.setDate(exdate.getDate()+expire);
document.cookie=c_name+ "=" +escape(value) + ((expire==null) ? "" : ";expires=" + exdate.toUTCString());
}