Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Get ready to take on exciting new challenges and become the next SuiteMaster of the Month!
Unleash the Power of AI with NetSuite's Intelligent Recommendations

Don't miss out on the opportunity to boost sales and customer satisfaction. Elevate your business with NetSuite's Intelligent Recommendations.

disabling addtocart button if "don't show price" is checked

edited Dec 2, 2019 5:47PM in SuiteCloud / Customization 4 comments

This basic variable I did, seems to work; but I need to try and get it to remove anything to do with a quantity input and add to cart link

var showprice = "<%=getCurrentAttribute('item','dontshowprice','')%>";
if (showprice.checked) {

}

when I did this before, I had it like this.


 var showprice = "<%=getCurrentAttribute('item','dontshowprice','')%>";  if (showprice.checked) {      seriesItmsHTML = seriesItmsHTML + "<td><div><div class='popDiv' id='popDiv"+curIntlID+"'>"+curTableHTML+"</div></div></td><td align='center'><input id='compare"+curIntlID+"' name='compare"+curIntlID+"' type='checkbox' value='"+curIntlID+"' onchange='compareChecked()'></td><td>" + curSp.getElementsByTagName("h3")[0].innerHTML + "</td><td>"+ crrDesc +"</td><td>"+ curSp.getElementsByTagName("div")[2].innerHTML  +"</td><td></td><td>Call for Pricing</td></tr>";       }    else {      seriesItmsHTML = seriesItmsHTML + "<td><div><div class='popDiv' id='popDiv"+curIntlID+"'>"+curTableHTML+"</div></div></td><td align='center'><input id='compare"+curIntlID+"' name='compare"+curIntlID+"' type='checkbox' value='"+curIntlID+"' onchange='compareChecked()'></td><td>" + curSp.getElementsByTagName("h3")[0].innerHTML + "</td><td>"+ crrDesc +"</td><td>"+ curSp.getElementsByTagName("div")[2].innerHTML  +"</td><td>"+"<input name='qtyQ"+curIntlID+"' id='qtyQ"+curIntlID+"' value='0' size='4' maxlength='4' class=''  onBlur="if (this.value=='') {this.value ='0';}" onFocus="if (this.value=='0') {this.value = '';}">"+"</td><td><a href='javascript:;' onclick='addItmm("+curIntlID+")' class='lstAdd'><img src='/images/nav/stretch.gif' alt='Add To Cart' border='0'></a></td></tr>";  } 
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 4 (Oct-Dec 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders