Order Now or Submit Button

alexcharleswort
Tera Expert

I know this question has been asked a lot on here, and I have used a bunch of suggestions already, without success. I have had several complaints about the cart feature and was trying to add a "submit" button on the bottom of the form. I can make these buttons all day long, but I cannot seem to get them to link. I assume this is supposed to be a ui action?? so, from start to finish, does anyone have any great ideas on how to make this possible? Also, I have already weighed my option of going with record producer instead of service catalog, but I decided against it.

1 ACCEPTED SOLUTION

I have limited scripting knowledge as well so I could be wrong but I think ours is just a UI macro then the macro added to the catalog item form. The button was created during our original portal implementation with assistance from Fruition.



Below is the UI macro code we use...


<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<div class="orderButton">


<a class="request_catalog_button addtlBtn" onClick="orderNow();">Order Now</a>


</div>


</j:jelly>



Then we added the variable to the form...


Type: Macro


Name: order_now


Macro:   "name of UI macro above"



Button as it appears on the portal...


find_real_file.png



Our ESS users are able to click this button and submit their REQs with no issues.



Sarah


View solution in original post

16 REPLIES 16

I tried using both codes in a PoC environment and the button would show but the action would not work. Clicking on the button did nothing. This is a Fuji instance.. any suggestions?


We have been on Fuji since last May but recently started using the Shopping Cart below and the Order Now stopped working at that point for us too. The macro is visible but clicking it does nothing. We discontinued the use of the button due to the pros of the new cart.


find_real_file.png


Thank you for the follow-up...


For anyone still wondering about this, I have been attempting to implement something similar today. I found that the missing code are the input variables:



<input type="hidden" id="sysparm_id" value="${sysparm_id}" />


<input type="hidden" id="sysparm_catalog" value="${sysparm_catalog}" />


<input type="hidden" id="sysparm_catalog_view" value="${sysparm_catalog_view}" />



Add these to your macro/UI Page XML, and voila! Works like a charm. Hope this helps!


lhai
Kilo Contributor

Been experiencing the same thing. then I added this part: id = "order_now". Works fine


My button looks like this:


<button id="order_now" onclick="doSomething();" style="width: 10em;">Submit</button>