- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 09:08 AM
What's the best way to change the label for the "Order Now" button to "Submit" for a single catalog item where there is no cart layout. The old document.getElementById("oi_order_now_button").innerHTML='Submit'; catalog client on load script solution doesn't seem to work anymore, and neither do a few other document solutions. This is in Jakarta.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2018 08:31 AM
I copied the catalog_cart_default UI Macro and disabled the original, and then created a custom field called u_show_submit and created an orderLabel variable to contain the "Submit" text.
<g:evaluate var="jvar_orderLabel" object="true">
var orderLabel = "Order Now";
<j:if test="${sc_cat_item.u_show_submit == true}">
orderLabel = "submit";
</j:if>
orderLabel;
</g:evaluate>
Then wherever the label is written as "Order Now" it can be switched out with the variable:
<j:if test="${sc_cat_item.no_order_now != true}">
<g:sc_button img="images/button_cursor.gifx" classes="request_catalog_button_with_icon" id="order_now" onclick="if ($$('.order_buttons .disabled_order_button').length == 0) { orderNow(); } else { alert('${gs.getMessage('Please wait - price being updated')}'); }" label="${jvar_orderLabel}" title="Order Now" isPrimary="true"/>
</j:if>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 10:52 AM
If you are comfortable modifying the UI macro catalog_cart_default, you can add a field to catalog item called 'Show Submit'. And then add condition in the UI macro to show Submit button when 'Show Submit' is checked.
Are you using Service Catalog or Service Portal?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 10:58 AM
Service Catalog. This sounds like it has potential. I'll give it a try and report back.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 11:16 AM
I'm not sure exactly when it was added, but you might personalize your catalog client script form and see if the 'Isolate script' field is present. If it is, you can probably get your script working again just by un-checking that field. I just tested your script successfully in my London instance and it worked as long as 'Isolate script' was un-checked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2018 12:50 PM
Hmm. Maybe this is a London feature. I do not see the field present when personalizing the catalog client script form, and looking in the dictionary, I don't see any *isolate fields in the whole system (although it might be named something else).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2018 11:26 AM
Mark, The isolate script field does not exist in KP6. The above script does not work either.