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

How can I hide the 'Order Now' button of catalog item via client script?

Tomi Corigliano
Kilo Sage

I already tried several things on my Catalog UI Policy:

find_real_file.png

However they all give the error message:

There is a JavaScript error in your browser console

1 ACCEPTED SOLUTION

Michael Jones -
Giga Sage

Is this in the portal, or in the backend-UI?

For the UI Policy you need to set the field "Isolate Script" to false - you can either add it to the form, or add it to the list view and change it that way. 

For the portal you need to make sure the "Run Scripts in UI Type" is set to all.

Then you can use something like this to hide the button - (replace with .show() to reveal

function onCondition() {

    if (jQuery) {
        jQuery("#oi_order_now_button").hide();
    } else {
        this.jQuery("#submit-btn").hide();
    }



}

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

10 REPLIES 10

I want this to be through the Portal there is where our users access the system.  is there a way we can do this with out modifying 800+ catalog Items under the Catalog