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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:01 AM
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.
Any help would be appreciated. Thank you.
Kind Regards,
Raphael

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 11:13 PM
How do you set the 'no_order_now' to true or false? Is it possible without using DOM manipulation? Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2019 12:58 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2019 02:09 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2019 02:13 AM
No, you can use Business Rule(before insert) that will resolve your problem faster than using Script Include.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2019 08:23 PM
If I use business rules, how can i set the 'When to run' condition to a variable on the catalog form?