Request redirect to a custom page - Service Portal

Bogdan18
Tera Guru

Hi guys,

I would like to have a redirect for a specific catalog item so that after Order Now is clicked the user is being taken to a custom page I created. So, instead of being taken to the  "id=sc_request&is_new_order=true&table=sc_request&sys_id....." page I would like to be able to redirect to another page.

This is working great for record producers because you can simply put producer.portal_redirect = "<URL here>"; in the Script section of the producer but for requests I think it must be done in the SC Catalog Item widget.

I cloned the widget and played around with the Client  Controller function  handleRedirect() but nothing seems to work. Any ideas why? Or if I am at least on the right track here? I know this must be a simple change in the widget but nothing I tried so far seems to do the trick.

It must be the handleRedirect() function that is taking care of the after submission part because if I comment it out the submission doesn't work anymore.

Many thanks in advance for any ideas and replies.

Thanks,

Bogdan

 

1 ACCEPTED SOLUTION

Hi Dana,

 

Yes, you are right. I didn't clone the sc_checkout widget either.

 

In the SC Catalog widget in the function handleRedirect() function I changed the following lines.

 

1. var page = table == 'ticket' ? 'copy_of_sc_request' : 'sc_request';//copy_of_sc_request is my custom page to which the submission redirects

2. $window.location.href = spUtil.format(c.options.url, {page: 'copy_of_sc_request', table:'sc_request', sys_id: sys_id}); // same here as I have 1 record producer and 1 catalog item in my portal, so I need the redirect to go to copy_of_sc_request page in both situations.

 

Hope this helps,

Bogdan

View solution in original post

12 REPLIES 12

Bhagyashree8
Kilo Guru

Hi,

Please follow below steps,

 

1) clone "sc-checkout" widget. it handles redirection on kingston version widget.

 

find_real_file.png

 

2) change above highlighted line based on your conditions

 

3) update below line to include your cloned checkout widget id.

find_real_file.png

 

Let me know if you get stuck.

 

Mark my ANSWER as CORRECT / HELPFUL if it served your purpose.

 

 

 

Bogdan18
Tera Guru

Hi Bhagyashree,

 

Thanks for the quick reply. I was able to bypass the Order Confirmation screen directly in the SC Catalog Item widget. Your solution seems to be on the right track as well.

 

Thanks again,

Bogdan

Hi Bogdan,

 

Would you mind sharing how you bypassed the checkout confirmation screen and redirected to your custom page?

 

Thanks!

Sorry for my late reply but I changed my solution and now I created a system property "glide.sc.sp.twostep" Type = true/false and set it to false. That is available from Jakarta and above I think.

 

There are different methods for the redirect depending on your version. Let me know you version and I will send you the info.

Hope the answer is not coming to late and is still useful.

Regards,

Bogdan