- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 06:01 AM
Hi Guys,
In Service Portal, when we order a catalog item, because of 2 step checkout, "Order Confirmation" box will also appear.
There "Request for" field is there and it is taking logged in user by default. I dont want logged-in user there and instead "None" should be there. How can i do this?
Please Can some one explain me clear.
Regards,
Vijay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 07:27 AM
Hi,
Follow these steps and you will be able to override the Request for to empty value.
1) Take a copy of Catalog Checkout Page (sc-checkout) and modify the following lines (lines 74 to 77 in a madrid OOB version) in Server script. The request for has been cleared off. Make sure the ID of new widget is catalog_checkout_2
if (data.action !== 'order_now')
data.cart = cartJS.getCartDetails(false);
else
data.cart = {name: cartName, sys_id: gs.generateGUID(), requested_for: '', requested_for_display_name: '', delivery_address: sn_sc.CartJS.getRequestedForAddress(gs.getUser().getID())};
2) Take a copy of SC Catalog Item widget and replace the following line Server script (Around lines 20-22). This has replaced the catalog item form with the new checkout widget (Note that ID has changed)
data.orderItemModal = $sp.getWidget('widget-modal', {
embeddedWidgetId: 'catalog_checkout_2',
embeddedWidgetOptions: {
cart: {name: input.cart},
action: 'order_now',
3) Open the sc_cat_item page in the designer and replace the SC Catalog Item widget with your custom copy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 06:12 AM
Remove the default value of the variable
Requested_by
or Requested_for
i.e gs.getUserID()
Mark my ANSWER as CORRECT and HELPFUL if it helepd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 06:21 AM
Hi
Thank you for the response. I understand we have to remove default gs.getUserID() for that variable.
But in Service portal where we have to make the chages. This is my cocern
Regards,
Vijay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 06:50 AM
Hi Vijay,
You have to clone Catalog Checkout Widget and make changes in server script.
Use cloned widget ID in service catalog item widget, where you can see "sc-checkout" in server script. Replace with your clone widget ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2019 07:10 AM
HI Anil,
Thak you for your reply.
Can you please tell me exactly where i have to make changes in Serer Script. By default it is taking System Administrator in Request for on Order Confirmation box as he is the logged in user. I want to display None instead of System Admiinistrator.
Regards,
Vijay