add custom css file in checkout

Highlighted
New Member
2 0 0

How to add a custom script in checkout through Google tag manager i have tried it but i am not getting it 
i want to add css file in checkout page
i have tried with this script 

 

if(typeof Checkout === 'object'){
if(typeof Checkout.$ === 'function'){
 
/* get the current cdn id so we know we are using the latest file */
var images = Checkout.$('img');
var cdn = '';
var uid=[];
if(images.length){
for (var i = 0; i < images.length; i++) {
var src=images[i].src;
if(src.indexOf('?') > -1){ 
var urlArray = src.split('/');
if(urlArray.length > 7){
uid = [urlArray[6],urlArray[7],urlArray[9]];
cdn = src.split('?').pop();
break;
}
}
}
}
if(uid.length === 3){
/* add your css file */
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
document.getElementsByTagName('head')[0].appendChild(css);
}
}
}
0 Likes
Highlighted
New Member
2 0 0
0 Likes
Highlighted
Shopify Partner
4869 720 1556

@JuanFernandes 

Thanks for post

Shopify basic plan doesn't allow checkout page if you need this one so please upgrade https://www.shopify.in/plus/upgrade

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes