How does one change "Order Now" button to "Submit" for a single catalog item that has no cart layout?

Kristian Johns3
Tera Expert

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.

1 ACCEPTED SOLUTION

Kristian Johns3
Tera Expert

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>

View solution in original post

13 REPLIES 13

Michael Fry1
Kilo Patron

You can add additional fields to the form so when you uncheck Use cart layout, these options will be available:

find_real_file.png

But checking "No order now" removes the button. I want to change the text label of the button.

SanjivMeher
Kilo Patron
Kilo Patron

What is the benefit you get changing the label to Order Now?


Please mark this response as correct or helpful if it assisted you with your question.

It's a bit confusing for the user. In this case, the form submits a request that kicks off a workflow that has several tasks. What is being submitted is a data center equipment installation request, which covers all aspects of installing new equipment in a data center. Order Now makes it seem as if the user is actually ordering new equipment to be delivered. This is based on feedback from the users requesting this catalog item.