The CreatorCon Call for Content is officially open! Get started here.

To disable "Order Now" button for a particular condition

Akshat8
Tera Contributor

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.

 

MicrosoftTeams-image (1).pngMicrosoftTeams-image (2).png

15 REPLIES 15

Samaksh Wani
Giga Sage

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

Thanks @Samaksh Wani but it would be very helpful if you could please provide me with the client script. Thanks.

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

Community Alums
Not applicable