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

How to hide 'order now' button dynamically in a catalog without using DOM Manipulation

Raphael Dizon
Mega Expert

Hello,

Does anyone have any alternatives of hiding the 'order_now' button in a catalog aside from using DOM Manipulations? I am aware that it's not best practice to use DOM Manipulation that's why I am trying to find other ways to hide the 'order now' button whenever a certain value in a field is selected. 

Here is a screenshot of my Catalog Client Script which is working but not a best practice.

find_real_file.png

Any help would be appreciated. Thank you.

Kind Regards,

Raphael

17 REPLIES 17

How do you set the 'no_order_now' to true or false? Is it possible without using DOM manipulation? Thanks

yes it is possible by just querying the sc_cat_item table and then access those fields.

 

Please mark the answer as correct if it suffice your query.

 

Thanks.

Will I make use of a script include to query the 'no_order_now' field since it's not best practice to use GlideRecord in client scripts, if so, how? Thank you.

No, you can use Business Rule(before insert) that will resolve your problem faster than using Script Include.

 

Thanks.

If I use business rules, how can i set the 'When to run' condition to a variable on the catalog form?