Anyton knows how to deal with checkout url being p...
# suitecommerce
s
Anyton knows how to deal with checkout url being prepended when adding images or external url to the checkout pages?
s
Could you give more details about what it is you're trying to do and what the problem is you're facing?
s
If I upload an image for example an additional logo in the file cabinet and enter it in the template. The image link is prepended with the checkout url. Thus, breaking the redirection to home page after logging in.
s
I still don't quite understand. The checkout domain should only be prepended to the image's URL if the user is within the checkout application. This is normal. I still don't quite understand what it is you're trying to do. Are you trying to create a link to redirect a user from within the checkout application to the shopping application?
s
I hard coded the image link with the shopping domain url. I think I already know what the solution would be. I just have a question, what if I want to add a third party javascript in checkout?
s
I think you're doing something wrong as you should never need to hardcode a link to another part of the site or to a resource. What I will say is that perhaps you need to read up on link generation in https://developers.suitecommerce.com/page-navigation-and-redirection.html. As for third-party libraries: https://developers.suitecommerce.com/add-a-third-party-javascript-library-to-your-site.html.
If you're able to better describe what's going on, I can be more help. Perhaps a code sample, or just tell me the desired user journey/behaviour
s
I am trying to add a tracker that sends order data rder confirmation template. The script injects another javascript that contains third party lib. It's not able call it because of the checkout url being prepended
*order confirmation template
f
I am not get in it. Could you please send a screenshot or show us the code you are inserting
s
You said you had to hardcode some links. Perhaps you could share your 'before' code and your 'after' code?
s
here is the script I am trying to enter. <script type="text/javascript" ns-server-execute="T">(function e(){ var e=document.createElement("script"); e.type="text/javascript", e.async=true, e.src="https//staticw2.yotpo.com/https://staticw2.yotpo.com/sadasldjGKJHlkj098/widget.js?"; var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(); </script>