Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Skipping two step checkout for service catalogue requests

adam_webster
Kilo Contributor

Hi,

Is it possible to skip the two step check out for certain requests or for certain users?

Has anyone done this?

Thanks in advance!

1 ACCEPTED SOLUTION

hadyndickson
Mega Expert

Yeah I just had this need and I think I have found a way to do this.



sys_script_include.do?sys_id=8f3a2778c0a8002700fbde5ad148abe3 - CatalogTransactionCheckout



  var twoStep = gs.getProperty("glide.sc.checkout.twostep", "false");


  if(this.request.getParameter("sysparm_id") == '<your sc_cat_item.sys_id >'){


      twoStep = 'false';


  }


  if (twoStep == 'true'){


          return GlideappCatalogURLGenerator.getRedirectOneStageCheckout(catalog, catalogView);


  }


  return this._checkout(catalog, catalogView);



Oh I should mention I am on Fuji Patch 13 and Using Cart Layouts


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Adam,



The two-step checkout is a property which is global, so it cannot be turned off for a specific item. You can try using order guides.


Service Catalog Order Guides - ServiceNow Wiki


adam_webster
Kilo Contributor

thanks for the reply.



But order guide also uses the two-step check up, request will still go to the cart.


You can enable or disable the checkbox(Two step) on the order guide.


hadyndickson
Mega Expert

Yeah I just had this need and I think I have found a way to do this.



sys_script_include.do?sys_id=8f3a2778c0a8002700fbde5ad148abe3 - CatalogTransactionCheckout



  var twoStep = gs.getProperty("glide.sc.checkout.twostep", "false");


  if(this.request.getParameter("sysparm_id") == '<your sc_cat_item.sys_id >'){


      twoStep = 'false';


  }


  if (twoStep == 'true'){


          return GlideappCatalogURLGenerator.getRedirectOneStageCheckout(catalog, catalogView);


  }


  return this._checkout(catalog, catalogView);



Oh I should mention I am on Fuji Patch 13 and Using Cart Layouts