Disable or Hide "submit" button on catalog items when rendered from an order guide

ruchika2
Mega Contributor

Hi all,

I'm looking for   a way to disable or hide the "submit" button on a catalog item when the item is invoked from an order guide.

hide submit button.png

        Fig: The above snapshot was taken from a servicenow pre-existing catalog item.

I looked at "catalog_item_default" UI Macro and found that the following 3 lines are responsible for displaying the "submit" button:

<j:if test="${sc_cat_item.no_order != true}">

g_cart.attachWindow('qty', 'cart', "${gs.getMessage('Order this Item')}");

</j:if>

Can someone suggest which variable I should check in the macro to determine if the item is called from an order guide so I can disable it? I don't want to modify {sc_cat_item.no_order} in the sc_cat_item table as it would affect the stand alone catalog items as well. The alternative is to have a "variable set" that is set by the order guide and then cascade it to the catalog items and hide the button in "onLoad" script. This seems like a hack.

Thanks a lot,

-Ruchika

1 ACCEPTED SOLUTION

ruchika2
Mega Contributor

Thanks Suhas, I was able to modify "com.glideapp.servicecatalog_cat_item_guide_view" in order to remove the "submit" button.


View solution in original post

5 REPLIES 5

ramak
Giga Expert

You can check this UI page : com.glideapp.servicecatalog_cat_item_guide_view for starters. Alternatively, you can modify your preferences in 'Maintain Cart Layouts' on which buttons you need at a particular level


ruchika2
Mega Contributor

Thanks Suhas, I was able to modify "com.glideapp.servicecatalog_cat_item_guide_view" in order to remove the "submit" button.


Please mark my response as correct or helpful based on your result.


Kalaiarasan Pus
Giga Sage

I do not see the Submit button on the screenshot. Am I missing something?