To disable "Order Now" button for a particular condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 04:47 AM
Hello All , I have a requirement to disable or greyed the "Order Now" button for a particular condition in a catalog item. If the choice field is selected as "No" the order now button should be disabled for the user and if the choice field is selected as "Yes" then order now button should work as expected. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 04:53 AM
Hello @Akshat8
There is one field named No Order Now in catalog item table you need to make it true for disabling it.
If you want to do it via Condition you can create catalog client Script.
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 05:03 AM
Thanks @Samaksh Wani but it would be very helpful if you could please provide me with the client script. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 05:16 AM
Hello @Akshat8
You need to use onChange Catalog Client Script.
var choice = g_form.getValue('choice_field');
if(choice=='no'){
g_form.setValue('no_order_now','true');
}
else{
g_form.setValue('no_order_now','false');
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 04:54 AM