- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 03:36 PM
Hello,
How would I go about disable/hide the add to cart and order now buttons from my instance on condition?
I have tried the below client script, however must only be applicable for submit. Even when I look for community solutions theres not much out there...
function onSubmit() {
g_form.getReference("country_request", function(cou){
if (cou.u_status == "prohibited"){
return false;
}
});
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 11:04 PM
Hi @Andrew_TND
Greeting!
for this, you have to use DOM Manipulation.
refer the solution provided by Ankur:
please hit the Thumb Icon and mark as Correct if it helped !!
Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 11:04 PM
Hi @Andrew_TND
Greeting!
for this, you have to use DOM Manipulation.
refer the solution provided by Ankur:
please hit the Thumb Icon and mark as Correct if it helped !!
Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2023 12:21 PM
Legend! Thank you. Even managed to get it to work on change. 😁
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 11:08 PM
Hi @Andrew_TND ,
For a Particular Catalog Item:
Navigate to >Maintain items > select your catalog Item> go to Portal Settings tab
select options as per you requirement. then save and check.
However,
To hide entire cart and frames, I used the following catalog client script:
function onLoad() {
var cart = document.getElementById('order_and_cart_v2');
cart.style.display='none';
}