HI All, We Want to hide the addtocart button based...
# suitecommerce
g
HI All, We Want to hide the addtocart button based on condition,it's better to write the logic in template or any extending the template by writing the prototypes ...what is the better way to write?? Any one have any idea??
d
g
I want to perform the logic when page loads
d
other way is send a variable to template with addToViewContextDefinition to show add to cart view. https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/Layout.html#addToViewContextDefinition
both solutions in mountToApp function in extension entry point
it is also recommended to do the validation on the server side
👍🏽 1