Dynamic Two Step Checkout Configuration

b3tts32
Kilo Explorer

Hi Guys, I apologize if I've posted in the wrong place. I'm still getting used to the new forums.

 

We'd like to handle two step check out at the item level, but it only looks like it's configurable at the order guide level. I realize there's a property for this but that's all or nothing. We have roughly 200 procurements items that require two step check out to gather additional information before it's submitted and we've customized the servicecatalog_cart_template ui macro to grab this additional info. We're slowly starting to grow our Service Catalog for IT services and we'd like to bypass this page completely for non procurement items.

 

Has anyone else done this? Or can you think of a clever way to get around this? We've looked around to see where the glide.sc.checkout.twostep property is getting evaluated upon submission but can't seem to find it. Also in the cart_template macro there's a jvar_item_checkout variable that we've had no luck with. Any help or pointers woul dbe greatly appreciated. Thanks!

8 REPLIES 8

Saurabh Kumar2
Mega Guru

Hi Rodney,



Did you get any solution to run the twostep checkout for specific catalogs?



Thanks,


Saurabh


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


Taken this a little futher


I have added a new true / False field on the cat item form called "No TwoStep"


Updated the above to read that and determine if 2 factor is needed or not


Daniel Draes
ServiceNow Employee
ServiceNow Employee

Would you mind putting this in share.servicenow.com ?