1<!doctype html> 2<html class="no-js" lang="en"> 3 <head> 4 5
5<script> 6 var currentPath = "/blogs/blog"; 7 var newDomain = "https://rye51.com"; 8 9 // Only specific page redirects 10 var redirectMap = { 11 "/pages/dallas-preston-center": "/pages/dallas-preston-center", 12 "/pages/houston": "/pages/houston", 13 "/pages/little-rock": "/pages/little-rock", 14 "/pages/atlanta": "/pages/atlanta", 15 "/pages/fort-worth": "/pages/fort-worth", 16 "/pages/nashville": "/pages/nashville", 17 "/pages/phoenix": "/pages/phoenix", 18 "/pages/tulsa": "/pages/tulsa", 19 "/pages/new-orleans": "/pages/new-orleans", 20 "/pages/find-a-store": "/pages/our-stores", 21 22 "/pages/dallas": "/pages/dallas", 23 "/pages/oklahoma-city": "/pages/oklahoma-city", 24 25 "/pages/schedule-consult": "/pages/schedule-consult", 26 "/collections/custom-style-guide": "/collections/custom-style-guide", 27 "/pages/gift-card-landing": "/products/rye-51-gift-card", 28 "/pages/locations": "/pages/our-stores", 29 "/pages/shipping": "/pages/shipping-returns", 30 "/pages/faq": "/pages/faqs", 31 "/pages/schedule-a-fitting-bk": "/pages/schedule-consult", 32 "/pages/schedule-a-fitting-confirmed": "/pages/schedule-consult", 33 "/pages/raj": "/", 34 "/pages/thank-you-schedule-a-fitting": "/pages/thank-you", 35 "/pages/contact-us": "/pages/contact-us", 36 "/pages/explore-our-performance-fabric-atlanta": "/pages/atlanta", 37 "/pages/explore-our-performance-fabric-in-dallas-preston-center": "/pages/dallas-preston-center", 38 "/pages/explore-our-performance-fabric-in-dallas-west-village": "/pages/dallas", 39 "/pages/explore-our-performance-fabric-in-fort-worth": "/pages/fort-worth", 40 "/pages/explore-our-performance-fabric-in-houston": "/pages/houston", 41 "/pages/explore-our-performance-fabric-in-little-rock": "/pages/little-rock", 42 "/pages/explore-our-performance-fabric-in-new-orleans": "/pages/new-orleans", 43 "/pages/explore-our-performance-fabric-in-oklahoma-city": "/pages/oklahoma-city", 44 "/pages/explore-our-performance-fabric-in-nashville": "/pages/nashville", 45 "/pages/explore-our-performance-fabric-in-phoenix": "/pages/phoenix", 46 "/pages/explore-our-performance-fabric-in-tulsa": "/pages/tulsa", 47 "/pages/careers": "/pages/careers", 48 "/pages/testimonial-page-all-reviews": "/pages/testimonial-page", 49 "/pages/custom-modern-clothing-for-men-in-atlanta": "/pages/atlanta", 50 "/pages/custom-modern-clothing-for-men-in-dallas-west-village": "/pages/dallas", 51 "/pages/custom-modern-clothing-for-men-in-fort-worth": "/pages/fort-worth", 52 "/pages/custom-modern-clothing-for-men-in-houston": "/pages/houston", 53 "/pages/custom-modern-clothing-for-men-in-little-rock": "/pages/little-rock", 54 "/pages/custom-modern-clothing-for-men-in-new-orleans": "/pages/new-orleans", 55 "/pages/custom-modern-clothing-for-men-in-oklahoma-city": "/pages/oklahoma-city", 56 "/pages/custom-modern-clothing-for-men-in-tulsa": "/pages/tulsa", 57 "/pages/custom-modern-clothing-for-men-in-nashville": "/pages/nashville", 58 "/pages/custom-modern-clothing-for-men-in-phoenix": "/pages/phoenix", 59 "/pages/modern-fashion-in-atlanta": "/pages/atlanta", 60 "/pages/modern-fashion-in-dallas": "/pages/dallas", 61 "/pages/modern-fashion-in-fort-worth": "/pages/fort-worth", 62 "/pages/modern-fashion-in-houston": "/pages/houston", 63 "/pages/modern-fashion-in-little-rock": "/pages/little-rock", 64 "/pages/modern-fashion-in-new-orleans": "/pages/new-orleans", 65 "/pages/modern-fashion-in-oklahoma-city": "/pages/oklahoma-city", 66 "/pages/modern-fashion-in-nashville": "/pages/nashville", 67 "/pages/modern-fashion-in-phoenix": "/pages/phoenix", 68 "/pages/modern-fashion-in-tulsa": "/pages/tulsa", 69 "/pages/tailor-near-me-dallas": "/pages/dallas", 70 "/pages/tailor-near-me-atlanta": "/pages/atlanta", 71 "/pages/tailor-near-me-fort-worth": "/pages/fort-worth", 72 "/pages/tailor-near-me-little-rock": "/pages/little-rock", 73 "/pages/tailor-near-me-oklahoma-city": "/pages/oklahoma-city", 74 "/pages/tailor-near-me-phoenix": "/pages/phoenix", 75 "/pages/tailor-near-me-houston": "/pages/houston", 76 "/pages/tailor-near-me-nashville": "/pages/nashville", 77 "/pages/tailor-near-me-new-orleans": "/pages/new-orleans", 78 "/pages/tailor-near-me-tulsa": "/pages/tulsa", 79 "/pages/schedule-consult-atlanta": "/pages/schedule-a-consult-atlanta", 80 "/pages/schedule-consult-dallas": "/pages/schedule-a-consult-dallas", 81 "/pages/schedule-consult-fort-worth": "/pages/schedule-a-consult-fort-worth", 82 "/pages/schedule-consult-little-rock": "/pages/schedule-a-consult-little-rock", 83 "/pages/schedule-consult-oklahoma-city": "/pages/schedule-a-consult-oklahoma-city", 84 "/pages/schedule-consult-phoenix": "/pages/schedule-a-consult-phoenix", 85 "/pages/schedule-consult-houston": "/pages/schedule-a-consult-houston", 86 "/pages/schedule-consult-nashville": "/pages/schedule-a-consult-nashville", 87 "/pages/schedule-consult-new-orleans": "/pages/schedule-a-consult-new-orleans", 88 "/pages/schedule-consult-tulsa": "/pages/schedule-a-consult-tulsa", 89 "/collections/gift-card": "/products/rye-51-gift-card", 90 "/collections/shop": "/collections/shop-all", 91 "/pages/areas-we-serve": "/pages/areas-we-serve", 92 "/pages/custom-made-shirt-atlanta": "/pages/custom-made-shirt-atlanta", 93 "/pages/custom-knits-atlanta": "/pages/custom-knits-atlanta", 94 "/pages/custom-outwear-atlanta": "/pages/custom-outerwear-atlanta", 95 "/pages/custom-suit-atlanta": "/pages/custom-suit-atlanta", 96 "/pages/custom-sports-coats-atlanta": "/pages/custom-sports-coats-atlanta", 97 "/pages/custom-trousers-atlanta": "/pages/custom-trousers-atlanta", 98 "/pages/custom-denim-atlanta": "/pages/custom-denim-atlanta", 99 "/pages/mens-custom-formal-atlanta": "/pages/mens-custom-formal-atlanta", 100 "/pages/custom-tuxedo-atlanta": "/pages/custom-tuxedo-atlanta", 101 "/pages/custom-made-shirt-dallas-preston-center": "/pages/custom-made-shirt-dallas-preston-center", 102 "/pages/custom-knits-dallas-preston": "/pages/custom-knits-dallas-preston", 103 "/pages/custom-outwear-dallas-preston-center": "/pages/custom-outerwear-dallas-preston-center", 104 "/pages/custom-suit-dallas-preston-center": "/pages/custom-suit-dallas-preston-center", 105 "/pages/custom-sports-coats-dollas-preston": "/pages/custom-sports-coats-dallas-preston", 106 "/pages/custom-trousers-dallas-preston-center":"/pages/custom-trousers-dallas-preston-center", 107 "/pages/custom-denim-dallas-preston-center": "/pages/custom-denim-dallas-preston-center", 108 "/pages/mens-custom-formal-dallas-preston-center": "/pages/mens-custom-formal-dallas-preston-center", 109 "/pages/custom-made-suit-dallas-preston-center": "/pages/custom-suit-dallas-preston-center", 110 "/pages/custom-tuxedo-dallas-preston-center": "/pages/custom-tuxedo-dallas-preston-center", 111 "/pages/custom-made-shirt-dallas-west-village": "/pages/custom-made-shirt-dallas-west-village", 112 "/pages/custom-knits-dallas-west-village": "/pages/custom-knits-dallas-west-village", 113 "/pages/custom-outwear-dallas-west-village" : "/pages/custom-outerwear-dallas-west-village", 114 "/pages/custom-suit-dallas-west-village" : "/pages/custom-suit-dallas-west-village", 115 "/pages/custom-sports-coats-dollas-west-village" : "/pages/custom-sports-coats-dallas-west-village", 116 "/pages/custom-trousers-dallas-west-village": "/pages/custom-trousers-dallas-west-village", 117 "/pages/custom-denim-dallas-west-village": "/pages/custom-denim-dallas-west-village", 118 "/pages/mens-custom-formal-dallas-west-village": "/pages/mens-custom-formal-dallas-west-village", 119 "/pages/custom-tuxedo-dallas-west-village": "/pages/custom-tuxedo-dallas-west-village", 120 "/pages/custom-made-shirt-fort-worth": "/pages/custom-made-shirt-fort-worth", 121 "/pages/custom-knits-fort-worth": "/pages/custom-knits-fort-worth", 122 "/pages/custom-outwear-fort-worth": "/pages/custom-outerwear-fort-worth", 123 "/pages/custom-suit-fort-worth": "/pages/custom-suit-fort-worth", 124 "/pages/custom-sports-coats-fort-worth": "/pages/custom-sports-coats-fort-worth", 125 "/pages/custom-trousers-fort-worth": "/pages/custom-trousers-fort-worth", 126 "/pages/custom-tuxedo-fort-worth": "/pages/custom-tuxedo-fort-worth", 127 "/pages/custom-denim-fort-worth": "/pages/custom-denim-fort-worth", 128 "/pages/mens-custom-formal-fort-worth": "/pages/mens-custom-formal-fort-worth", 129 "/pages/custom-made-shirt-houston": "/pages/custom-made-shirt-houston", 130 "/pages/custom-knits-houston": "/pages/custom-knits-houston", 131 "/pages/custom-outwear-houston": "/pages/custom-outerwear-houston", 132 "/pages/custom-suit-houston": "/pages/custom-suit-houston", 133 "/pages/custom-sports-coats-houston":"/pages/custom-sports-coats-houston", 134 "/pages/custom-trousers-houston": "/pages/custom-trousers-houston", 135 "/pages/custom-tuxedo-houston":"/pages/custom-tuxedo-houston", 136 "/pages/custom-denim-houston":"/pages/custom-denim-houston", 137 "/pages/mens-custom-formal-houston": "/pages/mens-custom-formal-houston", 138 "/pages/custom-made-shirt-little-rock":"/pages/custom-made-shirt-little-rock", 139 "/pages/custom-knits-little-rock": "/pages/custom-knits-little-rock", 140 "/pages/custom-outwear-little-rock": "/pages/custom-outerwear-little-rock", 141 "/pages/custom-suit-little-rock": "/pages/custom-suit-little-rock", 142 "/pages/custom-sports-coats-little-rock": "/pages/custom-sports-coats-little-rock",
143 "/pages/custom-trousers-little-rock": "/pages/custom-trousers-little-rock", 144 "/pages/custom-tuxedo-little-rock": "/pages/custom-tuxedo-little-rock", 145 "/pages/custom-denim-little-rock":"/pages/custom-denim-little-rock", 146 "/pages/mens-custom-formal-little-rock": "/pages/mens-custom-formal-little-rock", 147 "/pages/custom-made-shirt-new-orleans": "/pages/custom-made-shirt-new-orleans", 148 "/pages/custom-knits-new-orleans":"/pages/custom-knits-new-orleans", 149 "/pages/custom-outwear-new-orleans": "/pages/custom-outerwear-new-orleans", 150 "/pages/custom-suit-new-orleans": "/pages/custom-suit-new-orleans", 151 "/pages/custom-sports-coats-new-orleans":"/pages/custom-suit-new-orleans", 152 "/pages/custom-trousers-new-orleans": "/pages/custom-trousers-new-orleans", 153 "/pages/custom-tuxedo-new-orleans": "/pages/custom-tuxedo-new-orleans", 154 "/pages/custom-denim-new-orleans": "/pages/custom-denim-new-orleans", 155 "/pages/mens-custom-formal-new-orleans": "/pages/mens-custom-formal-new-orleans", 156 "/pages/custom-made-shirt-oklahoma-city":"/pages/custom-made-shirt-oklahoma-city", 157 "/pages/custom-knits-oklahoma-city": "/pages/custom-knits-oklahoma-city", 158 "/pages/custom-outwear-oklahoma-city": "/pages/custom-outerwear-oklahoma-city", 159 "/pages/custom-suit-oklahoma-city": "/pages/custom-suit-oklahoma-city", 160 "/pages/custom-sports-coats-oklahoma-city": "/pages/custom-sports-coats-oklahoma-city", 161 "/pages/custom-trousers-oklahoma-city": "/pages/custom-trousers-oklahoma-city", 162 "/pages/custom-tuxedo-oklahoma-city": "/pages/custom-tuxedo-oklahoma-city", 163 "/pages/custom-denim-oklahoma-city": "/pages/custom-denim-oklahoma-city", 164 "/pages/mens-custom-formal-oklahoma-city": "/pages/mens-custom-formal-oklahoma-city", 165 "/pages/custom-made-shirt-tulsa": "/pages/custom-made-shirt-tulsa", 166 "/pages/custom-knits-tulsa": "/pages/custom-knits-tulsa", 167 "/pages/custom-outwear-tulsa": "/pages/custom-outerwear-tulsa", 168 "/pages/custom-suit-tulsa": "/pages/custom-suit-tulsa", 169 "/pages/custom-sports-coats-tulsa": "/pages/custom-sports-coats-tulsa", 170 "/pages/custom-trousers": "/pages/custom-trousers-tulsa", 171 "/pages/custom-tuxedo-tulsa": "/pages/custom-tuxedo-tulsa", 172 "/pages/custom-denim-tulsa": "/pages/custom-denim-tulsa", 173 "/pages/mens-custom-formal-tulsa": "/pages/mens-custom-formal-tulsa", 174 "/pages/custom-made-shirt-nashville": "/pages/custom-made-shirt-nashville", 175 "/pages/custom-knits-nashville": "/pages/custom-knits-nashville", 176 "/pages/custom-outwear-nashville": "/pages/custom-outerwear-nashville", 177 "/pages/custom-suit-nashville": "/pages/custom-suit-nashville", 178 "/pages/custom-sports-coats-nashville": "/pages/custom-sports-coats-nashville", 179 "/pages/custom-trousers-nashville":"/pages/custom-trousers-nashville", 180 "/pages/custom-tuxedo-nashville": "/pages/custom-tuxedo-nashville", 181 "/pages/custom-denim-nashville": "/pages/custom-denim-nashville", 182 "/pages/mens-custom-formal-nashville": "/pages/mens-custom-formal-nashville", 183 "/pages/custom-made-shirt-phoenix": "/pages/custom-made-shirt-phoenix", 184 "/pages/custom-knits-phoenix" : "/pages/custom-knits-phoenix", 185 "/pages/custom-outerwear-phoenix" : "/pages/custom-outerwear-phoenix", 186 "/pages/custom-suit-phoenix": "/pages/custom-suit-phoenix", 187 "/pages/custom-sports-coats-phoenix": "/pages/custom-sports-coats-phoenix", 188 "/pages/custom-trousers-phoenix" : "/pages/custom-trousers-phoenix", 189 "/pages/custom-tuxedo-phoenix" : "/pages/custom-tuxedo-phoenix", 190 "/pages/custom-denim-phoenix" : "/pages/custom-denim-phoenix", 191 "/pages/mens-custom-formal-phoenix": "/pages/mens-custom-formal-phoenix", 192 }; 193 194 // Redirect ONLY if the current page exists in the map 195 if (redirectMap[currentPath]) { 196 window.location.href = newDomain + redirectMap[currentPath]; 197 } 198</script>
198 199 200 201 202 203 204 205 206 207 <meta name="robots" content="index, follow"> 208 209 210 <!-- Google Tag Manager --> 211
211<script>
vendor: 455 bytes, lines 211-221
211 212 (function (w, d, s, l, i) { 213 w[l] = w[l] || []; 214 w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); 215 var f = d.getElementsByTagName(s)[0], 216 j = d.createElement(s), 217 dl = l != 'dataLayer' ? '&l=' + l : ''; 218 j.async = true; 219 j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 220 f.parentNode.insertBefore(j, f); 221 })(window, document, 'script', 'dataLayer', '
221GTM-TNW7KWH6
vendor: 8 bytes, lines 221-222
221'); 222
222</script>
222 223 <!-- End Google Tag Manager --> 224 225 <!-- Google Tag Manager --> 226
226<script>
vendor: 455 bytes, lines 226-236
226 227 (function (w, d, s, l, i) { 228 w[l] = w[l] || []; 229 w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); 230 var f = d.getElementsByTagName(s)[0], 231 j = d.createElement(s), 232 dl = l != 'dataLayer' ? '&l=' + l : ''; 233 j.async = true; 234 j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 235 f.parentNode.insertBefore(j, f); 236 })(window, document, 'script', 'dataLayer', '
236GTM-K4NF253
vendor: 8 bytes, lines 236-237
236'); 237
237</script>
237 238 <!-- End Google Tag Manager --> 239 240 <meta name="google-site-verification" content="_nD5DnPM-NkbaDnhu44GMyPOfcaVpZQlQuG8wo_DICk"> 241 242 <!-- Google tag (gtag.js) -->
vendor: 68 bytes, lines 242-243
242 243 <script async src="https://www.googletagmanager.com/gtag/js?id=
243G-KNQRC75WT1
vendor: 16 bytes, lines 243-244
243"></script> 244
244<script> 245
vendor: 163 bytes, lines 245-251
245window.dataLayer = window.dataLayer || []; 246 function gtag() { 247 dataLayer.push(arguments); 248 } 249 gtag('js', new Date()); 250 251 gtag('config', '
251G-KNQRC75WT1
vendor: 8 bytes, lines 251-252
251'); 252
252</script>
252 253 254
254<script 255 type="text/javascript" 256 async="" 257 src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=TdBdGm" 258 ></script>
258 259
259<script type="text/javascript"> 260 //Initialize the Klaviyo object on page load 261 !(function () { 262 if (!window.klaviyo) { 263 window._klOnsite = window._klOnsite || []; 264 try { 265 window.klaviyo = new Proxy( 266 {}, 267 { 268 get: function (n, i) { 269 return 'push' === i 270 ? function () { 271 var n; 272 (n = window._klOnsite).push.apply(n, arguments); 273 } 274 : function () { 275 for (var n = arguments.length, o = new Array(n), w = 0; w < n; w++) o[w] = arguments[w]; 276 var t = 'function' == typeof o[o.length - 1] ? o.pop() : void 0, 277 e = new Promise(function (n) { 278 window._klOnsite.push( 279 [i].concat(o, [ 280 function (i) { 281 t && t(i), n(i); 282 }, 283 ]) 284 ); 285 }); 286 return e; 287 }; 288 }, 289 } 290 ); 291 } catch (n) { 292 (window.klaviyo = window.klaviyo || []), 293 (window.klaviyo.push = function () { 294 var n; 295 (n = window._klOnsite).push.apply(n, arguments); 296 }); 297 } 298 } 299 })(); 300 </script>
300 301
301<script type="text/javascript"> 302 //Customer accounts 303 var klaviyo = window.klaviyo || []; 304 if ('') { 305 klaviyo.identify({ $email: '' }); 306 } 307 </script>
307 308 309 <!-- Showcase 5.0.3 --> 310 <link rel="preload" href="//qclothier.com/cdn/shop/t/73/assets/styles.css?v=131514343842369501731759332507" as="style"> 311
311<script> 312 (function (w, d, t, r, u) { 313 var f, n, i; 314 (w[u] = w[u] || []), 315 (f = function () { 316 var o = { ti: '148001618' }; 317 (o.q = w[u]), (w[u] = new UET(o)), w[u].push('pageLoad'); 318 }), 319 (n = d.createElement(t)), 320 (n.src = r), 321 (n.async = 1), 322 (n.onload = n.onreadystatechange = 323 function () { 324 var s = this.readyState; 325 (s && s !== 'loaded' && s !== 'complete') || (f(), (n.onload = n.onreadystatechange = null)); 326 }), 327 (i = d.getElementsByTagName(t)[0]), 328 i.parentNode.insertBefore(n, i); 329 })(window, document, 'script', '//bat.bing.com/bat.js', 'uetq'); 330 </script>
330 331 <meta charset="utf-8" /> 332<meta name="viewport" content="width=device-width,initial-scale=1.0" /> 333<meta http-equiv="X-UA-Compatible" content="IE=edge"> 334 335<link rel="preconnect" href="https://cdn.shopify.com" crossorigin> 336<link rel="preconnect" href="https://fonts.shopify.com" crossorigin> 337<link rel="preconnect" href="https://monorail-edge.shopifysvc.com"><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_n4.0276fe080df0ca4e6a22d9cb55aed3ed5ba6b1da.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_n7.25d963ed46da26098ebeab731e90d8802d989fa5.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_i4.6e408730afac1484cf297c30b0e67c86d17fc586.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_i7.8c1124729eec046a321e2424b2acf328c2c12139.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_n4.0276fe080df0ca4e6a22d9cb55aed3ed5ba6b1da.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/poppins/poppins_n6.aa29d4918bc243723d56b59572e18228ed0786f6.woff2" type="font/woff2" crossorigin><link rel="preload" href="//qclothier.com/cdn/shop/t/73/assets/vendor.js?v=70213052416818374661723504063" as="script"> 338<link rel="preload" href="//qclothier.com/cdn/shop/t/73/assets/theme.js?v=72203830573049377301723504063" as="script"><link rel="canonical" href="https://qclothier.com/blogs/blog" /><link rel="shortcut icon" href="//qclothier.com/cdn/shop/files/Q_favicon.png?v=1639413147" type="image/png" /><meta name="description" content="Stay ahead of fashion trends with Q Clothier's blog. Discover insights, tips, and the latest in the men's fashion world. Read more today."> 339<link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_n5.6fc0ed1feb3fc393c40619f180fc49c4d0aae0db.woff2" type="font/woff2" crossorigin><link rel="preload" as="font" href="//qclothier.com/cdn/fonts/nunito_sans/nunitosans_n6.6e9464eba570101a53130c8130a9e17a8eb55c21.woff2" type="font/woff2" crossorigin><meta name="theme-color" content="#000000"> 340 341 <title> 342 Q Clothier Blog: Insights into Modern Fashion 343 344 345 346 </title> 347 348 <meta property="og:site_name" content="Q Clothier"> 349<meta property="og:url" content="https://qclothier.com/blogs/blog"> 350<meta property="og:title" content="Q Clothier Blog: Insights into Modern Fashion"> 351<meta property="og:type" content="website"> 352<meta property="og:description" content="Stay ahead of fashion trends with Q Clothier's blog. Discover insights, tips, and the latest in the men's fashion world. Read more today."><meta property="og:image" content="http://qclothier.com/cdn/shop/files/Q_Clothier_Logo_036dcf08-2ab9-4e59-bfaf-074d9138113c_1200x1200.jpg?v=1611267767"> 353 <meta property="og:image:secure_url" content="https://qclothier.com/cdn/shop/files/Q_Clothier_Logo_036dcf08-2ab9-4e59-bfaf-074d9138113c_1200x1200.jpg?v=1611267767"> 354 <meta property="og:image:width" content="473"> 355 <meta property="og:image:height" content="469"><meta name="twitter:site" content="@q_clothier?lang=en"><meta name="twitter:card" content="summary_large_image"> 356<meta name="twitter:title" content="Q Clothier Blog: Insights into Modern Fashion"> 357<meta name="twitter:description" content="Stay ahead of fashion trends with Q Clothier's blog. Discover insights, tips, and the latest in the men's fashion world. Read more today."> 358 359 360 <link href="//qclothier.com/cdn/shop/t/73/assets/slick-theme.css?v=35105753187448211861723504063" rel="stylesheet" type="text/css" media="all" /> 361 <link href="//qclothier.com/cdn/shop/t/73/assets/slick.css?v=19461280410653354511723504063" rel="stylesheet" type="text/css" media="all" /> 362 <link href="//qclothier.com/cdn/shop/t/73/assets/styles.css?v=131514343842369501731759332507" rel="stylesheet" type="text/css" media="all" /> 363 364
364<script>window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.start');</script>
364<meta name="google-site-verification" content="sS1zpBxGvUUiDIdrLU-3jYM7grSPZR96rDaH-FHmc5M"> 365<meta id="shopify-digital-wallet" name="shopify-digital-wallet" content="/17660155/digital_wallets/dialog"> 366<link rel="ucp" href="/.well-known/ucp" version="2026-08-25"><link rel="alternate" type="application/atom+xml" title="Feed" href="/blogs/blog.atom" /> 367<link rel="next" href="/blogs/blog?page=2">
368<script async="async" src="/checkouts/internal/preloads.js?locale=en-US"></script>
368 369<link rel="preconnect" href="https://shop.app" crossorigin="anonymous">
370<script async="async" src="https://shop.app/checkouts/internal/preloads.js?locale=en-US&shop_id=17660155" crossorigin="anonymous"></script>
vendor: 1 bytes, line 370
370
371<script id="apple-pay-shop-capabilities" type="application/json">{"shopId":17660155,"countryCode":"US","currencyCode":"USD","merchantCapabilities":["supports3DS"],"merchantId":"gid:\/\/shopify\/Shop\/17660155","merchantName":"Q Clothier","requiredBillingContactFields":["postalAddress","email","phone"],"requiredShippingContactFields":["postalAddress","email","phone"],"shippingType":"shipping","supportedNetworks":["visa","masterCard","amex","discover","elo","jcb"],"total":{"type":"pending","label":"Q Clothier","amount":"1.00"},"shopifyPaymentsEnabled":true,"supportsSubscriptions":true}</script>
vendor: 1 bytes, line 371
371
372<script id="shopify-features" type="application/json">{"accessToken":"e0c55e22fa33f290ac0b636abb5c3523","betas":["rich-media-storefront-analytics"],"domain":"qclothier.com","predictiveSearch":true,"shopId":17660155,"locale":"en"}</script>
vendor: 1 bytes, line 372
372
373<script>var Shopify = Shopify || {}; 374Shopify.shop = "qfiftyone.myshopify.com"; 375Shopify.locale = "en"; 376Shopify.currency = {"active":"USD","rate":"1.0"}; 377Shopify.country = "US"; 378Shopify.theme = {"name":"JP Edits - Showcase :: Offer bubble","id":126849450047,"schema_name":"Showcase","schema_version":"5.0.3","theme_store_id":677,"role":"main"}; 379Shopify.theme.handle = "null"; 380Shopify.theme.style = {"id":null,"handle":null}; 381Shopify.cdnHost = "qclothier.com/cdn"; 382Shopify.routes = Shopify.routes || {}; 383Shopify.routes.root = "/"; 384Shopify.shopJsCdnBaseUrl = "https://cdn.shopify.com/shopifycloud/shop-js"; 385Shopify.SignInWithShop = Shopify.SignInWithShop || {}; 386Shopify.SignInWithShop.User = Shopify.SignInWithShop.User || {}; 387Shopify.SignInWithShop.User.recognized = false;</script>
vendor: 1 bytes, line 387
387
388<script type="module">!function(o){(o.Shopify=o.Shopify||{}).modules=!0}(window);</script>
vendor: 1 bytes, line 388
388
389<script>!function(o){function n(){var o=[];function n(){o.push(Array.prototype.slice.apply(arguments))}return n.q=o,n}var t=o.Shopify=o.Shopify||{};t.loadFeatures=n(),t.autoloadFeatures=n()}(window);</script>
vendor: 1 bytes, line 389
389
390<script> 391 window.ShopifyPay = window.ShopifyPay || {}; 392 window.ShopifyPay.apiHost = "shop.app\/pay"; 393 window.ShopifyPay.redirectState = null; 394</script>
vendor: 1 bytes, line 394
394
395<script> 396 window.Shopify = window.Shopify || {}; 397 window.Shopify.SignInWithShop = window.Shopify.SignInWithShop || {}; 398 window.Shopify.SignInWithShop.assetMetrics = { sampleRate: 0.25 }; 399 window.Shopify.SignInWithShop.eligible = true; 400</script>
vendor: 1 bytes, line 400
400
401<script id="shop-js-analytics" type="application/json">{"pageType":"blog"}</script>
vendor: 1 bytes, line 401
401
402<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"></script>
vendor: 1 bytes, line 402
402
403<script type="module"> 404 await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"); 405 406 window.Shopify.SignInWithShop?.initShopCartSync?.({"fedCMEnabled":true,"windoidEnabled":true}); 407 408</script>
vendor: 1 bytes, line 408
408
409<script> 410 window.Shopify = window.Shopify || {}; 411 if (!window.Shopify.featureAssets) window.Shopify.featureAssets = {}; 412 window.Shopify.featureAssets['shop-js'] = {"avatar":["modules/v2/loader.avatar.en.esm.js"],"checkout-modal":["modules/v2/loader.checkout-modal.en.esm.js"],"init-customer-accounts-sign-up":["modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"],"init-customer-accounts":["modules/v2/loader.init-customer-accounts.en.esm.js"],"init-fed-cm":["modules/v2/loader.init-fed-cm.en.esm.js"],"init-shop-cart-sync":["modules/v2/loader.init-shop-cart-sync.en.esm.js"],"init-shop-email-lookup-coordinator":["modules/v2/loader.init-shop-email-lookup-coordinator.en.esm.js"],"init-shop-for-new-customer-accounts":["modules/v2/loader.init-shop-for-new-customer-accounts.en.esm.js"],"init-shop-user-recognition":["modules/v2/loader.init-shop-user-recognition.en.esm.js"],"init-windoid":["modules/v2/loader.init-windoid.en.esm.js"],"lead-capture":["modules/v2/loader.lead-capture.en.esm.js"],"listener":["modules/v2/loader.listener.en.esm.js"],"pay-button":["modules/v2/loader.pay-button.en.esm.js"],"payment-terms":["modules/v2/loader.payment-terms.en.esm.js"],"shop-button":["modules/v2/loader.shop-button.en.esm.js"],"shop-cart-sync":["modules/v2/loader.shop-cart-sync.en.esm.js"],"shop-cash-offers":["modules/v2/loader.shop-cash-offers.en.esm.js"],"shop-follow-button":["modules/v2/loader.shop-follow-button.en.esm.js"],"shop-login-button":["modules/v2/loader.shop-login-button.en.esm.js"],"shop-login":["modules/v2/loader.shop-login.en.esm.js"],"shop-toast-manager":["modules/v2/loader.shop-toast-manager.en.esm.js"],"shop-user-recognition":["modules/v2/loader.shop-user-recognition.en.esm.js"]}; 413</script>
vendor: 1 bytes, line 413
413
414<script>(function() { 415 var isLoaded = false; 416 function asyncLoad() { 417 if (isLoaded) return; 418 isLoaded = true; 419 var urls = ["https:\/\/www.improvedcontactform.com\/icf.js?shop=qfiftyone.myshopify.com","\/\/www.powr.io\/powr.js?powr-token=qfiftyone.myshopify.com\u0026external-type=shopify\u0026shop=qfiftyone.myshopify.com","https:\/\/app3.shopifyexpertz.com\/qclothier\/scripts\/appqcloth.js?shop=qfiftyone.myshopify.com","\/\/shopify.privy.com\/widget.js?shop=qfiftyone.myshopify.com","\/\/cdn.shopify.com\/proxy\/9a4aa7dc43ef69c7450ce7e5d2e400706a04c371afc6820c84e818c25f1948f2\/dev.giftkart.app\/scripts.js?shop=qfiftyone.myshopify.com\u0026sp-cache-control=cHVibGljLCBtYXgtYWdlPTkwMA","https:\/\/quizify.arhamcommerce.com\/js\/shortcode.js?shop=qfiftyone.myshopify.com"]; 420 for (var i = 0; i < urls.length; i++) { 421 var s = document.createElement('script'); 422 s.type = 'text/javascript'; 423 s.async = true; 424 s.src = urls[i]; 425 var x = document.getElementsByTagName('script')[0]; 426 x.parentNode.insertBefore(s, x); 427 } 428 }; 429 if(window.attachEvent) { 430 window.attachEvent('onload', asyncLoad); 431 } else { 432 window.addEventListener('load', asyncLoad, false); 433 } 434})();</script>
vendor: 1 bytes, line 434
434
435<script id="__st">var __st={"a":17660155,"offset":-18000,"reqid":"5daee45e-70fd-4dc0-927c-a0438fc31499-1791225701","pageurl":"qclothier.com\/blogs\/blog","s":"blogs-94078791","u":"62081c946e0c","p":"blog","rtyp":"blog","rid":94078791};</script>
vendor: 1 bytes, line 435
435
436<script>window.ShopifyPaypalV4VisibilityTracking = true;</script>
vendor: 1 bytes, line 436
436
437<script id="captcha-bootstrap">!function(){'use strict';const t='contact',e='account',n='new_comment',o=[[t,t],['blogs',n],['comments',n],[t,'customer']],c=[[e,'customer_login'],[e,'guest_login'],[e,'recover_customer_password'],[e,'create_customer']],r=t=>t.map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(','),a=t=>()=>t?[...document.querySelectorAll(t)].map((t=>t.form)):[];function s(){const t=[...o],e=r(t);return a(e)}const i='password',u='form_key',d=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',i],f=()=>{try{return window.sessionStorage}catch{return}},m='__shopify_v',_=t=>t.elements[u];function p(t,e,n=!1){try{const o=window.sessionStorage,c=JSON.parse(o.getItem(e)),{data:r}=function(t){const{data:e,action:n}=t;return t[m]||n?{data:e,action:n}:{data:t,action:n}}(c);for(const[e,n]of Object.entries(r))t.elements[e]&&(t.elements[e].value=n);n&&o.removeItem(e)}catch(o){console.error('form repopulation failed',{error:o})}}const l='form_type',E='cptcha';function T(t){t.dataset[E]=!0}const w=window,h=w.document,L='Shopify',v='ce_forms',y='captcha';let A=!1;((t,e)=>{const n=(g='f06e6c50-85a8-45c8-87d0-21a2b65856fe',I='https://cdn.shopify.com/shopifycloud/storefront-forms-hcaptcha/ce_storefront_forms_captcha_hcaptcha.v1.5.3.iife.js',D={infoText:'Protected by hCaptcha',privacyText:'Privacy',termsText:'Terms'},(t,e,n)=>{const o=w[L][v],c=o.bindForm;if(c)return c(t,g,e,D).then(n);var r;o.q.push([[t,g,e,D],n]),r=I,A||(h.body.append(Object.assign(h.createElement('script'),{id:'captcha-provider',async:!0,src:r})),A=!0)});var g,I,D;w[L]=w[L]||{},w[L][v]=w[L][v]||{},w[L][v].q=[],w[L][y]=w[L][y]||{},w[L][y].protect=function(t,e){n(t,void 0,e),T(t)},Object.freeze(w[L][y]),function(t,e,n,w,h,L){const[v,y,A,g]=function(t,e,n){const i=e?o:[],u=t?c:[],d=[...i,...u],f=r(d),m=r(i),_=r(d.filter((([t,e])=>n.includes(e))));return[a(f),a(m),a(_),s()]}(w,h,L),I=t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form},D=t=>v().includes(t);t.addEventListener('submit',(t=>{const e=I(t);if(!e)return;const n=D(e)&&!e.dataset.hcaptchaBound&&!e.dataset.recaptchaBound,o=_(e),c=g().includes(e)&&(!o||!o.value);(n||c)&&t.preventDefault(),c&&!n&&(function(t){try{if(!f())return;!function(t){const e=f();if(!e)return;const n=_(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){_(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:u})),t.elements[u].value=e}(t,e),function(t,e){const n=f();if(!n)return;const o=[...t.querySelectorAll(`input[type='${i}']`)].map((({name:t})=>t)),c=[...d,...o],r={};for(const[a,s]of new FormData(t).entries())c.includes(a)||(r[a]=s);n.setItem(e,JSON.stringify({[m]:1,action:t.action,data:r}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(e),e.submit())}));const S=(t,e)=>{t&&!t.dataset[E]&&(n(t,e.some((e=>e===t))),T(t))};for(const o of['focusin','change'])t.addEventListener(o,(t=>{const e=I(t);D(e)&&S(e,y())}));const B=e.get('form_key'),M=e.get(l),P=B&&M;t.addEventListener('DOMContentLoaded',(()=>{const t=y();if(P)for(const e of t)e.elements[l].value===M&&p(e,B);[...new Set([...A(),...v().filter((t=>'true'===t.dataset.shopifyCaptcha))])].forEach((e=>S(e,t)))}))}(h,new URLSearchParams(w.location.search),n,t,e,['guest_login'])})(!0,!0)}();</script>
vendor: 1 bytes, line 437
437
438<script integrity="sha256-JjoPp5ZfB1sSAs5SQaol1x1GgvveM+BgmRzyDexInEQ=" data-source-attribution="shopify.loadfeatures" defer="defer" src="//qclothier.com/cdn/shopifycloud/storefront/assets/storefront/load_feature-1bd60354.js" crossorigin="anonymous"></script>
vendor: 1 bytes, line 438
438
439<script>(function () {var userAgent = navigator.userAgent;var platform = navigator.platform;var maxTouchPoints = navigator.maxTouchPoints || 0;var isIOS = /iPad|iPhone|iPod/.test(platform) || (platform === 'MacIntel' && maxTouchPoints > 1);var isMacSafari = platform.indexOf('Mac') === 0 && /Safari/.test(userAgent) && !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/.test(userAgent);var isAppleSafari = isIOS || isMacSafari;if (isAppleSafari) {fetch('/sf_private_access_tokens' + location.search).catch(function () {});}function browserMajorVersion(pattern) {var match = userAgent.match(pattern);return match ? parseInt(match[1], 10) : null;}function shouldLoadAutosizesPolyfill() {if (!window.PerformanceObserver?.supportedEntryTypes?.includes('paint')) {return false;}var chromeVersion = browserMajorVersion(/Chrome\/(\d+)/);if (chromeVersion !== null) {return chromeVersion < 126;}var firefoxVersion = browserMajorVersion(/Firefox\/(\d+)/);if (firefoxVersion !== null) {return firefoxVersion < 150;}var safariVersion = isAppleSafari ? browserMajorVersion(/Version\/(\d+).*Safari\//) : null;if (safariVersion !== null) {return safariVersion < 27;}return true;}if (shouldLoadAutosizesPolyfill()) {var autosizesScript = document.createElement('script');autosizesScript.async = true;autosizesScript.crossOrigin = 'anonymous';autosizesScript.src = "//qclothier.com/cdn/shopifycloud/storefront/assets/storefront/autosizes-84416378.js";(document.head || document.documentElement).appendChild(autosizesScript);}window.ShopifyAnalytics = window.ShopifyAnalytics || {};window.ShopifyAnalytics.performance = window.ShopifyAnalytics.performance || {};(function () {var LONG_FRAME_THRESHOLD = 50;var longAnimationFrames = [];var activeRafId = null;function collectLongFrames() {var previousTime = null;function rafMonitor(now) {if (activeRafId === null) {return;}var delta = now - previousTime;if (delta > LONG_FRAME_THRESHOLD) {longAnimationFrames.push({startTime: previousTime,endTime: now,});}previousTime = now;activeRafId = requestAnimationFrame(rafMonitor);}previousTime = performance.now();activeRafId = requestAnimationFrame(rafMonitor);}if (!window.PerformanceObserver?.supportedEntryTypes?.includes('long-animation-frame')) {collectLongFrames();var timeoutId = setTimeout(function () {cancelAnimationFrame(activeRafId);}, 10000);window.ShopifyAnalytics.performance.getLongAnimationFrames = function (stopCollection) {if (stopCollection === undefined) {stopCollection = false;}if (stopCollection) {clearTimeout(timeoutId);cancelAnimationFrame(activeRafId);}return longAnimationFrames;};}})();})();</script>
439<script crossorigin="anonymous" defer="defer" src="//qclothier.com/cdn/shopifycloud/storefront/assets/shopify_pay/storefront-616277c7.js?v=20250812"></script>
vendor: 1 bytes, line 439
439
440<script id="shopify-origin-trials" async="async" integrity="sha256-qJbe/jEZBHtr5W/BlA2cKAz3vkXu6vJQyLjgvgCC86g=" src="//cdn.shopify.com/shopifycloud/storefront/assets/storefront/origin_trials-318ab40a.js" crossorigin="anonymous" onload="window.__shopifyOriginTrialsDone = true" onerror="window.__shopifyOriginTrialsDone = true"></script>
vendor: 1 bytes, line 440
440
441<script> 442 window.Shopify = window.Shopify || {}; 443 window.Shopify.MCP = window.Shopify.MCP || {}; 444 window.Shopify.MCP.enabled = true; 445 window.Shopify.MCP.shop = "qfiftyone.myshopify.com"; 446 window.Shopify.MCP.mcpEndpoint = "https:\/\/qclothier.com\/api\/mcp"; 447 window.Shopify.MCP.tools = [{"name":"search_shop_policies_and_faqs","description":"Used to get facts about the stores policies, products, or services.\nSome examples of questions you can ask are:\n - What is your return policy?\n - What is your shipping policy?\n - What is your phone number?\n - What are your hours of operation?\"\n","inputSchema":{"$schema":"https:\/\/json-schema.org\/draft\/2020-12\/schema","type":"object","properties":{"query":{"type":"string","description":"A natural language query."},"context":{"type":"string","description":"Additional information about the request such as user demographics, mood, location, or other relevant details that could help in tailoring the response appropriately."}},"required":["query"]}}]; 448</script>
vendor: 1 bytes, line 448
448
449<script>(()=>{var d="shopify:webmcp_adapter_loaded",n=Symbol.for("shopify.webmcp_adapter_loading");function s(c,a,{win:r=window,doc:o=document}={}){function p(){try{return r.localStorage.getItem(d)==="true"}catch{return!1}}function l(){try{r.localStorage.setItem(d,"true")}catch{}}function u(){return typeof(o.modelContext||r.navigator?.modelContext)?.registerTool=="function"}function f(){if(r[n]||!u())return;let t=o.head||o.getElementsByTagName("head")[0];if(!t)return;let e=o.createElement("script");e.type="module",e.crossOrigin="anonymous",a&&(e.integrity=a),e.src=c,e.addEventListener("load",l,{once:!0}),e.addEventListener("error",()=>{r[n]=!1},{once:!0}),t.appendChild(e),r[n]=!0}function _(t){let e=o.getElementById("shopify-origin-trials");if(!e||r.__shopifyOriginTrialsDone){t();return}e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function i(){_(()=>r.setTimeout(f,0))}function m(){o.addEventListener("DOMContentLoaded",i,{once:!0})}p()?i():m()}s("\/\/qclothier.com\/cdn\/shopifycloud\/storefront\/assets\/storefront\/webmcp-c6b62ece.js","sha256-ke4DDuBjdvea3vxLWxHc9E9nq8zihuG4IfYEGbb77ys=");})(); 450</script>
vendor: 1 bytes, line 450
450
451<script data-source-attribution="shopify.dynamic_checkout.dynamic.init">var Shopify=Shopify||{};Shopify.PaymentButton=Shopify.PaymentButton||{isStorefrontPortableWallets:!0,init:function(){window.Shopify.PaymentButton.init=function(){};var t=document.createElement("script");t.src="https://qclothier.com/cdn/shopifycloud/portable-wallets/latest/portable-wallets.en.js",t.type="module",document.head.appendChild(t)}}; 452</script>
vendor: 1 bytes, line 452
452
453<script data-source-attribution="shopify.dynamic_checkout.buyer_consent"> 454 function portableWalletsHideBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),n.removeEventListener("click",e))}function portableWalletsShowBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.remove("hidden"),t.removeAttribute("aria-hidden"),n.addEventListener("click",e))}window.Shopify?.PaymentButton&&(window.Shopify.PaymentButton.hideBuyerConsent=portableWalletsHideBuyerConsent,window.Shopify.PaymentButton.showBuyerConsent=portableWalletsShowBuyerConsent); 455</script>
vendor: 1 bytes, line 455
455
456<script data-source-attribution="shopify.dynamic_checkout.cart.bootstrap">document.addEventListener("DOMContentLoaded",(function(){function t(){return document.querySelector("shopify-accelerated-checkout-cart, shopify-accelerated-checkout")}if(t())Shopify.PaymentButton.init();else{new MutationObserver((function(e,n){t()&&(Shopify.PaymentButton.init(),n.disconnect())})).observe(document.body,{childList:!0,subtree:!0})}})); 457</script>
457 458<link id="shopify-accelerated-checkout-styles" rel="stylesheet" media="screen" href="https://qclothier.com/cdn/shopifycloud/portable-wallets/latest/accelerated-checkout-backwards-compat.css" crossorigin="anonymous"> 459<style id="shopify-accelerated-checkout-cart"> 460 #shopify-buyer-consent { 461 margin-top: 1em; 462 display: inline-block; 463 width: 100%; 464} 465 466#shopify-buyer-consent.hidden { 467 display: none; 468} 469 470#shopify-subscription-policy-button { 471 background: none; 472 border: none; 473 padding: 0; 474 text-decoration: underline; 475 font-size: inherit; 476 cursor: pointer; 477} 478 479#shopify-subscription-policy-button::before { 480 box-shadow: none; 481} 482 483 </style> 484
485<script id="shopify-cfh-end">window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.end');</script>
485 486 487
487<script> 488 document.documentElement.className = document.documentElement.className.replace('no-js', 'js'); 489 window.theme = window.theme || {}; 490 theme.money_format = "${{amount}}"; 491 theme.money_container = '.theme-money'; 492 theme.strings = { 493 previous: "Previous", 494 next: "Next", 495 close: "Close", 496 addressError: "Error looking up that address", 497 addressNoResults: "No results for that address", 498 addressQueryLimit: "You have exceeded the Google API usage limit. Consider upgrading to a \u003ca href=\"https:\/\/developers.google.com\/maps\/premium\/usage-limits\"\u003ePremium Plan\u003c\/a\u003e.", 499 authError: "There was a problem authenticating your Google Maps API Key.", 500 back: "Back", 501 cartConfirmation: "You must agree to the terms and conditions before continuing.", 502 loadMore: "Load more", 503 infiniteScrollNoMore: "No more results", 504 priceNonExistent: "Unavailable", 505 buttonDefault: "Add to Cart", 506 buttonNoStock: "Out of stock", 507 buttonNoVariant: "Unavailable", 508 variantNoStock: "Sold out", 509 unitPriceSeparator: " \/ ", 510 colorBoxPrevious: "Previous", 511 colorBoxNext: "Next", 512 colorBoxClose: "Close", 513 navigateHome: "Home", 514 productAddingToCart: "Adding", 515 productAddedToCart: "Added to cart", 516 popupWasAdded: "was added to your cart", 517 popupCheckout: "Checkout", 518 popupContinueShopping: "Continue shopping", 519 onlyXLeft: "[[ quantity ]] in stock", 520 priceSoldOut: "Sold Out", 521 loading: "Loading...", 522 viewCart: "View cart", 523 page: "Page {{ page }}", 524 imageSlider: "Image slider", 525 clearAll: "Clear all" 526 }; 527 theme.routes = { 528 root_url: '/', 529 cart_url: '/cart', 530 cart_add_url: '/cart/add', 531 checkout: '/checkout' 532 }; 533 theme.settings = { 534 productImageParallax: true, 535 animationEnabledDesktop: true, 536 animationEnabledMobile: false 537 }; 538 539 theme.checkViewportFillers = function(){ 540 var toggleState = false; 541 var elPageContent = document.getElementById('page-content'); 542 if(elPageContent) { 543 var elOverlapSection = elPageContent.querySelector('.header-overlap-section'); 544 if (elOverlapSection) { 545 var padding = parseInt(getComputedStyle(elPageContent).getPropertyValue('padding-top')); 546 toggleState = ((Math.round(elOverlapSection.offsetTop) - padding) === 0); 547 } 548 } 549 if(toggleState) { 550 document.getElementsByTagName('body')[0].classList.add('header-section-overlap'); 551 } else { 552 document.getElementsByTagName('body')[0].classList.remove('header-section-overlap'); 553 } 554 }; 555 556 theme.assessAltLogo = function(){ 557 var elsOverlappers = document.querySelectorAll('.needs-alt-logo'); 558 var useAltLogo = false; 559 560 if(useAltLogo) { 561 document.getElementsByTagName('body')[0].classList.add('use-alt-logo'); 562 } else { 563 document.getElementsByTagName('body')[0].classList.remove('use-alt-logo'); 564 } 565 }; 566 </script>
566 567 568
568<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
568 569 570 <!-- Callrail --> 571 572
572<script src="//qclothier.com/cdn/shop/t/73/assets/slick.js?v=58134174594824474601723504063" defer="defer"></script>
572 573 574 <!-- Stackadapt Pixel --> 575
575<script> 576 !(function (s, a, e, v, n, t, z) { 577 if (s.saq) return; 578 n = s.saq = function () { 579 n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments); 580 }; 581 if (!s._saq) s._saq = n; 582 n.push = n; 583 n.loaded = !0; 584 n.version = '1.0'; 585 n.queue = []; 586 t = a.createElement(e); 587 t.async = !0; 588 t.src = v; 589 z = a.getElementsByTagName(e)[0]; 590 z.parentNode.insertBefore(t, z); 591 })(window, document, 'script', 'https://tags.srv.stackadapt.com/events.js'); 592 saq('ts', 'ML5APFXiTqjCFpR0YdffHQ'); 593 </script>
593 594 595
595<script> 596 (function (i, s, o, g, r, a, m) { 597 i['GoogleAnalyticsObject'] = r; 598 (i[r] = 599 i[r] || 600 function () { 601 (i[r].q = i[r].q || []).push(arguments); 602 }), 603 (i[r].l = 1 * new Date()); 604 (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); 605 a.async = 1; 606 a.src = g; 607 m.parentNode.insertBefore(a, m); 608 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 609 610 ga('create', 'UA-87285727-2', 'auto'); 611 ga('send', 'pageview'); 612 </script>
612 613
613<script type="application/ld+json"> 614 { 615 "@context": "https://schema.org", 616 "@type": "ClothingStore", 617 "name": "Q Clothier", 618 "url": "https://qclothier.com/", 619 "image": "https://qclothier.com/cdn/shop/files/Qlogo_white_500x.png", 620 "telephone": "+1-214-780-9888", 621 "address": { 622 "@type": "PostalAddress", 623 "streetAddress": "3699 McKinney Avenue, Suite 310", 624 "addressLocality": "Dallas", 625 "addressRegion": "TX", 626 "postalCode": "75204", 627 "addressCountry": "US" 628 }, 629 "geo": { 630 "@type": "GeoCoordinates", 631 "latitude": 32.8075, 632 "longitude": -96.7989 633 }, 634 "openingHoursSpecification": [ 635 { 636 "@type": "OpeningHoursSpecification", 637 "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], 638 "opens": "10:00", 639 "closes": "19:00" 640 }, 641 { 642 "@type": "OpeningHoursSpecification", 643 "dayOfWeek": "Sunday", 644 "opens": "12:00", 645 "closes": "18:00" 646 } 647 ], 648 "areaServed": [ 649 { 650 "@type": "Place", 651 "name": "Nashville, TN", 652 "address": { "@type": "PostalAddress", "postalCode": "37203" } 653 }, 654 { 655 "@type": "Place", 656 "name": "Tulsa, OK", 657 "address": { "@type": "PostalAddress", "postalCode": "74114" } 658 }, 659 { 660 "@type": "Place", 661 "name": "Phoenix, AZ", 662 "address": { "@type": "PostalAddress", "postalCode": "85016" } 663 }, 664 { 665 "@type": "Place", 666 "name": "Oklahoma City, OK", 667 "address": { "@type": "PostalAddress", "postalCode": "73118" } 668 }, 669 { 670 "@type": "Place", 671 "name": "New Orleans, LA", 672 "address": { "@type": "PostalAddress", "postalCode": "70130" } 673 }, 674 { 675 "@type": "Place", 676 "name": "Little Rock, AR", 677 "address": { "@type": "PostalAddress", "postalCode": "72223" } 678 }, 679 { 680 "@type": "Place", 681 "name": "Houston, TX", 682 "address": { "@type": "PostalAddress", "postalCode": "77098" } 683 }, 684 { 685 "@type": "Place", 686 "name": "Fort Worth, TX", 687 "address": { "@type": "PostalAddress", "postalCode": "76109" } 688 }, 689 { 690 "@type": "Place", 691 "name": "Dallas, TX", 692 "address": { "@type": "PostalAddress", "postalCode": "75204" } 693 }, 694 { 695 "@type": "Place", 696 "name": "Atlanta, GA", 697 "address": { "@type": "PostalAddress", "postalCode": "30308" } 698 } 699 ] 700 } 701 </script>
701 702 <!-- BEGIN app block: shopify://apps/sc-easy-redirects/blocks/app/be3f8dbd-5d43-46b4-ba43-2d65046054c2 --> 703 <!-- common for all pages --> 704 705 706
706<script src="https://cdn.shopify.com/extensions/019feafe-a942-7fff-96d6-964177dec909/sc-easy-redirects-16/assets/esc-redirect-app-live-feature.js" async></script>
706 707 708 709 710 711 712<!-- END app block --><!-- BEGIN app block: shopify://apps/gift-card-hero-all-in-one/blocks/app-embed/57babc6a-ae2b-46cf-b565-dd8395b0276b --><!-- BEGIN app snippet: gift-hero-snippet --> 713
714<script async> 715 (function() { 716 window.ScCommon = { 717 shop: { 718 moneyFormat: window?.GiftCardHeroCustom?.moneyFormat || '${{amount}}', 719 customer: null, 720 }, 721 }; 722 723 window.GiftCardHero = { 724 common: { 725 translations: { 726 preview: 'Preview', 727 mycards: 'My Gift Cards', 728 account: 'Account', 729 details: 'Details', 730 noRegisteredCards: 'No registered gift cards', 731 checkBalance: 'Check the balance', 732 customAmount: 'Custom', 733 giftCard: 'Gift card', 734 expiresOn: 'Expires on {{ expiry }}', 735 }, 736 }, 737 shop: { 738 items: [], 739 currency: 'USD', 740 mainCurrency: 'USD', 741 }, 742 balance: { 743 design: {"checkerBtnBg":"#8533fc","checkerBtnColor":"#ffffff","checkerModalBorderRadius":5,"checkerButtonBorderRadius":36,"checkerModalBg":"#ffffff","bubbleBg":"#ffce33","bubbleColor":"#0D0D2A","bubbleBorderRadius":5,"textColor":"#000000","inputBg":"#ffffff","inputBorderRadius":2,"inputBorderColor":"#acacac","inputColor":"#000000","submitBg":"#000000","submitBorder":"#000000","submitBorderRadius":2,"submitColor":"#ffffff","findBtnBg":"#4e63df","findBtnBorder":"#4e63df","findBtnColor":"#ffffff","fintBtnRadius":6,"progressBg":"#d5dae3","progressRadius":10,"applyBg":"#D4D8EF","applyColor":"#242445","applyRadius":6}, 744 translations: { 745 'en': {"checkerBtnText":"GIFT CARD BALANCE CHECK","inputLabel":"Redeem or check balance of gift cards","submitLabel":"Check","placeholder":"Enter your gift code here","more":"Find products at a similar price","cartSubotal":"Cart subtotal: ","usedBalance":"Applied balance:","unusedBalance":"Unapplied balance:","cardBalance":"Gift card balance","apply":"Apply balance to a cart"} || {"checkerBtnText":"GIFT CARD BALANCE CHECK","inputLabel":"Redeem or check balance of gift cards","submitLabel":"Check","placeholder":"Enter your gift code here","more":"Find products at a similar price","cartSubotal":"Cart subtotal: ","usedBalance":"Applied balance:","unusedBalance":"Unapplied balance:","cardBalance":"Gift card balance","apply":"Apply balance to a cart"}, 746 }, 747 }, 748 settings: {"balance":{"enabled":false,"recommendProducts":true,"showProgressCart":true,"showBubble":true,"showProgressTime":"4","allowApply":true,"showProgress":true,"allowMultiple":true,"showWidget":"5","title":"Gift card balance check","beforeText":"\u003cp\u003eNot sure how much left on your gift card? Enter you gift card number in the input field below in order to check your gift card balance.\u003c\/p\u003e","afterText":"\u003ch3\u003e\u003cstrong\u003eAdditional information\u003c\/strong\u003e\u003c\/h3\u003e\u003cul\u003e\u003cli\u003eYou may apply your gift card at a checkout page.\u003c\/li\u003e\u003cli\u003eYou may use your gift card multiple times if your gift card has a remaining balance.\u003c\/li\u003e\u003cli\u003eYou may apply multiple gift cards at a checkout page.\u003c\/li\u003e\u003cli\u003eYou can't use a gift card to buy another gift card.\u003c\/li\u003e\u003c\/ul\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp class=\"ql-align-right\"\u003e\u003cbr\u003e\u003c\/p\u003e","version":"v2"}}, 749 isGiftProduct: false, 750 productId: null, 751 img: '', 752 options: null, 753 hideMyGiftcards: false, 754 giftcards: false, 755 }; 756 757 758 })(); 759</script>
759 760 761 762<!-- END app snippet --> 763 764 765 766 767 768 769 770
770<script 771 src="https://cdn.shopify.com/extensions/01a10b63-a5e5-7bda-bb14-088467d06cec/gift-card-hero-529/assets/storefront.min.js" 772 defer 773 data-cmp-ignore 774 data-cmp-ab="2" 775 data-cookieconsent="ignore"></script>
775 776 777 778 779 780 781 782<!-- END app block --><!-- BEGIN app block: shopify://apps/gorgias-live-chat-helpdesk/blocks/gorgias/a66db725-7b96-4e3f-916e-6c8e6f87aaaa -->
783<script defer data-gorgias-loader-chat src="https://config.gorgias.chat/bundle-loader/shopify/qfiftyone.myshopify.com"></script>
783 784 785
786<script defer data-gorgias-loader-convert src="https://content.9gtb.com/loader.js"></script>
786 787 788
789<script defer data-gorgias-loader-mailto-replace src="https://config.gorgias.help/api/contact-forms/replace-mailto-script.js?shopName=qfiftyone"></script>
789 790 791 792<!-- END app block --><!-- BEGIN app block: shopify://apps/klaviyo-email-marketing-sms/blocks/klaviyo-onsite-embed/2632fe16-c075-4321-a88b-50b567f42507 --> 793 794 795 796 797 798 799 800 801 802 803 804 805
805<script async src="https://static.klaviyo.com/onsite/js/Sb5Lyq/klaviyo.js?company_id=Sb5Lyq"></script>
805 806
806<script>!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return"push"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w<n;w++)o[w]=arguments[w];var t="function"==typeof o[o.length-1]?o.pop():void 0,e=new Promise((function(n){window._klOnsite.push([i].concat(o,[function(i){t&&t(i),n(i)}]))}));return e}}})}catch(n){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var n;(n=window._klOnsite).push.apply(n,arguments)}}}}();</script>
806 807 808 809 810 811 812 813
813<script> 814 window.klaviyoReviewsProductDesignMode = false 815 </script>
815 816 817 818 819 820 821 822 823 824 825<!-- END app block --><link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
826<script>(function(){if ("sendBeacon" in navigator && "performance" in window) {try {var session_token_from_headers = performance.getEntriesByType('navigation')[0].serverTiming.find(x => x.name == '_s').description;} catch {var session_token_from_headers = undefined;}var session_cookie_matches = document.cookie.match(/_shopify_s=([^;]*)/);var session_token_from_cookie = session_cookie_matches && session_cookie_matches.length === 2 ? session_cookie_matches[1] : "";var session_token = session_token_from_headers || session_token_from_cookie || "";function handle_abandonment_event(e) {var entries = performance.getEntries().filter(function(entry) {return /monorail-edge.shopifysvc.com/.test(entry.name);});if (!window.abandonment_tracked && entries.length === 0) {window.abandonment_tracked = true;var currentMs = Date.now();var navigation_start = performance.timing.navigationStart;var payload = {shop_id: 17660155,url: window.location.href,navigation_start,duration: currentMs - navigation_start,session_token,page_type: "blog"};window.navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", JSON.stringify({schema_id: "online_store_buyer_site_abandonment/1.1",payload: payload,metadata: {event_created_at_ms: currentMs,event_sent_at_ms: currentMs}}));}}window.addEventListener('pagehide', handle_abandonment_event);}}());</script>
vendor: 1 bytes, line 826
826
827<script> 828 window.__TREKKIE_SHIM_QUEUE = window.__TREKKIE_SHIM_QUEUE || []; 829</script>
vendor: 1 bytes, line 829
829
830<script>(function(){var wpmLoader=function(){"use strict";var e=/Googlebot|Storebot-Google|bingbot|Baiduspider|YandexBot|DuckDuckBot|Slurp|facebookexternalhit|Twitterbot|LinkedInBot|Applebot|AdsBot-Google|Mediapartners-Google|APIs-Google|PetalBot|SemrushBot|AhrefsBot|MJ12bot|DotBot|Acunetix|PerplexityBot|Perplexity-User/i,t=/bytedance/i;function i(){try{var e=document.cookie;if(!e||"string"!=typeof e)return;for(var t=0,i=e.split(";");t<i.length;t++){var n=i[t],r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r).trim();if(o){var a=void 0;try{a=decodeURIComponent(o)}catch(e){a=o}if("_shopify_s"===a){var d=n.slice(r+1).trim();try{return decodeURIComponent(d)}catch(e){return d}}}}}return}catch(e){return}}function n(e){try{"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}catch(e){}}function r(e,t){return"string"==typeof e&&e.length>0&&e.length<=t?e:void 0}function o(e){var t;switch(null==(t=null==e?void 0:e.navigation)?void 0:t.type){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";default:return}}function a(){var e,t,i;try{var n=null==(i=null==(t=null==(e=self.ShopifyAnalytics)?void 0:e.lib)?void 0:t.trekkie)?void 0:i.state;return"awaiting-consent"===n||"initialized"===n?n:void 0}catch(e){return}}return function(d,s,u,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var p=c.trekkieShim;!0!==p&&"true"!==p||null!=window.__TREKKIE_SHIM_QUEUE||(window.__TREKKIE_SHIM_QUEUE=[])}catch(e){}var f,v,h,y,g=(v=(f={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}).modern,h=f.legacy,(y=navigator.userAgent).match(e)?"bot":y.match(v)?"modern":y.match(h)?"legacy":y.match(t)?"bot":"unknown"),m=function(e){var t,i,n=r(e,128);try{var a=window.performance,d=null==(t=null==a?void 0:a.getEntriesByType)?void 0:t.call(a,"navigation")[0];if(!d)return{requestId:n,navigationType:o(a)};var s="type"in d?r(d.type,64):void 0,u="serverTiming"in d&&Array.isArray(d.serverTiming)?d.serverTiming:[];return{requestId:null!=n?n:r(null==(i=u.find(function(e){return"requestID"===e.name}))?void 0:i.description,128),navigationType:s}}catch(e){return{requestId:n}}}(c.requestId),w=function(e){var t=e.version,r=e.browserTarget,o=e.surface,a=e.shopId,d=e.monorailEndpoint,s=window.location.href;return{emit:function(e){var u=e.status,l=e.errorMsg,c=e.failureReason,p=e.useKeepaliveFallback,f=void 0!==p&&p,v=e.navigationType,h=e.pagehidePersisted,y=e.requestId,g=e.trekkieState;if(d){var m,w;try{var b=(new Date).getTime();m=JSON.stringify({metadata:{event_sent_at_ms:b},events:[{schema_id:"web_pixels_manager_load/3.3",payload:{version:t,bundle_target:r,page_url:s,status:u,surface:o,error_msg:l,failure_reason:c,navigation_type:v,pagehide_persisted:h,request_id:y,trekkie_state:g,shop_id:a,visit_token:i()},metadata:{event_created_at_ms:b}}]})}catch(e){return}try{if("function"==typeof window.navigator.sendBeacon&&-1===(w=window.navigator.userAgent).indexOf("iPhone; CPU iPhone OS 12_")&&-1===w.indexOf("iPad; CPU OS 12_")&&-1===w.indexOf("iPod touch; CPU iPhone OS 12_")&&window.navigator.sendBeacon.bind(window.navigator)(d,m))return}catch(e){}if(f)try{"function"==typeof window.fetch&&window.fetch(d,{method:"POST",headers:{"Content-Type":"text/plain"},body:m,keepalive:!0}
830).catch(function(){})}catch(e){}else try{var _=new XMLHttpRequest;_.open("POST",d,!0),_.setRequestHeader("Content-Type","text/plain"),_.send(m)}catch(e){n("[Web Pixels Manager] Got an unhandled error while logging to Monorail.")}}else n("[Web Pixels Manager] No Monorail endpoint provided, skipping logging.")}}}({version:u,browserTarget:g,surface:d.surface,shopId:d.shopId,monorailEndpoint:d.monorailEndpoint});if(Boolean(null==(_=null==(b=window.Shopify)?void 0:b.analytics)?void 0:_.replayQueue))w.emit({status:"setup-skipped",errorMsg:"replay queue already initialized."});else{var b,_;w.emit({status:"setup-started"}),window.Shopify=window.Shopify||{};var S=window.Shopify;S.analytics=S.analytics||{};var P=S.analytics;P.replayQueue=[],P.publish=function(e,t,i){return P.replayQueue.push([e,t,i]),!0};try{self.performance.mark("wpm:start")}catch(e){}var k,C="modern"===g?"modern":"legacy",E=(null!=l?l:{modern:"",legacy:""})[C],I=[(k={baseUrl:s,hashVersion:u,buildTarget:C}).baseUrl,"/wpm","/b",k.hashVersion,"modern"===k.buildTarget?"m":"l",".js"].join(""),O=!1,T=!1;try{c.browserTarget=g,function(){O=!0;try{window.addEventListener("pagehide",M)}catch(e){O=!1}}(),R(function(){try{R(x)}catch(e){D(e)}}),w.emit({status:"loading",requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()})}catch(e){D(e)}}function U(){var e;if(q(),!function(){var e,t;return Boolean(null==(t=null==(e=window.Shopify)?void 0:e.analytics)?void 0:t.initialized)}()){var t,i,n;try{if("function"!=typeof(null==(e=window.webPixelsManager)?void 0:e.init))return void A();if(!(null!==(n=i=t=window.webPixelsManager.init(d))&&"function"!=typeof n&&Object(n)===n&&"publish"in i&&"function"==typeof i.publish&&"publishCustomEvent"in i&&"function"==typeof i.publishCustomEvent&&"visitor"in i&&"function"==typeof i.visitor))return void A()}catch(e){return void A(e)}var r=window.Shopify.analytics;r.replayQueue.forEach(function(e){var i=e[0],n=e[1],r=e[2];t.publishCustomEvent(i,n,r)}),r.replayQueue=[],r.publish=t.publishCustomEvent,r.visitor=t.visitor,r.initialized=!0}}function A(e){B("manager_api_unavailable",void 0===e?void 0:Q(e))}function x(){B("script_load_failed","".concat(I," has failed to load"))}function B(e,t){T||(T=!0,q(),w.emit({status:"failed",errorMsg:t,failureReason:e,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function M(e){O&&(q(),w.emit({status:"pagehide-while-loading",useKeepaliveFallback:!0,pagehidePersisted:e.persisted,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function q(){O=!1;try{window.removeEventListener("pagehide",M)}catch(e){}}function R(e){var t;!function(e){var t=e.src,i=e.async,n=void 0===i||i,r=e.onload,o=e.onerror,a=e.sri,d=e.scriptDataAttributes,s=void 0===d?{}:d,u=document.createElement("script"),l=document.querySelector("head"),c=document.querySelector("body");if(u.async=n,u.src=t,a&&(u.integrity=a,u.crossOrigin="anonymous"),s)for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))try{u.dataset[p]=String(s[p])}catch(e){}if(r&&u.addEventListener("load",r),o&&u.addEventListener("error",o),l)l.appendChild(u);else{if(!c)throw new Error("Did not find a head or body element to append the script");c.appendChild(u)}}({src:I,async:!0,onload:U,onerror:e,sri:(t=E,"string"==typeof t&&/^sha384-[A-Za-z0-9+/=]+$/.test(t)?E:""),scriptDataAttributes:c})}function D(e){B("script_append_failed",Q(e))}function Q(e){return e instanceof Error?e.message:"Unknown error"}}}();wpmLoader({shopId: 17660155,storefrontBaseUrl: "https://qclothier.com",extensionsBaseUrl: "https://extensions.shopifycdn.com/cdn/shopifycloud/web-pixels-manager",monorailEndpoint: "https://qclothier.com/.well-known/shopify/monorail/unstable/produce_batch",surface: "storefront-renderer",enabledBetaFlags: ["4c64608a","16072cab","8450a54b","7ee89bf1"],webPixelsConfigList: [{"id":"2004844607","configuration":"{\"octaneDomain\":\"https:\\\/\\\/app.octaneai.com\",\"octaneNewDomain\":\"https:\\\/\\\/app2.octaneai.com\",\"botID\":\"zju75bsj9opl607v\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"aace1440a9416e8b2805b96c7b2f2fe0","type":"APP","apiClientId":2012438,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_email","read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"}
830,{"id":"161513535","configuration":"{\"pixel_id\":\"1635077950144006\",\"pixel_type\":\"facebook_pixel\",\"metaapp_system_user_token\":\"-\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"bd2f978c17a94bbb8a74d43de2165dc5","type":"APP","apiClientId":2329312,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"87359551","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS"],"name":"Google Analytics tag (migrated)"},{"id":"shopify-app-pixel","configuration":"{}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"APP","privacyPurposes":["ANALYTICS","MARKETING"]},{"id":"shopify-custom-pixel","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING"]}],isMerchantRequest: false,initData: {"shop":{"name":"Q Clothier","paymentSettings":{"currencyCode":"USD"},"myshopifyDomain":"qfiftyone.myshopify.com","countryCode":"US","storefrontUrl":"https:\/\/qclothier.com"},"customer":null,"cart":null,"checkout":null,"productVariants":[],"products":[],"purchasingCompany":null},},"https://qclothier.com/cdn","5982071ew7ea472e3p69b68784m2150dfea",{"modern":"","legacy":""},{"trekkieShim":true,"agentContext":true,"apiClientId":"580111","facebookCapiEnabled":"true","themeId":"126849450047","themeStoreId":"677","themePublished":"true","eventMetadataId":"ebe498f5-537a-4c3c-80f4-85f5ac5871d1","pageType":"blog","resourceId":"94078791","shopId":"17660155","storefrontBaseUrl":"https:\/\/qclothier.com","extensionBaseUrl":"https:\/\/extensions.shopifycdn.com\/cdn\/shopifycloud\/web-pixels-manager","surface":"storefront-renderer","enabledBetaFlags":"[\"4c64608a\", \"16072cab\", \"8450a54b\", \"7ee89bf1\"]","isMerchantRequest":"false","hashVersion":"5982071ew7ea472e3p69b68784m2150dfea","publish":"custom","events":"[[\"page_viewed\",{}]]"});})();</script>
830<script> 831 window.ShopifyAnalytics = window.ShopifyAnalytics || {}; 832 window.ShopifyAnalytics.meta = window.ShopifyAnalytics.meta || {}; 833 window.ShopifyAnalytics.meta.currency = 'USD'; 834 var meta = {"page":{"pageType":"blog","resourceType":"blog","resourceId":94078791,"requestId":"5daee45e-70fd-4dc0-927c-a0438fc31499-1791225701"}}; 835 for (var attr in meta) { 836 window.ShopifyAnalytics.meta[attr] = meta[attr]; 837 } 838</script>
vendor: 1 bytes, line 838
838
839<script class="analytics"> 840 (function () { 841 var customDocumentWrite = function(content) { 842 var jquery = null; 843 844 if (window.jQuery) { 845 jquery = window.jQuery; 846 } else if (window.Checkout && window.Checkout.$) { 847 jquery = window.Checkout.$; 848 } 849 850 if (jquery) { 851 jquery('body').append(content); 852 } 853 }; 854 855 var hasLoggedConversion = function(token) { 856 if (token) { 857 return document.cookie.indexOf('loggedConversion=' + token) !== -1; 858 } 859 return false; 860 } 861 862 var setCookieIfConversion = function(token) { 863 if (token) { 864 var twoMonthsFromNow = new Date(Date.now()); 865 twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2); 866 867 document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow; 868 } 869 } 870 871 var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || []; 872 window.ShopifyAnalytics.lib.trekkie = window.trekkie; 873 if (trekkie.integrations) { 874 return; 875 } 876 trekkie.methods = [ 877 'identify', 878 'page', 879 'ready', 880 'track', 881 'trackForm', 882 'trackLink' 883 ]; 884 trekkie.factory = function(method) { 885 return function() { 886 var args = Array.prototype.slice.call(arguments); 887 args.unshift(method); 888 trekkie.push(args); 889 if (method == 'track' || method == 'page') { 890 var pageUrl; 891 try { 892 pageUrl = window.location.href; 893 } catch (e) {} 894 var pageReferrer; 895 try { 896 pageReferrer = document.referrer; 897 } catch (e) {} 898 try { 899 if (window.__TREKKIE_SHIM_QUEUE == null) { 900 window.__TREKKIE_SHIM_QUEUE = []; 901 } 902 window.__TREKKIE_SHIM_QUEUE.push({ 903 from: 'trekkie-stub', 904 method: method, 905 args: args.slice(1), 906 pageContext: { 907 url: pageUrl, 908 referrer: pageReferrer 909 } 910 }); 911 } catch (e) { 912 // no-op 913 } 914 } 915 return trekkie; 916 }; 917 }; 918 for (var i = 0; i < trekkie.methods.length; i++) { 919 var key = trekkie.methods[i]; 920 trekkie[key] = trekkie.factory(key); 921 } 922 trekkie.load = function(config) { 923 trekkie.config = config || {}; 924 trekkie.config.initialDocumentCookie = document.cookie; 925 var first = document.getElementsByTagName('script')[0]; 926var script = document.createElement('script'); 927script.type = 'text/javascript'; 928script.onerror = function(e) { 929 var scriptFallback = document.createElement('script'); 930 scriptFallback.type = 'text/javascript'; 931 scriptFallback.onerror = function(error) { 932 var Monorail = { 933 produce: function produce(monorailDomain, schemaId, payload) { 934 var currentMs = new Date().getTime(); 935 var event = { 936 schema_id: schemaId, 937 payload: payload, 938 metadata: { 939 event_created_at_ms: currentMs, 940 event_sent_at_ms: currentMs 941 } 942 }; 943 return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event)); 944 }, 945 sendRequest: function sendRequest(endpointUrl, payload) { 946 // Try the sendBeacon API 947 if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) { 948 var blobData = new window.Blob([payload], { 949 type: 'text/plain' 950 }); 951 952 if (window.navigator.sendBeacon(endpointUrl, blobData)) { 953 return true; 954 } // sendBeacon was not successful 955 956 } // XHR beacon 957 958 var xhr = new XMLHttpRequest(); 959 960 try { 961 xhr.open('POST', endpointUrl); 962 xhr.setRequestHeader('Content-Type', 'text/plain'); 963 xhr.send(payload); 964 } catch (e) { 965 console.log(e); 966 } 967 968 return false; 969 }, 970 isIos12: function isIos12() { 971 return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1; 972 } 973 }; 974 Monorail.produce('monorail-edge.shopifysvc.com', 975 'trekkie_storefront_load_errors/1.1', 976 {shop_id: 17660155,
977 theme_id: 126849450047, 978 app_name: "storefront", 979 context_url: window.location.href, 980 source_url: "//qclothier.com/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js"}); 981 982 }; 983 scriptFallback.async = true; 984 scriptFallback.src = '//qclothier.com/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js'; 985 first.parentNode.insertBefore(scriptFallback, first); 986}; 987script.async = true; 988script.src = '//qclothier.com/cdn/s/trekkie.storefront.2f6d7d7ede7d24234881a9cd5f47e679642fa1f6.min.js'; 989first.parentNode.insertBefore(script, first); 990 991 }; 992 trekkie.load( 993 {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":17660155,"isMerchantRequest":null,"themeId":126849450047,"themeCityHash":"8510012103875191229","contentLanguage":"en","currency":"USD","eventMetadataId":"ebe498f5-537a-4c3c-80f4-85f5ac5871d1"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain","enabledBetaFlags":["764d78cb","8450a54b","7ee89bf1","4c64608a"]},"Session Attribution":{},"S2S":{"facebookCapiEnabled":true,"source":"trekkie-storefront-renderer","apiClientId":580111}} 994 ); 995 996 var loaded = false; 997 trekkie.ready(function() { 998 if (loaded) return; 999 loaded = true; 1000 1001 window.ShopifyAnalytics.lib = window.trekkie; 1002 1003 var originalDocumentWrite = document.write; 1004 document.write = customDocumentWrite; 1005 try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {}; 1006 document.write = originalDocumentWrite; 1007 1008 var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/) 1009 var token = match? match[1]: undefined; 1010 if (!hasLoggedConversion(token)) { 1011 setCookieIfConversion(token); 1012 1013 } 1014 }); 1015 1016 window.ShopifyAnalytics.lib.page(null,{"pageType":"blog","resourceType":"blog","resourceId":94078791,"requestId":"5daee45e-70fd-4dc0-927c-a0438fc31499-1791225701","shopifyEmitted":true}); 1017 1018 var eventsListenerScript = document.createElement('script'); 1019 eventsListenerScript.async = true; 1020 eventsListenerScript.src = "//qclothier.com/cdn/shopifycloud/storefront/assets/shop_events_listener-4e26a9ce.js"; 1021 document.getElementsByTagName('head')[0].appendChild(eventsListenerScript); 1022})();</script>
1022 1023
1023<script> 1024 if (!window.ga || (window.ga && typeof window.ga !== 'function')) { 1025 window.ga = function ga() { 1026 (window.ga.q = window.ga.q || []).push(arguments); 1027 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 1028 window.Shopify.analytics.publish("ga_stub_called", {}, {sendTo: "google_osp_migration"}); 1029 } 1030 console.error("Shopify's Google Analytics stub called with:", Array.from(arguments), "\nSee https://help.shopify.com/manual/promoting-marketing/pixels/pixel-migration#google for more information."); 1031 }; 1032 if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') { 1033 window.Shopify.analytics.publish("ga_stub_initialized", {}, {sendTo: "google_osp_migration"}); 1034 } 1035 } 1036</script>
vendor: 1 bytes, line 1036
1036
1037<script 1038 defer 1039 src="https://qclothier.com/cdn/shopifycloud/perf-kit/shopify-perf-kit-3.9.4.min.js" 1040 data-application="storefront-renderer" 1041 data-shop-id="17660155" 1042 data-render-region="gcp-us-central1" 1043 data-page-type="blog" 1044 data-theme-instance-id="126849450047" 1045 data-theme-name="Showcase" 1046 data-theme-version="5.0.3" 1047 data-monorail-region="shop_domain" 1048 data-resource-timing-sampling-rate="10" 1049 data-shs="true" 1050 data-shs-beacon="true" 1051 data-shs-export-with-fetch="true" 1052 data-shs-logs-sample-rate="1" 1053 data-shs-beacon-endpoint="https://qclothier.com/api/collect" 1054></script>
1054 1055<meta name="shopify-y" content="dc712508-0343-4b34-803c-44730d93b242" data-expiration="1822783301000"><meta name="shopify-s" content="07c8e57b-5ffd-4a35-9504-6784d57f11c4" data-expiration="1791227501000"><meta name="new-cookie-storage-activated" content="t"> 1056</head> 1057 1058 <body 1059 id="page-q-clothier-blog-insights-into-modern-fashion" 1060 class="page-q-clothier-blog-insights-into-modern-fashion template-blog" 1061 > 1062 1063 1064 1065
1065<script> 1066 if ('IntersectionObserver' in window) { 1067 document.body.classList.add('cc-animate-enabled'); 1068 } 1069 </script>
1069 1070 1071 1072 <a class="skip-link visually-hidden" href="#page-content">Skip to content</a> 1073 1074 1075 <div id="shopify-section-header" class="shopify-section"><style type="text/css"> 1076 /* The css below is added to remove the underline from the list items on the footer */ 1077 ul.rem-line li a { 1078 text-decoration: none !important; 1079 } 1080 ul.ib-rb-ul-none li a {text-decoration: none !important;} 1081 .cc-announcement { 1082 align-items: center; 1083 padding-top: 10px; 1084 max-height: 200px !important; 1085 } 1086 .cc-announcement__inner {margin-right: 0 !important;} 1087 .ib-rb-announcement-cta { 1088 flex: 1; 1089 text-align: start; 1090 } 1091 .ib-rb-announcement-cta a { 1092 display: inline-block; 1093 padding: 5px 15px; 1094 border-radius: 5px; 1095 /* border: 1px solid #000000 !important; */ 1096 /* box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; */ 1097 text-decoration: underline; 1098 text-underline-offset: 3px; 1099 } 1100 @media (max-width: 1099px) { 1101 .ib-rb-announcement-cta {text-align: center;} 1102 } 1103 /* */ 1104 1105 .logo img { width: 140px; } 1106 @media(min-width:768px){ 1107 .logo img { width: 220px; } 1108 } 1109 1110 1111 .cc-announcement { 1112 1113 font-size: 14px; 1114 1115 color: #000000; 1116 background: #ffffff; 1117 } 1118 1119 @media (min-width: 768px) { 1120 .cc-announcement { 1121 font-size: 14px; 1122 } 1123 } 1124</style> 1125 1126 1127 1128<form action="/cart" method="post" id="cc-checkout-form"></form> 1129 1130 1131 1132 1133 1134<div data-section-type="header" itemscope itemtype="http://schema.org/Organization"> 1135 <div 1136 id="site-control" 1137 class=" 1138 site-control inline icons 1139 nav-inline-desktop 1140 1141 fixed 1142 nav-opaque 1143 has-announcement 1144 alt-logo-when-active 1145 1146 " 1147 data-cc-animate 1148 data-opacity="opaque" 1149 data-positioning="sticky" 1150 > 1151 1152 1153 <div class="cc-announcement"> 1154 1155 1156 1157 <div class="cc-announcement__inner"> 1158 Find your perfect fit: <a href="/pages/schedule-consult" title="Showcase Schedule Consult">Schedule a fitting consultation</a> today. 1159 </div> 1160 1161 1162 1163 <div class="cc-announcement__logos"> 1164 1165 1166 <a class="cc-announcement__logo cc-announcement__logo--active" href="/" aria-label="Q Clothier" > 1167 <img src="//qclothier.com/cdn/shop/files/new-logo_1.png?v=1614932605&width=200" alt="" srcset="//qclothier.com/cdn/shop/files/new-logo_1.png?v=1614932605&width=200 200w" width="200" height="32"> 1168 </a> 1169 1170 1171 1172 <a class="cc-announcement__logo" href="https://rye51.com" aria-label="Rye 51" > 1173 <img src="//qclothier.com/cdn/shop/files/Cursive_Rye_Logo_1.jpg?v=1753075449&width=200" alt="Rye_Logo" srcset="//qclothier.com/cdn/shop/files/Cursive_Rye_Logo_1.jpg?v=1753075449&width=200 200w" width="200" height="85"> 1174 </a> 1175 1176 1177 1178 <a class="cc-announcement__logo" href="https://mrwinstons.com" aria-label="Mr. Winston's Barber" target="_blank" rel="noreferrer noopener"> 1179 <img src="//qclothier.com/cdn/shop/files/MrWinstonsLogo_Black-2.png?v=1722623990&width=200" alt="" srcset="//qclothier.com/cdn/shop/files/MrWinstonsLogo_Black-2.png?v=1722623990&width=200 200w" width="200" height="25"> 1180 </a> 1181 1182 1183 </div> 1184 1185 </div> 1186 1187 1188 1189 <div class="links site-control__inner"> 1190 <a 1191 class="menu" 1192 href="#page-menu" 1193 aria-controls="page-menu" 1194 data-modal-nav-toggle 1195 aria-label="Menu" 1196 > 1197 <span class="icon-menu"> 1198 <span class="icon-menu__bar icon-menu__bar-1"></span> 1199 <span class="icon-menu__bar icon-menu__bar-2"></span> 1200 <span class="icon-menu__bar icon-menu__bar-3"></span> 1201</span> 1202 1203 <span class="text-link">Menu</span> 1204 </a> 1205 1206 1207 <a data-cc-animate-click data-cc-animate class="logo logo--has-alt-logo" href="/" 1208 itemprop="url"> 1209 1210 1211 1212 <meta itemprop="name" content="Q Clothier"> 1213 1214 1215 1216 <img src="//qclothier.com/cdn/shop/files/Qlogo_white_500x.png?v=1639411641" alt="Q Clothier" itemprop="logo" 1217 width="400" height="130"/> 1218 1219
1220 <span class="alt-logo"> 1221 <img src="//qclothier.com/cdn/shop/files/Qlogo_white_500x.png?v=1639411641" alt="Q Clothier" itemprop="logo" 1222 width="400" height="130"/> 1223 </span> 1224 1225 1226 1227 1228 </a> 1229 1230 1231 1232 <div class="site-control__inline-links"> 1233 <div class="nav-row multi-level-nav reveal-on-hover" role="navigation" aria-label="Primary navigation"> 1234 <div class="tier-1"> 1235 <ul class="ib-rb-ul-none"> 1236 1237<li class=" contains-children contains-mega-menu"> 1238 <a href="/collections/custom-style-guide" class=" has-children" aria-haspopup="true"> 1239 Explore Custom 1240 </a> 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 <ul 1254 class="nav-columns rem-line 1255 nav-columns--count-2 1256 1257 1258 nav-columns--cta-count-1 ib-extra-flex" 1259 > 1260 1261 1262 <li class=" contains-children"> 1263 <a href="/collections/custom-style-guide" class="has-children column-title" aria-haspopup="true"> 1264 EXPLORE 1265 1266 1267 <span class="arr arr--small"> 1268<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1269<path d="M20.0981 11.6126L12.3871 3.90154C12.1731 3.68773 11.8262 3.68799 11.6124 3.90205C11.3985 4.11612 11.3988 4.46303 11.6129 4.67683L18.3902 11.4541L4.28976 11.4544C4.14474 11.4542 4.0056 11.5119 3.90323 11.6146C3.69076 11.8278 3.69128 12.1728 3.90444 12.3853C4.00642 12.4878 4.14509 12.5455 4.28976 12.5455L18.3908 12.5452L11.6126 19.3234C11.3988 19.5373 11.3989 19.8841 11.6129 20.0978C11.8268 20.3116 12.1739 20.3118 12.3876 20.0978L20.0985 12.387C20.3122 12.1731 20.3121 11.8263 20.0981 11.6126Z" fill="black"/> 1270</svg> 1271</span> 1272 1273 </a> 1274 1275 1276 <ul> 1277 1278 <li class="ib-sh-li-edited "> 1279 <a data-cc-animate-click href="/pages/custom-shirts">Custom Shirts</a> 1280 </li> 1281 1282 <li class="ib-sh-li-edited "> 1283 <a data-cc-animate-click href="/collections/custom-knits">Custom Knits</a> 1284 </li> 1285 1286 <li class="ib-sh-li-edited "> 1287 <a data-cc-animate-click href="/pages/custom-outerwear">Custom Outerwear</a> 1288 </li> 1289 1290 <li class="ib-sh-li-edited "> 1291 <a data-cc-animate-click href="/pages/custom-suits">Custom Suits</a> 1292 </li> 1293 1294 <li class="ib-sh-li-edited "> 1295 <a data-cc-animate-click href="/collections/custom-sport-coats">Custom Sport Coats</a> 1296 </li> 1297 1298 <li class="ib-sh-li-edited "> 1299 <a data-cc-animate-click href="/collections/custom-trousers">Custom Trousers</a> 1300 </li> 1301 1302 <li class="ib-sh-li-edited "> 1303 <a data-cc-animate-click href="https://qclothier.com/pages/custom-tux">Custom Tuxedo</a> 1304 </li> 1305 1306 <li class="ib-sh-li-edited "> 1307 <a data-cc-animate-click href="/collections/custom-jeans-old">Custom Denim</a> 1308 </li> 1309
1310 <li class="ib-sh-li-edited "> 1311 <a data-cc-animate-click href="/collections/custom-formal">Custom Formal</a> 1312 </li> 1313 1314 <li class="ib-sh-li-edited featured-link"> 1315 <a data-cc-animate-click href="https://qclothier.com/pages/gift-card-landing">Gift Cards</a> 1316 </li> 1317 1318 </ul> 1319 1320 </li> 1321 1322 <li class=" contains-children"> 1323 <a href="/pages/showcase-our-story" class="has-children column-title" aria-haspopup="true"> 1324 ABOUT 1325 1326 1327 <span class="arr arr--small"> 1328<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1329<path d="M20.0981 11.6126L12.3871 3.90154C12.1731 3.68773 11.8262 3.68799 11.6124 3.90205C11.3985 4.11612 11.3988 4.46303 11.6129 4.67683L18.3902 11.4541L4.28976 11.4544C4.14474 11.4542 4.0056 11.5119 3.90323 11.6146C3.69076 11.8278 3.69128 12.1728 3.90444 12.3853C4.00642 12.4878 4.14509 12.5455 4.28976 12.5455L18.3908 12.5452L11.6126 19.3234C11.3988 19.5373 11.3989 19.8841 11.6129 20.0978C11.8268 20.3116 12.1739 20.3118 12.3876 20.0978L20.0985 12.387C20.3122 12.1731 20.3121 11.8263 20.0981 11.6126Z" fill="black"/> 1330</svg> 1331</span> 1332 1333 </a> 1334 1335 1336 <ul> 1337 1338 <li class="ib-sh-li-edited "> 1339 <a data-cc-animate-click href="/pages/showcase-our-story">Our Story</a> 1340 </li> 1341 1342 <li class="ib-sh-li-edited "> 1343 <a data-cc-animate-click href="/pages/showcase-our-fit-guarantee">Perfect Fit Every time</a> 1344 </li> 1345 1346 <li class="ib-sh-li-edited "> 1347 <a data-cc-animate-click href="/pages/showcase-brands-we-love">Brands We Love</a> 1348 </li> 1349 1350 <li class="ib-sh-li-edited "> 1351 <a data-cc-animate-click href="/collections/custom-style-guide">Style Guide</a> 1352 </li> 1353 1354 <li class="ib-sh-li-edited "> 1355 <a data-cc-animate-click href="/pages/testimonial-page">Customer Testimonials</a> 1356 </li> 1357 1358 </ul> 1359 1360 </li> 1361 1362 1363 1364 1365 1366 1367 1368<li class="nav-ctas__cta"> 1369 1370<a data-cc-animate-click class="inner image-overlay image-overlay--bg-full" href="/pages/schedule-consult"> 1371 <div class="rimage-outer-wrapper rimage-background lazyload--manual fade-in" 1372 style="background-position: center center" 1373 data-bgset="//qclothier.com/cdn/shop/files/Q-Site-Day21798_180x.jpg?v=1638550948 180w 109h, 1374 //qclothier.com/cdn/shop/files/Q-Site-Day21798_360x.jpg?v=1638550948 360w 219h, 1375 //qclothier.com/cdn/shop/files/Q-Site-Day21798_540x.jpg?v=1638550948 540w 328h, 1376 //qclothier.com/cdn/shop/files/Q-Site-Day21798_720x.jpg?v=1638550948 720w 437h, 1377 //qclothier.com/cdn/shop/files/Q-Site-Day21798_900x.jpg?v=1638550948 900w 547h, 1378 //qclothier.com/cdn/shop/files/Q-Site-Day21798_1080x.jpg?v=1638550948 1080w 656h, 1379 //qclothier.com/cdn/shop/files/Q-Site-Day21798_1296x.jpg?v=1638550948 1296w 787h, 1380 //qclothier.com/cdn/shop/files/Q-Site-Day21798_1512x.jpg?v=1638550948 1512w 919h, 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 //qclothier.com/cdn/shop/files/Q-Site-Day21798.jpg?v=1638550948 1641w 997h" 1392 data-sizes="auto" 1393 data-parent-fit="cover"> 1394 <noscript> 1395 <div class="rimage-wrapper" style="padding-top:60.75563680682511%"> 1396 <img src="//qclothier.com/cdn/shop/files/Q-Site-Day21798_1024x1024.jpg?v=1638550948" alt="" class="rimage__image"> 1397 </div> 1398 </noscript> 1399 </div> 1400 1401 1402 <div class="overlay-type overlay position--hcenter position--vcenter"> 1403 <div class="inner"> 1404 <div> 1405 <div class="overlay__content"><div class="feature-subheader"> 1406 Wedding Season 1407 </div> 1408 1409<h2 class="line-1"> 1410 Go Custom On Your Big Day. 1411 </h2><div class="line-3">
1412 <span class="button no-hover">Schedule Consult</span> 1413 </div></div> 1414 </div> 1415 </div> 1416 </div></a> 1417</li> 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 </ul> 1441 1442 </li> 1443 1444<li class=" contains-children contains-mega-menu"> 1445 <a href="/pages/find-a-store" class=" has-children" aria-haspopup="true"> 1446 Locations 1447 </a> 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 <ul 1465 class="nav-columns rem-line 1466 nav-columns--count-1 1467 1468 1469 nav-columns--cta-count-1 " 1470 > 1471 1472 1473 <li class=" contains-children"> 1474 <a href="/pages/find-a-store" class="has-children column-title" aria-haspopup="true"> 1475 BOUTIQUES 1476 1477 1478 <span class="arr arr--small"> 1479<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 1480<path d="M20.0981 11.6126L12.3871 3.90154C12.1731 3.68773 11.8262 3.68799 11.6124 3.90205C11.3985 4.11612 11.3988 4.46303 11.6129 4.67683L18.3902 11.4541L4.28976 11.4544C4.14474 11.4542 4.0056 11.5119 3.90323 11.6146C3.69076 11.8278 3.69128 12.1728 3.90444 12.3853C4.00642 12.4878 4.14509 12.5455 4.28976 12.5455L18.3908 12.5452L11.6126 19.3234C11.3988 19.5373 11.3989 19.8841 11.6129 20.0978C11.8268 20.3116 12.1739 20.3118 12.3876 20.0978L20.0985 12.387C20.3122 12.1731 20.3121 11.8263 20.0981 11.6126Z" fill="black"/> 1481</svg> 1482</span> 1483 1484 </a> 1485 1486 1487 <ul> 1488 1489 <li class="ib-sh-li-edited "> 1490 <a data-cc-animate-click href="/pages/atlanta">Atlanta - Ponce City Market</a> 1491 </li> 1492 1493 <li class="ib-sh-li-edited "> 1494 <a data-cc-animate-click href="/pages/dallas-preston-center">Dallas - Preston Center</a> 1495 </li> 1496 1497 <li class="ib-sh-li-edited "> 1498 <a data-cc-animate-click href="/pages/dallas">Dallas - West Village</a> 1499 </li> 1500 1501 <li class="ib-sh-li-edited "> 1502 <a data-cc-animate-click href="/pages/fort-worth">Fort Worth - The Shop at Clearfork</a> 1503 </li> 1504 1505 <li class="ib-sh-li-edited "> 1506 <a data-cc-animate-click href="/pages/houston">Houston - Shops at Arrive</a> 1507 </li> 1508 1509 <li class="ib-sh-li-edited "> 1510 <a data-cc-animate-click href="/pages/little-rock">Little Rock - Promenade at Chenal</a> 1511 </li> 1512 1513 <li class="ib-sh-li-edited "> 1514 <a data-cc-animate-click href="/pages/new-orleans">New Orleans - Canal Place</a> 1515 </li> 1516
1517 <li class="ib-sh-li-edited "> 1518 <a data-cc-animate-click href="/pages/oklahoma-city">Oklahoma City - Classen Curve</a> 1519 </li> 1520 1521 <li class="ib-sh-li-edited "> 1522 <a data-cc-animate-click href="/pages/nashville">Nashville - The Gulch</a> 1523 </li> 1524 1525 <li class="ib-sh-li-edited "> 1526 <a data-cc-animate-click href="/pages/phoenix">Phoenix - Biltmore Fashion Park</a> 1527 </li> 1528 1529 <li class="ib-sh-li-edited "> 1530 <a data-cc-animate-click href="/pages/tulsa">Tulsa - Utica Square</a> 1531 </li> 1532 1533 </ul> 1534 1535 </li> 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547<li class="nav-ctas__cta"> 1548 1549<a data-cc-animate-click class="inner image-overlay image-overlay--bg-full" href="/pages/schedule-consult"> 1550 <div class="rimage-outer-wrapper rimage-background lazyload--manual fade-in" 1551 style="background-position: center center" 1552 data-bgset="//qclothier.com/cdn/shop/files/IMG_5797_31ed0971-abf9-4207-9b41-c44d4be108ac_180x.jpg?v=1638476081 180w 176h, 1553 //qclothier.com/cdn/shop/files/IMG_5797_31ed0971-abf9-4207-9b41-c44d4be108ac_360x.jpg?v=1638476081 360w 352h, 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 //qclothier.com/cdn/shop/files/IMG_5797_31ed0971-abf9-4207-9b41-c44d4be108ac.jpg?v=1638476081 475w 465h" 1571 data-sizes="auto" 1572 data-parent-fit="cover"> 1573 <noscript> 1574 <div class="rimage-wrapper" style="padding-top:97.89473684210527%"> 1575 <img src="//qclothier.com/cdn/shop/files/IMG_5797_31ed0971-abf9-4207-9b41-c44d4be108ac_1024x1024.jpg?v=1638476081" alt="" class="rimage__image"> 1576 </div> 1577 </noscript> 1578 </div> 1579 1580 1581 <div class="overlay-type overlay position--hcenter position--vcenter"> 1582 <div class="inner"> 1583 <div> 1584 <div class="overlay__content"> 1585<h2 class="line-1"> 1586 NOW OPEN 1587 </h2><div class="rte line-2"> 1588 <p>Nashville - The Gulch</p> 1589 </div><div class="line-3"> 1590 <span class="button no-hover">Schedule Consult</span> 1591 </div></div> 1592 </div> 1593 </div> 1594 </div></a> 1595</li> 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 </ul> 1615 1616 </li> 1617 1618<li class=""> 1619 <a data-cc-animate-click href="/pages/schedule-consult" class=" " > 1620 Schedule Fitting 1621 </a> 1622 1623 1624 </li> 1625 1626<li class=""> 1627 <a data-cc-animate-click href="/pages/ready-to-wear" class=" " > 1628 Ready To Wear 1629 </a> 1630 1631 1632 </li> 1633 1634<li class=""> 1635 <a data-cc-animate-click href="https://qclothier.com/pages/try-our-style-quiz" class=" " > 1636 Style Quiz 1637 </a> 1638 1639 1640 </li> 1641 1642<li class=" featured-link"> 1643 <a data-cc-animate-click href="https://qclothier.com/pages/gift-card-landing" class=" " > 1644 Gift Cards 1645 </a> 1646 1647 1648 </li> 1649 1650<li class=""> 1651 <a data-cc-animate-click href="/pages/contact-us" class=" " > 1652 Contact Us 1653 </a> 1654 1655 1656 </li> 1657 1658 </ul> 1659 </div> 1660 </div> 1661 </div> 1662 1663 1664 1665 <div class="nav-right-side"> 1666 1667 1668 1669 1670 1671 <a data-cc-animate-click href="/account" class="nav-account"> 1672 Account 1673 </a> 1674 1675 1676 <a 1677 class="cart nav-search" 1678 href="/search" 1679 aria-label="Search" 1680 data-modal-toggle="#search-modal" 1681 > 1682 <svg viewBox="0 0 29 29" version="1.1" xmlns="http://www.w3.org/2000/svg"> 1683 <title>Search</title> 1684 <g stroke="none" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"> 1685 <g transform="translate(-1335.000000, -30.000000)" stroke="currentColor"> 1686 <g transform="translate(1336.000000, 31.000000)"> 1687 <circle cx="12" cy="12" r="12"></circle> 1688 <line x1="27" y1="27" x2="20.475" y2="20.475" id="Path"></line> 1689 </g> 1690 </g> 1691 </g> 1692</svg> 1693
1694 <span class="text-link">Search</span> 1695 </a> 1696 1697 <a 1698 data-cc-animate-click 1699 class="cart cart-icon--basket1" 1700 href="/cart" 1701 aria-label="Cart" 1702 > 1703 1704 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23.96 22"> 1705 <title>Cart</title> 1706 <g data-name="Layer 2"> 1707 <g data-name="Layer 1"> 1708 <path d="M22.7,8l-3,13H4.3l-3-13H22.7M24,7H0L3.51,22H20.45L24,7Z"/> 1709 <rect x="11.48" width="1" height="7"/> 1710 </g> 1711 </g> 1712</svg> 1713 1714 1715 <div>0</div> 1716 <span class="text-link">Cart 1717 </span> 1718 </a> 1719 </div> 1720 </div> 1721 </div> 1722 1723 <nav id="page-menu" class="theme-modal nav-uses-modal"> 1724 <div class="inner"> 1725 <a href="#" class="no-js-only">Close navigation</a> 1726 1727 <div class="nav-container"> 1728 <div class="nav-body container growth-area" data-root-nav="true"> 1729 <div class="nav main-nav" role="navigation" aria-label="Primary"> 1730 <ul> 1731 1732 <li class=" "> 1733 <a 1734 href="/collections/custom-style-guide" 1735 1736 aria-haspopup="true" 1737 1738 > 1739 <span>Explore Custom</span> 1740 </a> 1741 1742 1743 <ul> 1744 1745 1746 <li class=" main-nav__mega-title"> 1747 <a 1748 href="/collections/custom-style-guide" 1749 1750 aria-haspopup="true" 1751 1752 > 1753 <span>EXPLORE</span> 1754 </a> 1755 </li> 1756 1757 1758 <li class=" "> 1759 <a data-cc-animate-click href="/pages/custom-shirts"> 1760 <span>Custom Shirts</span> 1761 </a> 1762 </li> 1763 1764 <li class=" "> 1765 <a data-cc-animate-click href="/collections/custom-knits"> 1766 <span>Custom Knits</span> 1767 </a> 1768 </li> 1769 1770 <li class=" "> 1771 <a data-cc-animate-click href="/pages/custom-outerwear"> 1772 <span>Custom Outerwear</span> 1773 </a> 1774 </li> 1775 1776 <li class=" "> 1777 <a data-cc-animate-click href="/pages/custom-suits"> 1778 <span>Custom Suits</span> 1779 </a> 1780 </li> 1781 1782 <li class=" "> 1783 <a data-cc-animate-click href="/collections/custom-sport-coats"> 1784 <span>Custom Sport Coats</span> 1785 </a> 1786 </li> 1787 1788 <li class=" "> 1789 <a data-cc-animate-click href="/collections/custom-trousers"> 1790 <span>Custom Trousers</span> 1791 </a> 1792 </li> 1793 1794 <li class=" "> 1795 <a data-cc-animate-click href="https://qclothier.com/pages/custom-tux"> 1796 <span>Custom Tuxedo</span> 1797 </a> 1798 </li> 1799 1800 <li class=" "> 1801 <a data-cc-animate-click href="/collections/custom-jeans-old">
1802 <span>Custom Denim</span> 1803 </a> 1804 </li> 1805 1806 <li class=" "> 1807 <a data-cc-animate-click href="/collections/custom-formal"> 1808 <span>Custom Formal</span> 1809 </a> 1810 </li> 1811 1812 <li class=" featured-link"> 1813 <a data-cc-animate-click href="https://qclothier.com/pages/gift-card-landing"> 1814 <span>Gift Cards</span> 1815 </a> 1816 </li> 1817 1818 1819 <li class=" main-nav__mega-title"> 1820 <a 1821 href="/pages/showcase-our-story" 1822 1823 aria-haspopup="true" 1824 1825 > 1826 <span>
1826ABOUT</span> 1827 </a> 1828 </li> 1829 1830 1831 <li class=" "> 1832 <a data-cc-animate-click href="/pages/showcase-our-story"> 1833 <span>Our Story</span> 1834 </a> 1835 </li> 1836 1837 <li class=" "> 1838 <a data-cc-animate-click href="/pages/showcase-our-fit-guarantee"> 1839 <span>Perfect Fit Every time</span> 1840 </a> 1841 </li> 1842 1843 <li class=" "> 1844 <a data-cc-animate-click href="/pages/showcase-brands-we-love"> 1845 <span>Brands We Love</span> 1846 </a> 1847 </li> 1848 1849 <li class=" "> 1850 <a data-cc-animate-click href="/collections/custom-style-guide"> 1851 <span>Style Guide</span> 1852 </a> 1853 </li> 1854 1855 <li class=" "> 1856 <a data-cc-animate-click href="/pages/testimonial-page"> 1857 <span>Customer Testimonials</span> 1858 </a> 1859 </li> 1860 1861 1862 1863 1864 </ul> 1865 1866 </li> 1867 1868 <li class=" "> 1869 <a 1870 href="/pages/find-a-store" 1871 1872 aria-haspopup="true" 1873 1874 > 1875 <span>Locations</span> 1876 </a> 1877 1878 1879 <ul> 1880 1881 1882 <li class=" main-nav__mega-title"> 1883 <a 1884 href="/pages/find-a-store" 1885 1886 aria-haspopup="true" 1887 1888 > 1889 <span>BOUTIQUES</span> 1890 </a> 1891 </li> 1892 1893 1894 <li class=" "> 1895 <a data-cc-animate-click href="/pages/atlanta"> 1896 <span>Atlanta - Ponce City Market</span> 1897 </a> 1898 </li> 1899 1900 <li class=" "> 1901 <a data-cc-animate-click href="/pages/dallas-preston-center"> 1902 <span>Dallas - Preston Center</span> 1903 </a> 1904 </li> 1905 1906 <li class=" "> 1907 <a data-cc-animate-click href="/pages/dallas"> 1908 <span>Dallas - West Village</span> 1909 </a> 1910 </li> 1911 1912 <li class=" "> 1913 <a data-cc-animate-click href="/pages/fort-worth"> 1914 <span>Fort Worth - The Shop at Clearfork</span> 1915 </a> 1916 </li> 1917 1918 <li class=" "> 1919 <a data-cc-animate-click href="/pages/houston"> 1920 <span>Houston - Shops at Arrive</span> 1921 </a> 1922 </li> 1923 1924 <li class=" "> 1925 <a data-cc-animate-click href="/pages/little-rock">
1926 <span>Little Rock - Promenade at Chenal</span> 1927 </a> 1928 </li> 1929 1930 <li class=" "> 1931 <a data-cc-animate-click href="/pages/new-orleans"> 1932 <span>New Orleans - Canal Place</span> 1933 </a> 1934 </li> 1935 1936 <li class=" "> 1937 <a data-cc-animate-click href="/pages/oklahoma-city"> 1938 <span>Oklahoma City - Classen Curve</span> 1939 </a> 1940 </li> 1941 1942 <li class=" "> 1943 <a data-cc-animate-click href="/pages/nashville"> 1944 <span>Nashville - The Gulch</span> 1945 </a> 1946 </li> 1947 1948 <li class=" "> 1949 <a data-cc-animate-click href="/pages/phoenix"> 1950 <span>Phoenix - Biltmore Fashion Park</span> 1951 </a> 1952 </li> 1953 1954 <li class=" "> 1955 <a data-cc-animate-click href="/pages/tulsa"> 1956 <span>Tulsa - Utica Square</span> 1957 </a> 1958 </li> 1959 1960 1961 1962 1963 </ul> 1964 1965 </li> 1966 1967 <li class=" "> 1968 <a 1969 href="/pages/schedule-consult" 1970 1971 data-cc-animate-click 1972 1973 > 1974 <span>Schedule Fitting</span> 1975 </a> 1976 1977 1978 </li> 1979 1980 <li class=" "> 1981 <a 1982 href="/pages/ready-to-wear" 1983 1984 data-cc-animate-click 1985 1986 > 1987 <span>Ready To Wear</span> 1988 </a> 1989 1990 1991 </li> 1992 1993 <li class=" "> 1994 <a 1995 href="https://qclothier.com/pages/try-our-style-quiz" 1996 1997 data-cc-animate-click 1998 1999 > 2000 <span>Style Quiz</span> 2001 </a> 2002 2003 2004 </li> 2005 2006 <li class=" featured-link"> 2007 <a 2008 href="https://qclothier.com/pages/gift-card-landing" 2009 2010 data-cc-animate-click 2011 2012 > 2013 <span>Gift Cards</span> 2014 </a> 2015 2016 2017 </li> 2018 2019 <li class=" "> 2020 <a 2021 href="/pages/contact-us" 2022 2023 data-cc-animate-click 2024 2025 > 2026 <span>Contact Us</span> 2027 </a> 2028 2029 2030 </li> 2031 2032 </ul> 2033 </div> 2034 </div> 2035 2036 <div class="nav-footer-links"> 2037 2038 2039 2040 <div class="nav-footer-links__link"> 2041 <a data-cc-animate-click href="/account">Account</a> 2042 </div> 2043 2044 2045 2046 2047 2048 </div> 2049 2050 <div class="nav-ctas"> 2051 2052 2053 2054 2055 <div 2056 class="nav-ctas__container" 2057 data-for-nav-item="explore custom" 2058 2059 > 2060 <!-- CTA --> 2061 </div> 2062 2063 2064 2065 2066 <div 2067 class="nav-ctas__container" 2068 data-for-nav-item="locations" 2069 2070 > 2071 <!-- CTA --> 2072 </div> 2073 2074 2075 2076 2077 <div 2078 class="nav-ctas__container" 2079 data-for-nav-item="_root" 2080 2081 > 2082 <!-- CTA --> 2083 </div> 2084 2085 2086 2087 2088 <div 2089 class="nav-ctas__container" 2090 data-for-nav-item="_root" 2091 2092 > 2093 <!-- CTA --> 2094 </div> 2095 2096 2097 2098 2099 <div 2100 class="nav-ctas__container" 2101 data-for-nav-item="_root" 2102 2103 > 2104 <!-- CTA --> 2105 </div> 2106 2107 </div> 2108 </div> 2109 </div> 2110 </nav> 2111 </div> 2112 2113 2114 2115</div> 2116 2117 2118 <main id="page-content"> 2119 <div id="shopify-section-template--15596142100543__main" class="shopify-section"><div 2120 data-section-type="blog-template" 2121 class="py-medium" 2122> 2123 2124 <div class="central align-center"> 2125 <h1 class="feature-header" data-cc-animate>
2126 <span> 2127 Explore the Latest Trends with Q Clothier's Blog 2128 2129 2130 </span> 2131 </h1> 2132 </div> 2133 2134 2135 2136 <div class="wide-container half-gutter"> 2137 2138 2139 <div class="product-list-container ib-sh-blog-archive-flex"> 2140 <div class="cc-articles product-list grid--uniform mob-two-col product-list--collage"> 2141 2142 <div class="column quarter article-column"> 2143 2144 2145<a href="/blogs/blog/why-invest-in-custom-clothing-with-performance-fabrics" 2146 data-cc-animate-click 2147 class="article-block " 2148 data-cc-animate="cc-fade-in-up" 2149 2150> 2151 2152 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2153 2154 <div class="rimage-outer-wrapper" style="max-width: 1054px" 2155 2156> 2157 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:60.62618595825428%"> 2158 2159 2160 <img class="rimage__image lazyload fade-in " 2161 data-src="//qclothier.com/cdn/shop/articles/Why_Invest_in_Custom_Clothing_with_Performance_Fabrics_4ffca740-02e5-4756-b77c-79b4ba59ae1f_{width}x.jpg?v=1752054676" 2162 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2163 data-aspectratio="1.649452269170579" 2164 data-sizes="auto" 2165 alt="Why Invest in Custom Clothing with Performance Fabrics?" 2166 width="1054" 2167 height="639" 2168 > 2169 2170 <noscript> 2171 2172 <img src="//qclothier.com/cdn/shop/articles/Why_Invest_in_Custom_Clothing_with_Performance_Fabrics_4ffca740-02e5-4756-b77c-79b4ba59ae1f_1024x1024.jpg?v=1752054676" alt="Why Invest in Custom Clothing with Performance Fabrics?" class="rimage__image"> 2173 </noscript> 2174 </div> 2175</div> 2176 2177 2178 2179 2180 2181 2182 <div class="article-block__excerpt"> 2183 2184 2185 <p> 2186 2187 2188 2189 2190 2191Custom clothing offers a personalized touch that standard, off-the-rack options simply cann...</p> 2192 2193 2194 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/why-invest-in-custom-clothing-with-performance-fabrics"> 2195 Read more 2196 </span> 2197 </div> 2198 2199 </div> 2200 2201 <div class="article-block__content"> 2202 2203 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2204 2205 2206 <h3 class="article-block__title align-left">Why Invest in Custom Clothing with Performance Fabrics?</h3> 2207 2208 2209 </div> 2210</a> 2211 2212 </div> 2213 2214 <div class="column quarter article-column"> 2215 2216 2217<a href="/blogs/blog/the-importance-of-material-selection-in-custom-clothing" 2218 data-cc-animate-click 2219 class="article-block " 2220 data-cc-animate="cc-fade-in-up" 2221 2222> 2223 2224 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2225 2226 <div class="rimage-outer-wrapper" style="max-width: 1280px" 2227 2228> 2229 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:46.875%"> 2230 2231 2232 <img class="rimage__image lazyload fade-in " 2233 data-src="//qclothier.com/cdn/shop/articles/The_Importance_of_Material_Selection_in_Custom_Clothing_new_834c8db4-3be7-4ed9-a127-7bed4ff3ce4c_{width}x.webp?v=1752053312" 2234 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2235 data-aspectratio="2.1333333333333333" 2236 data-sizes="auto" 2237 alt="The Importance of Material Selection in Custom Clothing" 2238 width="1280" 2239 height="600" 2240 > 2241 2242 <noscript> 2243 2244 <img src="//qclothier.com/cdn/shop/articles/The_Importance_of_Material_Selection_in_Custom_Clothing_new_834c8db4-3be7-4ed9-a127-7bed4ff3ce4c_1024x1024.webp?v=1752053312" alt="The Importance of Material Selection in Custom Clothing" class="rimage__image"> 2245 </noscript> 2246 </div> 2247</div> 2248 2249 2250 2251 2252 2253 2254 <div class="article-block__excerpt"> 2255 2256 2257 <p> 2258 2259 2260 2261From production to marketing, fashion industry trends are always changing. Given the adaptabl...</p> 2262 2263 2264 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/the-importance-of-material-selection-in-custom-clothing"> 2265 Read more 2266 </span> 2267 </div> 2268 2269 </div> 2270 2271 <div class="article-block__content"> 2272 2273 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2274 2275 2276 <h3 class="article-block__title align-left">The Importance of Material Selection in Custom Clothing</h3> 2277 2278 2279 </div> 2280</a> 2281 2282 </div> 2283 2284 <div class="column quarter article-column"> 2285 2286 2287<a href="/blogs/blog/personal-style-and-custom-clothing-how-to-express-your-unique-identity" 2288 data-cc-animate-click 2289 class="article-block " 2290 data-cc-animate="cc-fade-in-up" 2291 2292> 2293 2294 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2295 2296 <div class="rimage-outer-wrapper" style="max-width: 1280px" 2297 2298> 2299 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:46.875%"> 2300 2301 2302 <img class="rimage__image lazyload fade-in " 2303 data-src="//qclothier.com/cdn/shop/articles/Personal_Style_and_Custom_Clothing_How_to_Express_Your_Unique_Identity_08410cb1-2f01-47c1-9402-7df53935ddf3_{width}x.webp?v=1752051667" 2304 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2305 data-aspectratio="2.1333333333333333" 2306 data-sizes="auto" 2307 alt="Personal Style and Custom Clothing: How to Express Your Unique Identity" 2308 width="1280" 2309 height="600" 2310 > 2311 2312 <noscript> 2313 2314 <img src="//qclothier.com/cdn/shop/articles/Personal_Style_and_Custom_Clothing_How_to_Express_Your_Unique_Identity_08410cb1-2f01-47c1-9402-7df53935ddf3_1024x1024.webp?v=1752051667" alt="Personal Style and Custom Clothing: How to Express Your Unique Identity" class="rimage__image"> 2315 </noscript> 2316 </div> 2317</div> 2318 2319 2320 2321 2322 2323 2324 <div class="article-block__excerpt"> 2325 2326 2327 <p> 2328 2329 2330 2331Personal style is a powerful tool that goes beyond mere fashion; it is a reflection of one’s ...</p> 2332 2333
2334 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/personal-style-and-custom-clothing-how-to-express-your-unique-identity"> 2335 Read more 2336 </span> 2337 </div> 2338 2339 </div> 2340 2341 <div class="article-block__content"> 2342 2343 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2344 2345 2346 <h3 class="article-block__title align-left">Personal Style and Custom Clothing: How to Express Your Unique Identity</h3> 2347 2348 2349 </div> 2350</a> 2351 2352 </div> 2353 2354 <div class="column quarter article-column"> 2355 2356 2357<a href="/blogs/blog/how-custom-clothing-can-transform-your-personal-brand" 2358 data-cc-animate-click 2359 class="article-block " 2360 data-cc-animate="cc-fade-in-up" 2361 2362> 2363 2364 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2365 2366 <div class="rimage-outer-wrapper" style="max-width: 1280px" 2367 2368> 2369 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:46.875%"> 2370 2371 2372 <img class="rimage__image lazyload fade-in " 2373 data-src="//qclothier.com/cdn/shop/articles/How_Custom_Clothing_Can_Transform_Your_Personal_Brand_29c68c47-2d73-4b16-8266-a854144c95eb_{width}x.webp?v=1752047537" 2374 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2375 data-aspectratio="2.1333333333333333" 2376 data-sizes="auto" 2377 alt="How Custom Clothing Can Transform Your Personal Brand" 2378 width="1280" 2379 height="600" 2380 > 2381 2382 <noscript> 2383 2384 <img src="//qclothier.com/cdn/shop/articles/How_Custom_Clothing_Can_Transform_Your_Personal_Brand_29c68c47-2d73-4b16-8266-a854144c95eb_1024x1024.webp?v=1752047537" alt="How Custom Clothing Can Transform Your Personal Brand" class="rimage__image"> 2385 </noscript> 2386 </div> 2387</div> 2388 2389 2390 2391 2392 2393 2394 <div class="article-block__excerpt"> 2395 2396 2397 <p> 2398 2399 2400 2401Your personal brand is more than just a digital presence or a polished resume – it's the tang...</p> 2402 2403 2404 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/how-custom-clothing-can-transform-your-personal-brand"> 2405 Read more 2406 </span> 2407 </div> 2408 2409 </div> 2410 2411 <div class="article-block__content"> 2412 2413 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2414 2415 2416 <h3 class="article-block__title align-left">
2416How Custom Clothing Can Transform Your Personal Brand</h3> 2417 2418 2419 </div> 2420</a> 2421 2422 </div> 2423 2424 <div class="column quarter article-column"> 2425 2426 2427<a href="/blogs/blog/why-custom-fit-is-the-key-to-perfect-style" 2428 data-cc-animate-click 2429 class="article-block " 2430 data-cc-animate="cc-fade-in-up" 2431 2432> 2433 2434 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2435 2436 <div class="rimage-outer-wrapper" style="max-width: 1280px" 2437 2438> 2439 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:46.875%"> 2440 2441 2442 <img class="rimage__image lazyload fade-in " 2443 data-src="//qclothier.com/cdn/shop/articles/Why_Custom_Fit_is_the_Key_to_Perfect_Style_c139ea2c-3206-4e8a-924b-a56c3d9c93b9_{width}x.webp?v=1752046898" 2444 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2445 data-aspectratio="2.1333333333333333" 2446 data-sizes="auto" 2447 alt="Why Custom Fit is the Key to Perfect Style" 2448 width="1280" 2449 height="600" 2450 > 2451 2452 <noscript> 2453 2454 <img src="//qclothier.com/cdn/shop/articles/Why_Custom_Fit_is_the_Key_to_Perfect_Style_c139ea2c-3206-4e8a-924b-a56c3d9c93b9_1024x1024.webp?v=1752046898" alt="Why Custom Fit is the Key to Perfect Style" class="rimage__image"> 2455 </noscript> 2456 </div> 2457</div> 2458 2459 2460 2461 2462 2463 2464 <div class="article-block__excerpt"> 2465 2466 2467 <p> 2468 2469 2470 2471The fashion industry goes behind just wearing clothes, as style is often touted as an individ...</p> 2472 2473 2474 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/why-custom-fit-is-the-key-to-perfect-style"> 2475 Read more 2476 </span> 2477 </div> 2478 2479 </div> 2480 2481 <div class="article-block__content"> 2482 2483 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2484 2485 2486 <h3 class="article-block__title align-left">Why Custom Fit is the Key to Perfect Style</h3> 2487 2488 2489 </div> 2490</a> 2491 2492 </div> 2493 2494 <div class="column quarter article-column"> 2495 2496 2497<a href="/blogs/blog/behind-the-seams-unraveling-the-process-of-creating-custom-garments" 2498 data-cc-animate-click 2499 class="article-block " 2500 data-cc-animate="cc-fade-in-up" 2501 2502> 2503 2504 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2505 2506 <div class="rimage-outer-wrapper" style="max-width: 1280px" 2507 2508> 2509 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:46.875%"> 2510 2511 2512 <img class="rimage__image lazyload fade-in " 2513 data-src="//qclothier.com/cdn/shop/articles/Behind_the_Seams_7392894d-1ade-4b63-a6cc-f1f586fc3025_{width}x.webp?v=1752045733" 2514 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2515 data-aspectratio="2.1333333333333333" 2516 data-sizes="auto" 2517 alt="Behind the Seams: Unraveling the Process of Creating Custom Garments" 2518 width="1280" 2519 height="600" 2520 > 2521 2522 <noscript> 2523 2524 <img src="//qclothier.com/cdn/shop/articles/Behind_the_Seams_7392894d-1ade-4b63-a6cc-f1f586fc3025_1024x1024.webp?v=1752045733" alt="Behind the Seams: Unraveling the Process of Creating Custom Garments" class="rimage__image"> 2525 </noscript> 2526 </div> 2527</div> 2528 2529 2530 2531 2532 2533 2534 <div class="article-block__excerpt"> 2535 2536 2537 <p> 2538 2539 2540 2541As a highly specialized sector of the broader fashion world, the custom garment industry emph...</p> 2542 2543 2544 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/behind-the-seams-unraveling-the-process-of-creating-custom-garments"> 2545 Read more 2546 </span> 2547 </div> 2548 2549 </div> 2550 2551 <div class="article-block__content"> 2552 2553 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2554 2555 2556 <h3 class="article-block__title align-left">Behind the Seams: Unraveling the Process of Creating Custom Garments</h3> 2557 2558 2559 </div> 2560</a> 2561 2562 </div> 2563 2564 <div class="column quarter article-column"> 2565 2566 2567<a href="/blogs/blog/tailored-trends-the-evolution-of-custom-clothing-in-modern-fashion" 2568 data-cc-animate-click 2569 class="article-block " 2570 data-cc-animate="cc-fade-in-up" 2571 2572> 2573 2574 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2575 2576 <div class="rimage-outer-wrapper" style="max-width: 1200px" 2577
2578> 2579 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:66.66666666666666%"> 2580 2581 2582 <img class="rimage__image lazyload fade-in " 2583 data-src="//qclothier.com/cdn/shop/articles/Tailored_Trends_f78c0cd1-d975-4711-91e5-9d05238609d8_{width}x.webp?v=1752045161" 2584 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2585 data-aspectratio="1.5" 2586 data-sizes="auto" 2587 alt="Tailored Trends" 2588 width="1200" 2589 height="800" 2590 > 2591 2592 <noscript> 2593 2594 <img src="//qclothier.com/cdn/shop/articles/Tailored_Trends_f78c0cd1-d975-4711-91e5-9d05238609d8_1024x1024.webp?v=1752045161" alt="Tailored Trends" class="rimage__image"> 2595 </noscript> 2596 </div> 2597</div> 2598 2599 2600 2601 2602 2603 2604 <div class="article-block__excerpt"> 2605 2606 2607 <p> 2608 2609 2610 2611Always changing and evolving, the modern ready-to-wear fashion industry has come a long way f...</p> 2612 2613 2614 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/tailored-trends-the-evolution-of-custom-clothing-in-modern-fashion"> 2615 Read more 2616 </span> 2617 </div> 2618 2619 </div> 2620 2621 <div class="article-block__content"> 2622 2623 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2624 2625 2626 <h3 class="article-block__title align-left">Tailored Trends: The Evolution of Custom Clothing in Modern Fashion</h3> 2627 2628 2629 </div> 2630</a> 2631 2632 </div> 2633 2634 <div class="column quarter article-column"> 2635 2636 2637<a href="/blogs/blog/how-to-choose-the-right-fabric-for-your-custom-suit" 2638 data-cc-animate-click 2639 class="article-block " 2640 data-cc-animate="cc-fade-in-up" 2641 2642> 2643 2644 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2645 2646 <div class="rimage-outer-wrapper" style="max-width: 1062px" 2647 2648> 2649 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:56.59133709981168%"> 2650 2651 2652 <img class="rimage__image lazyload fade-in " 2653 data-src="//qclothier.com/cdn/shop/articles/Right_Fabric_for_Your_Custom_Suit_f4cfde1e-86d8-4a62-898a-9f327fbda576_{width}x.webp?v=1751872728" 2654 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2655 data-aspectratio="1.767054908485857" 2656 data-sizes="auto" 2657 alt="How to Choose the Right Fabric for Your Custom Suit" 2658 width="1062" 2659 height="601" 2660 > 2661 2662 <noscript> 2663 2664 <img src="//qclothier.com/cdn/shop/articles/Right_Fabric_for_Your_Custom_Suit_f4cfde1e-86d8-4a62-898a-9f327fbda576_1024x1024.webp?v=1751872728" alt="How to Choose the Right Fabric for Your Custom Suit" class="rimage__image"> 2665 </noscript> 2666 </div> 2667</div> 2668 2669 2670 2671 2672 2673 2674 <div class="article-block__excerpt"> 2675 2676 2677 <p> 2678 2679 2680 2681Choosing the right fabric is one of the most important decisions when designing a custom suit...</p> 2682 2683 2684 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/how-to-choose-the-right-fabric-for-your-custom-suit"> 2685 Read more 2686 </span> 2687 </div> 2688 2689 </div> 2690 2691 <div class="article-block__content"> 2692 2693 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2694 2695 2696 <h3 class="article-block__title align-left">
2696How to Choose the Right Fabric for Your Custom Suit</h3> 2697 2698 2699 </div> 2700</a> 2701 2702 </div> 2703 2704 <div class="column quarter article-column"> 2705 2706 2707<a href="/blogs/blog/custom-suits-vs-off-the-rack-why-you-should-choose-tailored" 2708 data-cc-animate-click 2709 class="article-block " 2710 data-cc-animate="cc-fade-in-up" 2711 2712> 2713 2714 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2715 2716 <div class="rimage-outer-wrapper" style="max-width: 1062px" 2717 2718> 2719 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:56.59133709981168%"> 2720 2721 2722 <img class="rimage__image lazyload fade-in " 2723 data-src="//qclothier.com/cdn/shop/articles/Custom_Suits_vs._Off-the-Rack_Banner_eb077219-1edd-4d83-9140-a811319343e6_{width}x.webp?v=1751872061" 2724 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2725 data-aspectratio="1.767054908485857" 2726 data-sizes="auto" 2727 alt="Custom Suits vs. Off-the-Rack: Why You Should Choose Tailored" 2728 width="1062" 2729 height="601" 2730 > 2731 2732 <noscript> 2733 2734 <img src="//qclothier.com/cdn/shop/articles/Custom_Suits_vs._Off-the-Rack_Banner_eb077219-1edd-4d83-9140-a811319343e6_1024x1024.webp?v=1751872061" alt="Custom Suits vs. Off-the-Rack: Why You Should Choose Tailored" class="rimage__image"> 2735 </noscript> 2736 </div> 2737</div> 2738 2739 2740 2741 2742 2743 2744 <div class="article-block__excerpt"> 2745 2746 2747 <p> 2748 2749 2750 2751A well-fitting suit has long been a symbol of professionalism, confidence, and style. Whether...</p> 2752 2753 2754 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/custom-suits-vs-off-the-rack-why-you-should-choose-tailored"> 2755 Read more 2756 </span> 2757 </div> 2758 2759 </div> 2760 2761 <div class="article-block__content"> 2762 2763 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2764 2765 2766 <h3 class="article-block__title align-left">Custom Suits vs. Off-the-Rack: Why You Should Choose Tailored</h3> 2767 2768 2769 </div> 2770</a> 2771 2772 </div> 2773 2774 <div class="column quarter article-column"> 2775 2776 2777<a href="/blogs/blog/sustainable-modern-fashion-how-to-build-an-eco-friendly-wardrobe" 2778 data-cc-animate-click 2779 class="article-block " 2780 data-cc-animate="cc-fade-in-up" 2781 2782> 2783 2784 <div class="article-block__image article-block__image--natural image-overlay image-overlay--bg-full"> 2785 2786 <div class="rimage-outer-wrapper" style="max-width: 1062px" 2787 2788> 2789 <div class="rimage-wrapper lazyload--placeholder" style="padding-top:56.59133709981168%"> 2790 2791 2792 <img class="rimage__image lazyload fade-in " 2793 data-src="//qclothier.com/cdn/shop/articles/Sustainable_Modern_Fashion_Banner_260f180e-82bd-4887-b7f7-99b48f0e03e5_{width}x.webp?v=1752044504" 2794 data-widths="[460, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" 2795 data-aspectratio="1.767054908485857" 2796 data-sizes="auto" 2797 alt="Sustainable Modern Fashion: How to Build an Eco-Friendly Wardrobe" 2798 width="1062" 2799 height="601" 2800 > 2801 2802 <noscript> 2803 2804 <img src="//qclothier.com/cdn/shop/articles/Sustainable_Modern_Fashion_Banner_260f180e-82bd-4887-b7f7-99b48f0e03e5_1024x1024.webp?v=1752044504" alt="Sustainable Modern Fashion: How to Build an Eco-Friendly Wardrobe" class="rimage__image"> 2805 </noscript> 2806 </div> 2807</div> 2808 2809 2810 2811 2812 2813 2814 <div class="article-block__excerpt"> 2815 2816 2817 <p> 2818 2819 2820 2821The global fashion industry, particularly the fast fashion sector, is one of the most polluti...</p> 2822 2823 2824 <span data-cc-animate class="button alt no-hover" href="/blogs/blog/sustainable-modern-fashion-how-to-build-an-eco-friendly-wardrobe"> 2825 Read more 2826 </span> 2827 </div> 2828 2829 </div> 2830 2831 <div class="article-block__content"> 2832 2833 <div class="article-block__meta "><time datetime="2025-10-30" class="feature-subheader">30 Oct '25</time></div> 2834 2835 2836 <h3 class="article-block__title align-left">Sustainable Modern Fashion: How to Build an Eco-Friendly Wardrobe</h3> 2837 2838 2839 </div> 2840</a> 2841 2842 </div> 2843 2844 </div> 2845 2846 2847 <div class="pagination central content" data-cc-animate> 2848 2849 2850
2851 <span class="page current">1</span> <span class="page"><a href="/blogs/blog?page=2" title="">2</a></span> <span class="page"><a href="/blogs/blog?page=3" title="">3</a></span> <span class="deco">…</span> <span class="page"><a href="/blogs/blog?page=5" title="">5</a></span> <span class="next"><a href="/blogs/blog?page=2" title="">Older articles »</a></span> 2852 </div> 2853 2854 </div> 2855 </div> 2856 2857</div> 2858 2859<!-- 2860
2860<script> 2861 let arrayofstagingblog = [ 2862 'https://qclothier.com/blogs/blog/custom-clothing-a-sustainable-approach-to-fashion', 2863 'https://qclothier.com/blogs/blog/custom-clothing-a-sustainable-approach-to-fashion/' 2864 ]; 2865 2866 // Select all elements with the class 'article-index' 2867 let blogDivs = document.querySelectorAll('.article-column'); 2868 2869 blogDivs.forEach(function(blogDiv) { 2870 let readMoreLink = blogDiv.querySelector('.article-column a'); 2871 if (readMoreLink && arrayofstagingblog.includes(readMoreLink.href)) { 2872 blogDiv.remove(); 2873 } 2874 }); 2875 </script>
2875 2876--> 2877 2878<style> @media(min-width:900px){#shopify-section-template--15596142100543__main .article-column{width:50%;}} </style></div> 2879 </main> 2880 2881
2881<script> 2882 var firstSection = document.body.querySelector('#page-content .shopify-section:first-child'); 2883 if (firstSection) { 2884 var firstBgSet = firstSection.querySelector('[data-bgset]'); 2885 2886 if (firstBgSet) { 2887 var bgSets = firstBgSet.dataset.bgset.split(','); 2888 if (bgSets) { 2889 for (var i = 0; i < bgSets.length; i++) { 2890 var widthMatch = bgSets[i].match(/ [0-9]+w/g); 2891 var heightMatch = bgSets[i].match(/ [0-9]+h/g); 2892 2893 if (widthMatch && heightMatch) { 2894 var width = parseInt(widthMatch[0].replace('w', '').trim()); 2895 var height = parseInt(heightMatch[0].replace('h', '').trim()); 2896 2897 if (width >= window.innerWidth && height >= window.innerHeight) { 2898 firstBgSet.style.backgroundImage = "url('" + bgSets[i].trim().split(' ')[0] + "')"; 2899 firstBgSet.classList.remove('fade-in'); 2900 break; 2901 } 2902 } 2903 } 2904 } 2905 } else if (firstSection.querySelector('[data-src]')) { 2906 var firstDataSrc = firstSection.querySelector('[data-src]'); 2907 var widths = JSON.parse(firstDataSrc.dataset.widths); 2908 for (var i = 0; i < widths.length; i++) { 2909 var width = parseInt(widths[i]); 2910 if (width >= window.innerWidth) { 2911 firstDataSrc.setAttribute('src', firstDataSrc.dataset.src.replace('{width}', width)); 2912 firstDataSrc.classList.remove('fade-in'); 2913 break; 2914 } 2915 } 2916 } 2917 } 2918 </script>
2918 2919 2920 <div id="shopify-section-popup" class="shopify-section section-popup"> 2921 2922 2923</div> 2924 2925 <div id="shopify-section-footer" class="shopify-section section-footer"><style> 2926 /* This css is added to remove the underline from the list items on the footer */ 2927 ul.ib-rb-footer-none li a {text-decoration: none !important;} 2928</style> 2929<div data-section-type="footer"> 2930 2931 <div class="wide-container section-footer__row-container" role="navigation" aria-label="Secondary navigation"> 2932 <div class="section-footer__row section-footer__row--blocks" data-num-blocks="4"> 2933 2934 2935 <div class="section-footer__row__col section-footer__text-block section-footer__text-block--with-text"> 2936 2937<p class="section-footer__title no-wrap">Q CLOTHIER</p> 2938 2939 2940 2941 <div class="section-footer__text"><p>A Personalized Custom Shopping Experience like no other.</p></div> 2942 2943 2944 2945 2946 2947 <div class="section-footer__text-block__social"> 2948 2949 2950 2951 <div class="social-links "> 2952 <ul class="social-links__list"> 2953 2954 <li><a aria-label="Twitter" class="twitter" target="_blank" rel="noopener" href="https://twitter.com/q_clothier?lang=en"><svg width="48px" height="40px" viewBox="0 0 48 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2955 <title>Twitter</title> 2956 <defs></defs> 2957 <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 2958 <g transform="translate(-240.000000, -299.000000)" fill="#000000"> 2959 <path d="M288,303.735283 C286.236309,304.538462 284.337383,305.081618 282.345483,305.324305 C284.379644,304.076201 285.940482,302.097147 286.675823,299.739617 C284.771263,300.895269 282.666667,301.736006 280.418384,302.18671 C278.626519,300.224991 276.065504,299 273.231203,299 C267.796443,299 263.387216,303.521488 263.387216,309.097508 C263.387216,309.88913 263.471738,310.657638 263.640782,311.397255 C255.456242,310.975442 248.201444,306.959552 243.341433,300.843265 C242.493397,302.339834 242.008804,304.076201 242.008804,305.925244 C242.008804,309.426869 243.747139,312.518238 246.389857,314.329722 C244.778306,314.280607 243.256911,313.821235 241.9271,313.070061 L241.9271,313.194294 C241.9271,318.08848 245.322064,322.17082 249.8299,323.095341 C249.004402,323.33225 248.133826,323.450704 247.235077,323.450704 C246.601162,323.450704 245.981335,323.390033 245.381229,323.271578 C246.634971,327.28169 250.269414,330.2026 254.580032,330.280607 C251.210424,332.99061 246.961789,334.605634 242.349709,334.605634 C241.555203,334.605634 240.769149,334.559408 240,334.466956 C244.358514,337.327194 249.53689,339 255.095615,339 C273.211481,339 283.114633,323.615385 283.114633,310.270495 C283.114633,309.831347 283.106181,309.392199 283.089276,308.961719 C285.013559,307.537378 286.684275,305.760563 288,303.735283"></path> 2960 </g> 2961 <g transform="translate(-1332.000000, -476.000000)"></g> 2962 </g> 2963</svg></a></li> 2964 2965 2966 <li><a aria-label="Facebook" class="facebook" target="_blank" rel="noopener" href="https://www.facebook.com/QClothier"><svg viewBox="0 0 9 17"> 2967 <path d="M5.842 17V9.246h2.653l.398-3.023h-3.05v-1.93c0-.874.246-1.47 1.526-1.47H9V.118C8.718.082 7.75 0 6.623 0 4.27 0 2.66 1.408 2.66 3.994v2.23H0v3.022h2.66V17h3.182z"></path> 2968</svg> 2969</a></li> 2970 2971 2972 <li><a aria-label="Youtube" class="youtube" target="_blank" rel="noopener" href="https://www.youtube.com/@qclothier"><svg width="48px" height="34px" viewBox="0 0 48 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2973 <title>Youtube</title> 2974 <defs></defs> 2975 <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 2976 <g transform="translate(-567.000000, -302.000000)" fill="#000000"> 2977 <path d="M586.044,325.269916 L586.0425,311.687742 L599.0115,318.502244 L586.044,325.269916 Z M614.52,309.334163 C614.52,309.334163 614.0505,306.003199 612.612,304.536366 C610.7865,302.610299 608.7405,302.601235 607.803,302.489448 C601.086,302 591.0105,302 591.0105,302 L590.9895,302 C590.9895,302 580.914,302 574.197,302.489448 C573.258,302.601235 571.2135,302.610299 569.3865,304.536366 C567.948,306.003199 567.48,309.334163 567.48,309.334163 C567.48,309.334163 567,313.246723 567,317.157773 L567,320.82561 C567,324.73817 567.48,328.64922 567.48,328.64922 C567.48,328.64922 567.948,331.980184 569.3865,333.447016 C571.2135,335.373084 573.612,335.312658 574.68,335.513574 C578.52,335.885191 591,336 591,336 C591,336 601.086,335.984894 607.803,335.495446 C608.7405,335.382148 610.7865,335.373084 612.612,333.447016 C614.0505,331.980184 614.52,328.64922 614.52,328.64922 C614.52,328.64922 615,324.73817 615,320.82561 L615,317.157773 C615,313.246723 614.52,309.334163 614.52,309.334163 L614.52,309.334163 Z"></path> 2978 </g> 2979 <g transform="translate(-1659.000000, -479.000000)"></g> 2980 </g> 2981</svg></a></li> 2982 2983 2984 2985 <li><a aria-label="Instagram" class="instagram" target="_blank" rel="noopener" href="https://instagram.com/qclothier"><svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 2986 <title>Instagram</title> 2987 <defs></defs> 2988 <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
2989 <g transform="translate(-642.000000, -295.000000)" fill="#000000"> 2990 <path d="M666.000048,295 C659.481991,295 658.664686,295.027628 656.104831,295.144427 C653.550311,295.260939 651.805665,295.666687 650.279088,296.260017 C648.700876,296.873258 647.362454,297.693897 646.028128,299.028128 C644.693897,300.362454 643.873258,301.700876 643.260017,303.279088 C642.666687,304.805665 642.260939,306.550311 642.144427,309.104831 C642.027628,311.664686 642,312.481991 642,319.000048 C642,325.518009 642.027628,326.335314 642.144427,328.895169 C642.260939,331.449689 642.666687,333.194335 643.260017,334.720912 C643.873258,336.299124 644.693897,337.637546 646.028128,338.971872 C647.362454,340.306103 648.700876,341.126742 650.279088,341.740079 C651.805665,342.333313 653.550311,342.739061 656.104831,342.855573 C658.664686,342.972372 659.481991,343 666.000048,343 C672.518009,343 673.335314,342.972372 675.895169,342.855573 C678.449689,342.739061 680.194335,342.333313 681.720912,341.740079 C683.299124,341.126742 684.637546,340.306103 685.971872,338.971872 C687.306103,337.637546 688.126742,336.299124 688.740079,334.720912 C689.333313,333.194335 689.739061,331.449689 689.855573,328.895169 C689.972372,326.335314 690,325.518009 690,319.000048 C690,312.481991 689.972372,311.664686 689.855573,309.104831 C689.739061,306.550311 689.333313,304.805665 688.740079,303.279088 C688.126742,301.700876 687.306103,300.362454 685.971872,299.028128 C684.637546,297.693897 683.299124,296.873258 681.720912,296.260017 C680.194335,295.666687 678.449689,295.260939 675.895169,295.144427 C673.335314,295.027628 672.518009,295 666.000048,295 Z M666.000048,299.324317 C672.40826,299.324317 673.167356,299.348801 675.69806,299.464266 C678.038036,299.570966 679.308818,299.961946 680.154513,300.290621 C681.274771,300.725997 682.074262,301.246066 682.91405,302.08595 C683.753934,302.925738 684.274003,303.725229 684.709379,304.845487 C685.038054,305.691182 685.429034,306.961964 685.535734,309.30194 C685.651199,311.832644 685.675683,312.59174 685.675683,319.000048 C685.675683,325.40826 685.651199,326.167356 685.535734,328.69806 C685.429034,331.038036 685.038054,332.308818 684.709379,333.154513 C684.274003,334.274771 683.753934,335.074262 682.91405,335.91405 C682.074262,336.753934 681.274771,337.274003 680.154513,337.709379 C679.308818,338.038054 678.038036,338.429034 675.69806,338.535734 C673.167737,338.651199 672.408736,338.675683 666.000048,338.675683 C659.591264,338.675683 658.832358,338.651199 656.30194,338.535734 C653.961964,338.429034 652.691182,338.038054 651.845487,337.709379 C650.725229,337.274003 649.925738,336.753934 649.08595,335.91405 C648.246161,335.074262 647.725997,334.274771 647.290621,333.154513 C646.961946,332.308818 646.570966,331.038036 646.464266,328.69806 C646.348801,326.167356 646.324317,325.40826 646.324317,319.000048 C646.324317,312.59174 646.348801,311.832644 646.464266,309.30194 C646.570966,306.961964 646.961946,305.691182 647.290621,304.845487 C647.725997,303.725229 648.246066,302.925738 649.08595,302.08595 C649.925738,301.246066 650.725229,300.725997 651.845487,300.290621 C652.691182,299.961946 653.961964,299.570966 656.30194,299.464266 C658.832644,299.348801 659.59174,299.324317 666.000048,299.324317 Z M666.000048,306.675683 C659.193424,306.675683 653.675683,312.193424 653.675683,319.000048 C653.675683,325.806576 659.193424,331.324317 666.000048,331.324317 C672.806576,331.324317 678.324317,325.806576 678.324317,319.000048 C678.324317,312.193424 672.806576,306.675683 666.000048,306.675683 Z M666.000048,327 C661.581701,327 658,323.418299 658,319.000048 C658,314.581701 661.581701,311 666.000048,311 C670.418299,311 674,314.581701 674,319.000048 C674,323.418299 670.418299,327 666.000048,327 Z M681.691284,306.188768 C681.691284,307.779365 680.401829,309.068724 678.811232,309.068724 C677.22073,309.068724 675.931276,307.779365 675.931276,306.188768 C675.931276,304.598171 677.22073,303.308716 678.811232,303.308716 C680.401829,303.308716 681.691284,304.598171 681.691284,306.188768 Z"></path> 2991 </g> 2992 <g transform="translate(-1734.000000, -472.000000)"></g> 2993 </g> 2994</svg></a></li> 2995 2996 2997 2998 2999 3000 <li> 3001 <a aria-label="Visit us on our LinkedIn page" class="social-custom" target="_blank" rel="noopener" href="https://www.linkedin.com/company/q-custom-clothier"> 3002 <img src="//qclothier.com/cdn/shop/files/linkedin-2-48_x30.png?v=1698236878" alt="Visit us on our LinkedIn page" width="48" height="48"/> 3003 </a> 3004 </li> 3005 3006 </ul> 3007 </div> 3008 3009 3010 </div> 3011 3012 </div> 3013 3014 3015 3016 3017 3018 <div class="section-footer__row__col section-footer__menu-block" > 3019 3020<p class="section-footer__title no-wrap">ABOUT</p> 3021 3022 3023 3024 <ul class="section-footer__menu-block__menu ib-rb-footer-none"> 3025 3026 <li> 3027 <a data-cc-animate-click href="/pages/showcase-our-story" class="no-wrap">OUR STORY</a> 3028 </li> 3029 3030 <li> 3031 <a data-cc-animate-click href="/pages/schedule-consult" class="no-wrap">SCHEDULE FITTING</a> 3032 </li> 3033 3034 <li> 3035 <a data-cc-animate-click href="/collections/custom-style-guide" class="no-wrap">STYLE GUIDE</a> 3036 </li> 3037 3038 <li> 3039 <a data-cc-animate-click href="https://rye51.com" class="no-wrap">SHOP RYE 51</a> 3040 </li> 3041 3042 <li> 3043 <a data-cc-animate-click href="https://qclothier.com/pages/areas-we-serve" class="no-wrap">AREAS WE SERVE</a> 3044 </li> 3045 3046 <li> 3047 <a data-cc-animate-click href="/pages/pricing" class="no-wrap">PRICING</a> 3048 </li> 3049 3050 <li> 3051 <a data-cc-animate-click href="/blogs/blog" class="no-wrap">BLOG</a> 3052 </li> 3053 3054 </ul> 3055 3056 </div> 3057 3058 3059 3060 3061 3062 <div class="section-footer__row__col section-footer__menu-block" > 3063 3064<p class="section-footer__title no-wrap">SUPPORT</p> 3065 3066 3067 3068 <ul class="section-footer__menu-block__menu ib-rb-footer-none"> 3069 3070 <li> 3071 <a data-cc-animate-click href="/pages/careers" class="no-wrap">CAREERS</a> 3072 </li> 3073 3074 <li> 3075 <a data-cc-animate-click href="/pages/find-a-store" class="no-wrap">FIND A STORE</a> 3076 </li> 3077 3078 <li> 3079 <a data-cc-animate-click href="https://qclothier.com/pages/gift-card-landing" class="no-wrap">GIFT CARDS</a> 3080 </li> 3081 3082 <li> 3083 <a data-cc-animate-click href="/policies/terms-of-service" class="no-wrap">TERMS</a> 3084 </li> 3085 3086 <li> 3087 <a data-cc-animate-click href="/pages/contact-us" class="no-wrap">CONTACT US</a> 3088 </li> 3089 3090 <li> 3091 <a data-cc-animate-click href="https://qclothier.com/a/gifthero/balance" class="no-wrap">GIFT CARD BALANCE CHECK</a> 3092 </li> 3093 3094 </ul> 3095 3096 </div> 3097 3098 3099 3100 3101 3102 3103 <div class="section-footer__row__col section-footer__custom-block"> 3104 <div class="klaviyo-form-W4nVsz"></div> 3105 </div> 3106 3107 3108 3109 3110 </div> 3111 </div> 3112 3113<div class="wide-container section-footer__row-container "> 3114 <div class="section-footer__row section-footer__row-lower"> 3115 <div class="section-footer__row__col"> 3116 3117 3118 <div class="section-footer__lower-menu"> 3119 <ul class="section-footer__lower-menu__list"> 3120 3121 <li> 3122 <a data-cc-animate-click href="https://rye51.com">RYE 51</a> 3123 </li> 3124 3125 </ul> 3126 </div> 3127 3128 </div> 3129 <div class="section-footer__row__col"> 3130 3131 3132 <div class="copyright">
3133 <span class="copy">© 2026 <a data-cc-animate-click href="/">Q Clothier</a>.</span> 3134 3135 <a target="_blank" rel="nofollow" href="https://www.shopify.com?utm_campaign=poweredby&utm_medium=shopify&utm_source=onlinestore"> </a> 3136 3137 </div> 3138 </div> 3139 </div> 3140 </div> 3141</div> 3142 3143 3144 3145 3146 3147 3148</div> 3149 3150 <div id="shopify-section-offer" class="shopify-section"> 3151 3152</div> 3153 3154 <!-- Search form --> 3155 <div id="search-modal" class="theme-modal theme-modal--fullscreen" tabindex="-1"> 3156 <a href="#" data-modal-close class="modal-close">×</a> 3157 <div class="inner"> 3158 <div class="container growth-area"> 3159 <form action="/search" method="get" class="search-form" role="search"> 3160 3161 <input type="hidden" name="type" value="product"> 3162 <input type="hidden" name="options[prefix]" value="last"> 3163 3164 <div class="inline-mini-form inline-mini-form--arrow"> 3165 <input 3166 type="text" 3167 name="q" 3168 placeholder="Type to search" 3169 class="focus-me" 3170 value="" 3171 aria-label="Search" 3172 autocomplete="off" 3173 required 3174 > 3175 <button 3176 class="compact no-hover" 3177 type="submit" 3178 aria-label="Search" 3179 > 3180 <svg width="62px" height="35px" viewBox="0 0 62 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 3181 <title>Right arrow long</title> 3182 <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"> 3183 <g transform="translate(2.000000, 2.000000)" stroke-width="4"> 3184 <g transform="translate(41.000000, 0.000000)"> 3185 <polyline points="-2.7385153e-12 30.8 15.4 15.4 -2.7385153e-12 -3.34373052e-13"></polyline> 3186 </g> 3187 <line x1="54.5" y1="15.5" x2="0.5" y2="15.5" stroke-linejoin="round"></line> 3188 </g> 3189 </g> 3190</svg> 3191 3192 </button> 3193 </div> 3194 </form> 3195 </div> 3196 </div> 3197 </div> 3198 3199 <div id="cc-veil" class=""> 3200 3201 </div> 3202 3203
3203<script src="//qclothier.com/cdn/shop/t/73/assets/vendor.js?v=70213052416818374661723504063" defer="defer"></script>
3203 3204
3204<script src="//qclothier.com/cdn/shop/t/73/assets/theme.js?v=72203830573049377301723504063" defer="defer"></script>
3204 3205 3206 3207
3207<script> 3208if (~window.location.pathname.indexOf('schedule-a-fitting') && ~window.location.search.indexOf('submissionsuccess')) { 3209 setTimeout(function() { 3210 fbq('track', 'Lead', { 3211 'form': 'Schedule Consult' 3212 }); 3213 }, 3000); 3214} 3215</script>
3215 3216
3217<script> 3218if (~window.location.pathname.indexOf('try-our-style-quiz')) { 3219 (function () { 3220 var timesRun = 0; 3221 var checkSubmitBtn = setInterval(function () { 3222 timesRun += 1; 3223 if (timesRun === 120) { 3224 console.log('*** cancelled'); 3225 clearInterval(checkSubmitBtn); 3226 } 3227 var btnTags = document.getElementsByTagName('button'); 3228 var searchText = "SUBMIT"; 3229 var lpSubmitBtn = []; 3230 3231 for (var i = 0; i < btnTags.length; i++) { 3232 if (btnTags[i].textContent == searchText) { 3233 lpSubmitBtn.push(btnTags[i]); 3234 } 3235 } 3236 if (lpSubmitBtn.length > 0) { 3237 console.log('button found!', lpSubmitBtn); 3238 lpSubmitBtn.forEach(function(btn) { 3239 btn.addEventListener('click', function() { 3240 console.log('@@@ clicked btn'); 3241 fbq('track', 'Lead', { 3242 'form': "Style Quiz" 3243 }); 3244 }); 3245 }); 3246 3247 clearInterval(checkSubmitBtn); 3248 } else { 3249 console.log('no button') 3250 } 3251 }, 1000); 3252 })(); 3253} 3254</script>
3254 3255 3256 3257 3258<style>.gktAccountWidgetModalWrapper { 3259 font-size: 16px; 3260} 3261 3262.gktAccountWidgetModal { 3263 height: 600px; 3264 width: 75vw; 3265} 3266 3267.gktAccountWidgetRewardBalance { 3268 display: grid; 3269 grid-gap: 5px; 3270 justify-content: start; 3271} 3272 3273 3274.gktRewardCode { 3275 display: grid; 3276 text-align: right; 3277 grid-gap: 5px; 3278} 3279 3280.gktAccountWidgetRewardBalanceValue { 3281 place-self: start; 3282} 3283 3284.gktAccountWidgetModalContent { 3285 display: grid; 3286 grid-gap: 10px; 3287 grid-template-rows: 1fr 0.6fr auto; 3288} 3289 3290.gktAccountWidgetRewardDetails { 3291 display: grid; 3292 grid-template-columns: 1fr 1fr; 3293 /* grid-gap: 10px; */ 3294 padding: 10px 0px; 3295 border-bottom: 1px solid #a2a2a2; 3296} 3297 3298.gktAccountWidgetBodyTabActive { 3299 border-bottom: 1px solid black; 3300} 3301 3302 3303 3304.gktAccountWidgetRewardSectionBodyListItem, 3305.gktAccountWidgetRewardSectionBodyListHeader { 3306 display: grid; 3307 /* grid-template-columns: 1fr 1fr 1fr; */ 3308 grid-template-columns: 33% 33% 33%; 3309 padding: 10px 5px; 3310 text-align: start; 3311 place-items: start; 3312 align-items: center; 3313 border-bottom: 1px solid #efe4e4; 3314} 3315 3316 3317 3318.gktAccountWidgetBuyWithRewardsButton { 3319 text-align: center; 3320 align-items: center; 3321 display: grid; 3322 gap: 10px; 3323 justify-content: center; 3324 padding: 15px; 3325 padding: 10px; 3326 align-items: center; 3327 background: #252525; 3328 border-radius: 5px; 3329 border-radius: 2px; 3330 color: white; 3331 cursor: pointer; 3332} 3333 3334.gktAccountWidgetBuyWithRewardsButton:hover , .gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton:hover { 3335 transform: scale(0.95); 3336} 3337 3338.gktAccountWidgetActivator{ 3339 text-align: center; 3340 display: grid; 3341 gap: 10px; 3342 justify-content: center; 3343 padding: 15px; 3344 padding: 10px; 3345 align-items: center; 3346 background: #252525; 3347 border-radius: 5px; 3348 border-radius: 2px; 3349 color: white; 3350} 3351 3352 3353.gktAccountWidgetRewardCodeValue { 3354 place-self: end; 3355 font-size: 20px; 3356} 3357 3358.gktAccountWidgetRewardBalanceValue { 3359 font-size: 20px; 3360} 3361 3362.gktAccountWidgetRewardCodeCopyBtn { 3363 display: none; 3364} 3365 3366.gktAccountWidgetModalClose { 3367 display: grid; 3368 padding: 1px; 3369 align-self: baseline; 3370 justify-self: end; 3371 cursor: pointer; 3372 justify-content: end; 3373} 3374 3375.gktAccountWidgetBodyTabRewards, 3376.gktAccountWidgetBodyTabGiftCards { 3377 padding: 10px; 3378} 3379 3380.gktAccountWidgetRewardSectionBodyListHeader, 3381.gktAccountWidgetGiftCardSectionListHeader { 3382 color: #808080; 3383} 3384 3385.gktAccountWidgetBodyTabs { 3386 display: grid; 3387 grid-template-columns: 1fr 1fr; 3388 grid-template-rows: 1fr; 3389 grid-gap: 10px; 3390 text-align: center; 3391 border-bottom: 1px solid #ebebeb; 3392 cursor: pointer; 3393} 3394 3395.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar, 3396.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar {
3397 width: 5px; 3398} 3399 3400/* Track */ 3401.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-track, 3402.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-track { 3403 background: #f1f1f1; 3404} 3405 3406/* Handle */ 3407.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-thumb, 3408.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-thumb { 3409 background: #2c2c2c 0% 0% no-repeat padding-box; 3410} 3411 3412/* Handle on hover */ 3413.gktAccountWidgetRewardSectionBodyList::-webkit-scrollbar-thumb:hover, 3414.gktAccountWidgetGiftCardSectionBodyList::-webkit-scrollbar-thumb:hover { 3415 background: #000000 0% 0% no-repeat padding-box; 3416} 3417 3418.gktAccountWidgetRewardSection, 3419.gktAccountWidgetGiftCardSection { 3420 display: none; 3421} 3422 3423.gktAccountWidgetGiftCardSectionBodyList, 3424.gktAccountWidgetRewardSectionBodyList { 3425 font-size: 14px; 3426 padding-right: 10px; 3427 margin-top: 10px; 3428} 3429 3430.gktAccountWidgetGiftCardSectionBodyListItem, 3431.gktAccountWidgetGiftCardSectionListHeader { 3432 display: grid; 3433 grid-template-columns: 1fr 1fr 1fr 1.8fr; 3434 /* convert into percentages */ 3435 grid-template-columns: 22% 22% 22% 30%; 3436 padding: 10px; 3437 grid-gap: 10px; 3438 text-align: start; 3439 place-items: start; 3440 align-items: center; 3441 border-bottom: 1px solid #efe4e4; 3442} 3443 3444/* .gktAccountWidgetGiftCardSectionBodyListItem { 3445 display: grid; 3446 grid-template-columns: 1fr 1fr 1fr 1.8fr; 3447 padding: 10px; 3448 grid-gap: 10px; 3449 align-items: center; 3450} */ 3451 3452 3453.gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount{ 3454 width: 100%; 3455} 3456 3457.gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton { 3458 text-align: center; 3459 display: grid; 3460 gap: 10px; 3461 justify-content: center; 3462 padding: 10px 5px; 3463 align-items: center; 3464 background: #252525; 3465 border-radius: 5px; 3466 border-radius: 2px; 3467 color: white; 3468 place-self: center; 3469 cursor: pointer; 3470 width: 100%; 3471} 3472.gktAccountWidgetGiftCardSectionListHeaderForAction{ 3473 text-align: center; 3474 place-self: center; 3475} 3476 3477.gktAccountWidgetModalWrapper { 3478 display: none; 3479 width: 100%; 3480 height: 100vh; 3481 position: fixed; 3482 opacity: 1; 3483 background: #222; 3484 z-index: 999999999; 3485 top: 0; 3486 left: 0; 3487 overflow: hidden; 3488 animation-name: fadeIn_Container; 3489 animation-duration: 0.2s; 3490} 3491 3492.gktAccountWidgetModalWrapper { 3493 background-color: #2229; 3494} 3495/* Modal Content */ 3496.gktAccountWidgetModal { 3497 position: fixed; 3498 top: 25%; 3499 left: 50%; 3500 max-width: 700px; 3501 width: 65vw !important; 3502 margin: 10px auto; 3503 padding: 20px 30px 30px; 3504 margin-top: 20vh !important; 3505 background: #fefefe; 3506 animation-name: fadeIn_Modal; 3507 animation-duration: 0.2s; 3508 transform: translate(-50%, -50%); 3509 line-height: 16px; 3510 max-height: 90vh; 3511 overflow-y: auto; 3512 overflow-x: hidden; 3513 border-radius: 2px; 3514 color: black !important; 3515} 3516 3517.gktDisabled { 3518 opacity: 0.5; 3519 pointer-events: none; 3520} 3521 3522 3523.gktPoweredByBanner { 3524 display: flex; 3525 position: absolute; 3526 bottom: 0; 3527 left: 0; 3528 width: 100%; 3529 justify-content: center; 3530 align-items: center; 3531 padding: 10px; 3532 padding: 6px; 3533 font-size: 14px; 3534 background: #efe9e9; 3535 cursor: pointer; 3536} 3537 3538.gktLoading { 3539 display: grid; 3540 align-items: center; 3541 /* margin-top: 30%; */ 3542 justify-content: center; 3543 /* height: 200px; 3544 margin: 50px auto; */ 3545 text-align: -webkit-center; 3546} 3547 3548.gktLoadingSpinner { 3549 display: block !important; 3550 border: 12px solid #f3f3f3; 3551 border-radius: 50%; 3552 border-top: 12px solid #cbcbcb; 3553 border-bottom: 12px solid #cbcbcb; 3554 width: 80px; 3555 height: 80px; 3556 -webkit-animation: spin 2s linear infinite; 3557 animation: spin 2s linear infinite; 3558} 3559 3560@-webkit-keyframes spin { 3561 0% { 3562 -webkit-transform: rotate(0deg); 3563 } 3564 3565 100% { 3566 -webkit-transform: rotate(360deg); 3567 } 3568} 3569 3570@keyframes spin { 3571 0% { 3572 transform: rotate(0deg); 3573 } 3574 3575 100% { 3576 transform: rotate(360deg); 3577 } 3578} 3579 3580.gktAccountWidgetNoRewardDataFound, 3581.gktAccountWidgetNoGiftCardDataFound { 3582 text-align: center; 3583 display: grid; 3584 justify-content: center; 3585 margin: 50px 25px; 3586} 3587 3588.gktAccountWidgetRewardSectionBodyListItemBalanceRemove{ 3589 color: red; 3590} 3591 3592 3593 3594@media screen and (max-width: 600px) { 3595 .gktAccountWidgetModal { 3596 top: 25%; 3597 left: 50%; 3598 min-width: 250px; 3599 width: 100vw !important; 3600 padding: 10px 20px; 3601 margin-top: 0 !important; 3602 top: 0; 3603 left: 0; 3604 transform: translate(0px, 0px); 3605 border-radius: 0px; 3606 height: 100vh !important; 3607 max-height: 100vh !important; 3608 min-width: 100%; 3609 min-width: -moz-available; /* WebKit-based browsers will ignore this. */ 3610 min-width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 3611 min-width: fill-available; 3612 } 3613 .gktAccountWidgetRewardSectionBodyList, 3614 .gktAccountWidgetGiftCardSectionBodyList { 3615 height: 550px; 3616 overflow-y: auto; 3617 } 3618 .gktLoading{ 3619 height: 550px; 3620 align-items: baseline; 3621 margin-top: 22%; 3622 } 3623} 3624 3625@media screen and (min-width: 764px) { 3626 .gktAccountWidgetRewardSectionBodyList, 3627 .gktAccountWidgetGiftCardSectionBodyList { 3628 height: 350px; 3629 overflow-y: auto; 3630 } 3631 .gktLoading{ 3632 height: 350px; 3633 } 3634} 3635 3636 3637.cashbackWidgetContainer{ 3638 display: grid; 3639 grid-template-columns: 1fr; 3640 grid-template-rows: auto 1fr; 3641 border: 2px solid black; 3642 border-radius: 5px; 3643 padding: 8px 8px; 3644} 3645.cashbackWidgetTitleContainer{ 3646 display: grid; 3647 grid-template-columns: auto 1fr; 3648 grid-gap: 10px; 3649 align-items: center; 3650} 3651.cashbackWidgetIcon{ 3652 width: 25px; 3653 height: 25px; 3654} 3655 3656.cashbackWidgetHeading{ 3657 font-size: 18px; 3658 font-weight: 700; 3659 text-align: left; 3660} 3661 3662.cashbackWidgetBody{ 3663 font-size: 14px; 3664 font-weight: 600; 3665 text-align: left; 3666 3667} 3668 3669 3670 3671.gktComboContainer { 3672 display: grid; 3673 grid-template-columns: 1fr; 3674 grid-template-rows: auto; 3675 3676} 3677.gktPrevImage,.gktNextImage{ 3678 margin-left:5px; 3679 font-size: 16px; 3680} 3681.gktComboSliderNavigatior{ 3682 position: absolute; 3683 bottom: 5px; 3684 right:5px; 3685} 3686.gktComboItemContainer{ 3687 display: grid; 3688 grid-template-columns: 1fr 2fr; 3689 grid-template-rows: auto; 3690 padding: 3px 0px; 3691 margin: 3px 0px; 3692 border-radius: 3px; 3693 border: 1px solid #f1f2f3; 3694} 3695 3696.gktComboItemContainerItem1{ 3697 grid-row: 1 / 5; 3698 position:relative; 3699} 3700 3701.gktComboItemContainerItem2{ 3702 padding-left: 5px; 3703 text-align: left; 3704} 3705 3706.gktComboItemContainerItem3{ 3707 padding-left: 5px; 3708 text-align: left; 3709} 3710 3711.gktComboItemContainerItem4{ 3712 padding-left: 5px; 3713 text-align: left; 3714} 3715 3716 3717.gktComboItemContainerItem3CustomSelect{ 3718 position: relative; 3719 width: fit-content; 3720 3721} 3722 3723.gktComboItemContainerItem3CustomSelect > select{ 3724 box-shadow: 0; 3725 font-size: 16px; 3726 padding: 6px 10px; 3727 background-color: #fafafa; 3728 border: 1px solid #eee; 3729 min-width: 120px; 3730 margin: 0px; 3731 3732} 3733 3734.gktComboItemContainerItem3CustomSelect > select:focus{ 3735 outline:none; 3736 3737} 3738 3739.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn { 3740 position: absolute; 3741 display: block; 3742 top:0; 3743 right: 0; 3744 background: #fafafa; 3745 height: 100%;
3746 width: 20px; 3747 pointer-events: none; 3748 3749} 3750.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::before, 3751.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::after 3752 { 3753 content: ""; 3754 position: absolute; 3755 width: 0; 3756 height: 0; 3757 left: 50%; 3758 transform: translate(-50%, -50%); 3759 3760} 3761 3762.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::before 3763 { 3764 border-left: 8px solid transparent; 3765 border-right: 8px solid transparent; 3766 border-bottom: 8px solid #635959; 3767 top:30% 3768 3769} 3770 3771.gktComboItemContainerItem3CustomSelect > .gktComboItemContainerItem3SelectDropdownBtn::after 3772 { 3773 border-left: 8px solid transparent; 3774 border-right: 8px solid transparent; 3775 border-top: 8px solid #635959; 3776 top: 70%; 3777} 3778 3779 3780 3781.gktComboModalWrapper { 3782 3783 display: none; 3784 width: 100%; 3785 height: 100vh; 3786 position: fixed; 3787 opacity: 1; 3788 background: #222; 3789 z-index: 999999999; 3790 top: 0; 3791 left: 0; 3792 overflow: hidden; 3793 animation-name: fadeIn_Container; 3794 animation-duration: .2s 3795} 3796 3797 /* Modal Content */ 3798.gktComboModal { 3799 3800 position: fixed; 3801 top: 25%; 3802 left: 50%; 3803 min-width: 250px; 3804 width: 50vw !important; 3805 margin: 10px auto; 3806 padding:10px; 3807 margin-top: 25vh !important; 3808 border-radius: 4px; 3809 background: #fefefe; 3810 box-shadow: 0 0 10px #000; 3811 animation-name: fadeIn_Modal; 3812 animation-duration: .2s; 3813 3814 transform: translate(-50%, -50%); 3815 } 3816 3817 3818 3819/* Header should be in one line*/ 3820.gktComboModalHeader { 3821 display: grid; 3822 grid-template-columns: auto 25px; 3823} 3824 3825 3826.gktComboModalPopupHeading > p { 3827 margin: 0 !important; 3828} 3829 3830.gktComboModalClose{ 3831 fill: rgba(255,255,255,0.851); 3832 background: rgba(32,33,36,0.4); 3833 -webkit-border-radius: 50%; 3834 border-radius: 50%; 3835 width: 24px; 3836 height: 24px; 3837 padding: 1px; 3838 align-self: baseline; 3839 justify-self: end; 3840 margin-top: 3px; 3841 margin-right: 3px; 3842 cursor: pointer; 3843} 3844 3845 3846.gktComboModalClose:hover, 3847 .gktComboModalClose:focus { 3848 color: #000; 3849 text-decoration: none; 3850 cursor: pointer; 3851 } 3852 3853 3854.gktComboContent { 3855 display:grid; 3856 grid-template-rows: 1fr 3fr; 3857 grid-gap: 10px; 3858 padding: 5px 10px; 3859 margin:5px 10px; 3860 font-size: 30px; 3861} 3862 3863.gktComboContentHeader{ 3864 3865} 3866.gktComboContentFooter{ 3867 3868} 3869.gktComboContentFooterBtn1{ 3870 3871} 3872.gktComboContentFooterBtn2{ 3873 3874} 3875 3876 3877 3878.gktFreeGiftcardPopupModalWrapper { 3879 display: none; 3880 width: 100%; 3881 height: 100vh; 3882 position: fixed; 3883 opacity: 1; 3884 background: #e1d8d882; 3885 z-index: 999999999; 3886 top: 0; 3887 left: 0; 3888 overflow: hidden; 3889 animation-name: fadeIn_Container; 3890 animation-duration: .2s 3891 display: none; 3892 } 3893 .gktFreeGiftcardPopupConfirmationPageButtons{ 3894 display:grid; 3895 grid-template-columns:1fr 1fr; 3896 grid-gap:10px; 3897 } 3898 .gktFreeGiftcardPopupButton, .gktFreeGiftcardPopupCheckoutButton, .gktFreeGiftcardPopupContinueShoppingButton{ 3899 cursor: pointer; 3900 padding: 6px 12px; 3901 font-weight: 500; 3902 text-align: center; 3903 background-color: black; 3904 color: white; 3905 transition: transform .2s; 3906 font-size:16px; 3907 } 3908 .gktFreeGiftcardPopupContinueShoppingButton{ 3909 background-color: white; 3910 color: black; 3911 } 3912 .gktFreeGiftcardPopupConfirmationPageDescription{ 3913 font-size: 16px; 3914 text-align: center; 3915 font-weight: 600; 3916 margin-bottom: 0; 3917 margin-top: 0; 3918 padding-top: 10px; 3919 } 3920 .gktFreeGiftcardPopupConfirmationPage{ 3921 } 3922 .gktFreeGiftcardPopupModalClose{ 3923 position:absolute; 3924 top:5px; 3925 right:5px; 3926 fill: rgba(255,255,255,0.851); 3927 background: rgba(32,33,36,0.4); 3928 -webkit-border-radius: 50%; 3929 border-radius: 50%; 3930 width: 24px; 3931 height: 24px; 3932 padding: 1px; 3933 align-self: baseline; 3934 justify-self: end; 3935 margin-top: 3px; 3936 margin-right: 3px; 3937 cursor: pointer; 3938 } 3939 .gktFreeGiftcardPopupConfirmationPageImage{ 3940 width: 100%; 3941 height: 150px !important; 3942 object-fit: cover !important; 3943 } 3944 .gktFreeGiftcardPopupModalClose:focus, 3945 .gktFreeGiftcardPopupModalClose:hover{ 3946 color: #000; 3947 text-decoration: none; 3948 cursor: pointer; 3949 } 3950.gktFreeGiftcardPopupButton:hover, .gktFreeGiftcardPopupModalWrapper button:hover { 3951 transform: scale(0.95); 3952} 3953 .gktFreeGiftcardPopupModal { 3954 position: fixed; 3955 top: 25%; 3956 left: 50%; 3957 max-width: 450px; 3958 width: 45vw !important; 3959 margin: 10px auto; 3960 padding:10px 20px; 3961 margin-top: 20vh !important; 3962 border-radius: 4px; 3963 background: #fefefe; 3964 box-shadow: 0 0 10px #000; 3965 animation-name: fadeIn_Modal; 3966 animation-duration: .2s; 3967 transform: translate(-50%, -50%); 3968 line-height: 16px; 3969 max-height: 90vh; 3970 overflow-y: auto; 3971 overflow-x: hidden; 3972 display: none; 3973 } 3974 3975 img.gktFreeGiftcardPopupImage { 3976 width: 100%; 3977 height: 200px; 3978 object-fit: contain; 3979 } 3980 3981 .gktFreeGiftcardPopupHeading{ 3982 font-size: 20px; 3983 margin: 0 !important; 3984 padding: 8px !important; 3985 text-align:center; 3986 } 3987 .gktFreeGiftcardPopupInputFields{ 3988 display:grid; 3989 grid-gap:5px; 3990 margin: 0 !important; 3991 3992 } 3993 .gktFreeGiftcardPopupInputFields > input{ 3994 display: block; 3995 width: 100%; 3996 margin: 0 !important; 3997 padding: 10px 20px !important; 3998 background-color: #f3f4f3 !important; 3999 border: 1px solid #f3f4f3 !important; 4000 border-radius: 0px !important; 4001 font-size: 14px !important; 4002} 4003 4004.gktFreeGiftcardPopupModalBody{ 4005 height:100%; 4006 width:100%; 4007 display:grid; 4008 grid-gap:5px; 4009} 4010textarea.gktFreeGiftcardPopupTextArea{ 4011 display: block; 4012 width: 100%; 4013 margin-top: 10px; 4014 resize:none; 4015 padding: 10px 20px !important; 4016 background-color: #f3f4f3 !important; 4017 border: 1px solid #f3f4f3 !important; 4018 border-radius: 0px !important; 4019 font-size: 14px !important; 4020 margin: 0 !important; 4021 min-height: 90px !important; 4022} 4023.gktFreeGiftcardPopupButton{ 4024 display: block; 4025 width: 100%; 4026 height: fit-content; 4027 margin-top: 0 !important; 4028 padding: 10px 20px; 4029}
4030.gktModalCheckoutButton:hover { 4031 transform: scale(0.95); 4032} 4033.gktModalCheckoutButton{ 4034 cursor: pointer; 4035} 4036.gktFreeGiftcardPopupInputFieldsEmailError{ 4037 display: block; 4038 font-size: 12px; 4039 color: red; 4040 padding-top:2px; 4041} 4042@media only screen and (max-width: 600px) { 4043 .gktFreeGiftcardPopupModal { 4044 margin-top: 0 !important; 4045 top: 0; 4046 left: 0; 4047 transform: translate(0px, 0px); 4048 border-radius: 0px; 4049 height: 100vh !important; 4050 max-height: 100vh !important; 4051 min-width: 100%; 4052 } 4053 4054} 4055 4056 4057.gktGiftCardWrapper{ 4058 display: none; 4059} 4060 4061.productPageGiftCardUi{ 4062 display: grid; 4063 width: 100%; 4064 grid-gap: 10px; 4065 padding: 3px 0px; 4066 margin: 3px 0px; 4067} 4068 4069.gktGiftCardModalWrapper { 4070 display: none; 4071 width: 100%; 4072 height: 100vh; 4073 position: fixed; 4074 opacity: 1; 4075 background: #222; 4076 z-index: 999999999; 4077 top: 0; 4078 left: 0; 4079 overflow: hidden; 4080 animation-name: fadeIn_Container; 4081 animation-duration: .2s 4082 } 4083 .gktGiftCardModalWrapper{ 4084 background-color: #2229; 4085 } 4086 /* Modal Content */ 4087 .gktGiftCardModal{ 4088 position: fixed; 4089 top: 25%; 4090 left: 50%; 4091 max-width: 600px; 4092 width: 55vw !important; 4093 margin: 10px auto; 4094 padding:20px 30px 30px; 4095 margin-top: 20vh !important; 4096 border-radius: 4px; 4097 background: #fefefe; 4098 animation-name: fadeIn_Modal; 4099 animation-duration: .2s; 4100 transform: translate(-50%, -50%); 4101 line-height: 16px; 4102 max-height: 90vh; 4103 overflow-y: auto; 4104 overflow-x: hidden; 4105 color: black !important; 4106 } 4107 4108 4109 4110.gktGiftCardInputFieldsDiv{ 4111 display: grid; 4112} 4113 4114 /* Header should be in one line*/ 4115 .gktGiftCardModalHeader { 4116 display: grid; 4117 grid-template-columns: auto 25px; 4118 } 4119 4120 4121 .gktGiftCardModalPopupHeading > p { 4122 margin: 0 !important; 4123 } 4124 .gktGiftCardModalPopupHeading{ 4125 font-size: 20px; 4126 4127 } 4128 .gktGiftCardModalClose{ 4129 -webkit-border-radius: 50%; 4130 border-radius: 50%; 4131 width: 24px; 4132 height: 24px; 4133 padding: 1px; 4134 align-self: baseline; 4135 justify-self: end; 4136 margin-top: 3px; 4137 margin-right: 3px; 4138 cursor: pointer; 4139 } 4140 4141 4142 .gktGiftCardContent hr{ 4143 unset:all; 4144 } 4145 4146 .gktGiftCardModalClose:hover, 4147 .gktGiftCardModalClose:focus { 4148 color: #000; 4149 text-decoration: none; 4150 cursor: pointer; 4151 } 4152 .gktGiftCardInputFieldsDiv > div { 4153 display: grid; 4154 padding-bottom:5px; 4155 margin-bottom:10px; 4156 } 4157 4158 .gktGiftCardInputFieldsDiv label{ 4159 line-height: 1.2; 4160 margin-bottom:0px; 4161 font-size: 14px; 4162 color:black !important; 4163 padding-bottom:5px; 4164 text-transform:none !important; 4165 letter-spacing:0px !important; 4166 } 4167 4168 .gktGiftCardModalCheckbox{ 4169 display: block !important; 4170 } 4171.gktGiftCardModalCheckbox input[type="checkbox"]{ 4172 display: inline-block; 4173 margin-right: 10px; 4174 margin-left: 0px; 4175 width: auto; 4176 height: max-content !important; 4177 } 4178 .gktGiftCardModalCheckbox .gktGiftCardModalCheckboxLabel{ 4179 display: inline-block; 4180 margin-right: 10px; 4181 margin-left: 0px; 4182 width: auto; 4183 } 4184 4185 4186 .gktGiftCardContainer { 4187 height: 400px; 4188 border-top: 1px solid #A2A2A2 !important; 4189 display: grid; 4190 grid-template-rows: 1fr 9fr; 4191} 4192 4193 .gktGiftCardDetailsContent input, .productPageGiftCardUi input{ 4194 margin:0px; 4195 padding: 10px 18px; 4196 width: 100%; 4197 background-color: #ffffff; 4198 color: #000000; 4199 max-width: 100%; 4200 line-height: 1.2; 4201 border-radius: 2px; 4202 padding-bottom: 10px; 4203 border: 1px solid #A2A2A2; 4204 font-size:14px !important; 4205 } 4206 4207 .productPageGiftCardUi textarea{ 4208 margin:0px; 4209 padding: 10px 18px; 4210 width: 100%; 4211 background-color: #ffffff; 4212 color: #000000; 4213 max-width: 100%; 4214 line-height: 1.2; 4215 border-radius: 2px; 4216 padding-bottom: 10px; 4217 border: 1px solid #A2A2A2; 4218 font-size:14px !important; 4219 } 4220 4221 .gktGiftCardMessageInputFieldsDiv textarea { 4222 margin:0px; 4223 padding: 10px 18px; 4224 width: 100%; 4225 border: 1px solid #cccccc; 4226 background-color: #ffffff; 4227 color: #000000; 4228 max-width: 100%; 4229 line-height: 1.2; 4230 border-radius: 2px; 4231 padding-bottom: 10px; 4232 max-height: 70px !important; 4233 min-height:50px !important; 4234 border: 1px solid #A2A2A2; 4235 resize: none; 4236 width: 100%; 4237 height: 126px; 4238 padding: 10px; 4239}
4240 .greetingCardMainBody,.gktGiftCardDetailsContent,.gktGiftCardMessageContent{ 4241 background: #F2F2F2 0% 0% no-repeat padding-box; 4242 padding:20px; 4243 font-size:14px !important; 4244 } 4245 4246 .greetingCardMainBody{ 4247 padding:0px; 4248 // why are we declaring this here? 4249 // because we dont want to have padding for scroll 4250 } 4251 .gktGiftCardMessageDivider{ 4252 display: block !important; 4253 border: 1px solid #A2A2A2 !important; 4254 height: 0px; 4255 opacity: 0.5; 4256 } 4257.gktGiftCardMessageLabel{ 4258 text-align: left; 4259 letter-spacing: 0px; 4260 display: block; 4261 color: #000000; 4262 padding-bottom: 10px; 4263 opacity: 1; 4264} 4265 4266 4267 4268 .gktGiftCardDetailsContent { 4269 font-size: 16px; 4270 height: 400px; 4271 overflow-y: auto; 4272 text-align: start; 4273 } 4274 .gktGiftCardEmailValidation,.gktGiftCardDateValidation{ 4275 color: red; 4276 margin: 0; 4277 padding: 0; 4278 font-size: 12px; 4279 } 4280 .gktGiftCardInputFieldsDiv label[required]::after, label[required]:after{ 4281 content: '*'; 4282 margin-right: 4px; 4283 color: red; 4284 } 4285 .gktGiftCardDateLabel{ 4286 margin:0px !important; 4287 padding:0px !important; 4288 } 4289 .gktGiftCardInputRow5{ 4290 padding:0px !important; 4291 } 4292 4293 .gktGiftCardContentHeader{ 4294 4295 } 4296 .gktGiftCardContentFooter{ 4297 margin: 10px auto; 4298 margin-bottom: 30px; 4299 } 4300 .gktGiftCardContentFooterBtn1{ 4301 cursor: pointer; 4302 padding: 12px 12px; 4303 font-weight: 500; 4304 text-align: center; 4305 background-color: #A96668; 4306 color: white; 4307 transition: transform .2s; 4308 font-size:16px; 4309 } 4310 .gktGiftCardContentFooterBtn1:hover { 4311 transform: scale(0.95); 4312} 4313 .gktGiftCardContentFooterBtn2{ 4314 4315 } 4316 4317 4318 4319 .greetingCardMainBody { 4320 height: 100%; 4321 display: grid; 4322 grid-template-columns: 1fr; 4323 overflow-y: hidden; 4324} 4325.greetingCardCategoryListItemText{ 4326 text-align: center; 4327 line-height: 30px; 4328 width: 100%; 4329 display: block; 4330 text-decoration: none; 4331 color: #008060; 4332 font-size: 16px; 4333} 4334 4335.greetingCardImageList .greetingCardImageLabel{ 4336} 4337// css class for the checked image 4338.greetingCardImageList .greetingCardLabel input:checked{ 4339 border:2px solid #A96668; 4340 border-radius:5px; 4341} 4342 4343.greetingCardImagePreview{ 4344 width:100%; 4345 align-self:center; 4346 display:none; 4347} 4348.activeGreetingCardCategory a, .greetingCardCategoryListItem a:hover { 4349 color:black !important; 4350 cursor:pointer; 4351 border-bottom: 1px solid black; 4352} 4353 4354.greetingCardImage:hover{ 4355 transform: scale(1.05); 4356 transition: transform .3s; 4357 border-radius:5px; 4358} 4359 4360OLD .greetingCardCategoryListItem{ 4361 display:inline-block; 4362 font-size:16px; 4363 text-transform:capitalize; 4364 text-transform:uppercase; 4365 padding-right:10px; 4366} 4367 4368.greetingCardCategoryList{ 4369 text-align: left; 4370 list-style: none; 4371 display:grid; 4372 grid-template-columns: repeat(3,max-content); 4373 padding: 0; 4374 margin: 10px 0 15px; 4375 grid-gap:25px; 4376} 4377 4378.greetingCardCategoryListItem{ 4379 display: inline-block; 4380 text-align: center; 4381 height: auto; 4382 line-height: 2em; 4383 padding: 0; 4384 margin: 0; 4385} 4386 4387.activeGreetingCard{ 4388 border:2px solid black; 4389 border-radius:5px; 4390} 4391 4392.greetingCardImageInput{ 4393 position:absolute; 4394 top:0; 4395 left:0; 4396 width:100%; 4397 height:100%; 4398 visibility:hidden; 4399} 4400 4401.greetingCardImageList{ 4402 display:grid; 4403 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 4404 overflow-x: hidden; 4405 overflow-y: auto; 4406 padding-right:5px; 4407 height:350px; 4408 padding:20px; 4409} 4410 4411.gktVideoMsgCheckboxField,.gktVideoMessageFileInput{ 4412 visibility:hidden; 4413} 4414 4415.greetingCardImageList .greetingCardImageLabel img{ 4416 /* max-width:100%; */ 4417 padding:10px; 4418 width: 100%; 4419 width: -moz-available; /* WebKit-based browsers will ignore this. */ 4420 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 4421 width: fill-available; 4422} 4423 4424.greetingCardImageLabel{ 4425 position:relative; 4426 cursor:pointer; 4427 display:inline-block; 4428 width:100%; 4429 align-self:center; 4430 4431} 4432 4433.gktGiftCardSendNowButton, .gktGiftCardSendLaterButton{ 4434 background: inherit ; 4435} 4436.gktGiftCardSendNowButton:hover,.gktGiftCardSendLaterButton:hover{ 4437 background: inherit; 4438} 4439.gktGiftCardSendNowButton, .gktGiftCardSendLaterButton{ 4440 display: inline-block; 4441 justify-content: center; 4442 cursor: pointer; 4443 line-height: 30px; 4444 margin:0px; 4445 padding:6px; 4446 font-weight: 700; 4447 text-transform: uppercase; 4448 font-size: 12px; 4449 color: #585858; 4450 border: 1px solid #f3f3f3; 4451 border-top: 0 solid #f3f3f3; 4452 border-color: #f3f3f3!important; 4453 transition: transform .2s; 4454 font-family:inherit; 4455} 4456 4457.gktGiftCardSendNowButton:hover, .gktGiftCardSendLaterButton:hover{ 4458 4459 transform: scale(0.95); 4460 4461} 4462 4463.activeDeliveryOption{ 4464 border: 1px solid #A2A2A2 !important; 4465} 4466 4467/*** Giftcard Modal Css ***/ 4468.gktGiftCardModalPopupHeading{ 4469 font-size:16px; 4470 margin:0; 4471 padding:10px; 4472} 4473.gktGiftCardModalSubText{ 4474 font-size:16px; 4475 margin-bottom:10px; 4476} 4477.activeContent{ 4478 font-weight:bold; 4479 color:black; 4480} 4481.gktGiftCardModalNavForMobile{ 4482 display:none; 4483} 4484.gktDeliveryOptions{ 4485 display:grid; 4486 grid-template-columns: 1fr 1fr; 4487 margin:10px 0px; 4488 grid-gap: 5px; 4489 text-align: center; 4490} 4491 4492.gktGiftCardModalBackButton{ 4493 cursor:pointer; 4494 font-size: 14px; 4495 position: absolute; 4496 color:black; 4497 top: 10px; 4498 padding-top: 10px; 4499 display: inline-grid; 4500 grid-auto-flow: column; 4501 justify-items: center;
4502 align-items: center; 4503 left: 30px; 4504 top: 10px; 4505 4506} 4507 4508.gktGiftCardModalNav{ 4509 display: flex; 4510 flex-direction: row; 4511 gap: 10px; 4512 padding-bottom: 10px !important; 4513 padding-top:10px !important; 4514} 4515 4516.gktGiftCardModalNav li{ 4517 display:inline-block; 4518 margin:0; 4519 padding:0 10px; 4520 list-style: none; 4521 color: grey; 4522} 4523.gktGiftCardModalNavListItem.activeNavItem{ 4524 color: black; 4525} 4526.gktGiftCardModalNavListItem{ 4527 font-size: 16px; 4528} 4529@media screen and (max-width: 600px) { 4530 .gktGiftCardModal { 4531 top: 25%; 4532 left: 50%; 4533 min-width: 250px; 4534 /* width: 100vw !important; */ 4535 padding: 10px 20px; 4536 margin-top: 0 !important; 4537 top: 0; 4538 left: 0; 4539 transform: translate(0px, 0px); 4540 border-radius: 0px; 4541 height: 100vh !important; 4542 max-height: 100vh !important; 4543 min-width: 100%; 4544 min-width: -moz-available; /* WebKit-based browsers will ignore this. */ 4545 min-width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */ 4546 min-width: fill-available; 4547 } 4548 .gktGiftCardContainer,.gktGiftCardDetailsContent { 4549 height: max-content; 4550 grid-template-rows: auto auto; 4551 } 4552 .greetingCardMainBody{ 4553 grid-template-columns: 1fr; 4554 height: fit-content; 4555 4556 } 4557 .greetingCardImagePreview{ 4558 display:none; 4559 width:0; 4560 } 4561 .greetingCardImageList{ 4562 display:grid; 4563 grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 4564 height: fit-content; 4565 max-height: 65vh; 4566 } 4567 .greetingCardCategoryList{ 4568 grid-template-columns: repeat(3,1fr); 4569 } 4570 .gktDeliveryOptions{ 4571 display:grid; 4572 grid-template-columns: 1fr 1fr; 4573 text-align: center; 4574 } 4575 .gktGiftCardModalNav{ 4576 display:none; 4577 } 4578 .gktGiftCardModalNavForMobile{ 4579 display:block; 4580 padding-top: 20px; 4581 padding-bottom:20px; 4582 } 4583 .gktGiftCardModalBackButton{ 4584 left: 10px; 4585 top: 5px; 4586 } 4587 4588 } 4589 4590 4591/**** Checkmark css ***/ 4592.gkt_checkmark { 4593 display:inline-block; 4594 position:absolute; 4595 top:10px; 4596 left:10px; 4597 width: 22px; 4598 height:22px; 4599 -ms-transform: rotate(45deg); /* IE 9 */ 4600 -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */ 4601 transform: rotate(45deg); 4602} 4603 4604.gkt_checkmark_circle { 4605 display:block !important; 4606 position: absolute; 4607 width:22px; 4608 height:22px; 4609 background-color: green; 4610 border-radius:11px; 4611 left:0; 4612 top:0; 4613 opacity:0.5; 4614} 4615 4616.gkt_checkmark_stem { 4617 display:block !important; 4618 position: absolute; 4619 width:3px; 4620 height:9px; 4621 background-color:#fff; 4622 left:11px; 4623 top:6px; 4624} 4625 4626.gkt_checkmark_kick { 4627 display:block !important; 4628 position: absolute; 4629 width:3px; 4630 height:3px; 4631 background-color:#fff; 4632 left:8px; 4633 top:12px; 4634} 4635.gktGiftCardMessageContent{ 4636 margin:0 !important; 4637 display:grid; 4638 background: #F2F2F2 0% 0% no-repeat padding-box; 4639 grid-gap:20px; 4640 overflow-y: auto; 4641} 4642 4643 4644.gktVideoMessageCheckboxRow{ 4645 display: grid; 4646 grid-auto-flow: column; 4647 4648} 4649.gktVideoMsgCheckboxLabel{ 4650 text-align: left; 4651 letter-spacing: 0px; 4652 color: #000000; 4653} 4654 .gktVideoMsgCheckboxWrapper { 4655 position: relative; 4656 display: inline-block; 4657 width: 44px; 4658 justify-self: end; 4659 height: 26px; 4660 } 4661 4662.gktVideoMsgToggle input{ 4663 opacity: 0; 4664 width: 0; 4665 height: 0; 4666 } 4667 4668.gktVideoMsgSlider, .gktVideoMsgSlider_Mobile { 4669 position: absolute; 4670 cursor: pointer; 4671 top: 0; 4672 left: 0; 4673 right: 0; 4674 bottom: 0; 4675 background-color: #fff; 4676 border: 1px solid black; 4677 -webkit-transition: .4s; 4678 transition: .4s; 4679 } 4680 4681 .gktVideoMsgSlider:before, .gktVideoMsgSlider_Mobile:before { 4682 position: absolute; 4683 content: ""; 4684 height: 20px; 4685 width: 20px; 4686 left: 4px; 4687 bottom: 4px; 4688 top:2px; 4689 background-color: white; 4690 -webkit-transition: .4s; 4691 transition: .4s; 4692 } 4693 4694 input:checked + .gktVideoMsgSlider , 4695 input:checked + .gktVideoMsgSlider_Mobile{ 4696 background-color: black; 4697 } 4698 4699 input:checked + .gktVideoMsgSlider:before, 4700 input:checked + .gktVideoMsgSlider_Mobile:before { 4701 -webkit-transform: translateX(16px); 4702 -ms-transform: translateX(16px); 4703 4704 transform: translateX(16px); 4705 } 4706 4707 .gktGiftCardContent ::-webkit-scrollbar {
4708 width: 5px; 4709 } 4710 4711 /* Track */ 4712 .gktGiftCardContent ::-webkit-scrollbar-track { 4713 background: #f1f1f1; 4714 } 4715 4716 /* Handle */ 4717 .gktGiftCardContent ::-webkit-scrollbar-thumb { 4718 background: #2c2c2c 0% 0% no-repeat padding-box; 4719 } 4720 4721 /* Handle on hover */ 4722 .gktGiftCardContent ::-webkit-scrollbar-thumb:hover { 4723 background: #000000 0% 0% no-repeat padding-box; 4724 } 4725 /* Rounded sliders */ 4726 .slider.round, .gktVideoMsgSlider, 4727 .slider.round, .gktVideoMsgSlider_Mobile { 4728 border-radius: 34px; 4729 } 4730 4731 .slider.round:before, .gktVideoMsgSlider:before , 4732 .slider.round:before, .gktVideoMsgSlider_Mobile:before { 4733 border-radius: 50%; 4734 border: 1px solid black; 4735 } 4736 4737 .gktGiftCardModalNavListItemSpan{ 4738 display: inline-grid; 4739 align-items: center; 4740 } 4741 4742.gktGiftCardModal form { 4743 position: unset; 4744} 4745 4746.gktVideoMessageFileInput{ 4747 visibility: hidden; 4748} 4749 4750/* The container */ 4751.gktGiftCardModalCheckboxContainer{ 4752 position: relative; 4753} 4754 4755 4756.gktGiftCardModalCheckbox { 4757 display: block; 4758 position: relative; 4759 padding-left: 25px; 4760 cursor: pointer; 4761 -webkit-user-select: none; 4762 -moz-user-select: none; 4763 -ms-user-select: none; 4764 user-select: none; 4765} 4766 4767 4768 4769/* Hide the browser's default checkbox */ 4770.gktGiftCardModalCheckbox input { 4771 position: absolute; 4772 opacity: 0; 4773 cursor: pointer; 4774 height: 0; 4775 width: 0; 4776} 4777 4778/* Create a custom checkbox */ 4779 4780.gktCustomCheckboxCheckmarkSmall { 4781 position: absolute; 4782 top: 0px; 4783 left: 0px; 4784 height: 18px; 4785 width: 18px; 4786 border: 1px solid #a2a2a2; 4787 border-radius: 4px; 4788} 4789 4790/* On mouse-over, add a grey background color */ 4791.gktGiftCardModalCheckbox:hover input ~ .gktCustomCheckboxCheckmarkSmall { 4792 background-color: #ccc; 4793} 4794 4795/* When the checkbox is checked, add a blue background 4796.gktGiftCardModalCheckbox input:checked ~ .gktCustomCheckboxCheckmarkSmall { 4797 background-color: #2196F3; 4798} */ 4799 4800/* Create the gktCustomCheckboxCheckmarkSmall/indicator (hidden when not checked) */ 4801.gktCustomCheckboxCheckmarkSmall:after { 4802 content: ""; 4803 position: absolute; 4804 display: none; 4805} 4806 4807/* Show the gktCustomCheckboxCheckmarkSmall when checked */ 4808.gktGiftCardModalCheckbox input:checked ~ .gktCustomCheckboxCheckmarkSmall:after { 4809 display: block; 4810} 4811 4812/* Style the gktCustomCheckboxCheckmarkSmall/indicator */ 4813.gktGiftCardModalCheckbox .gktCustomCheckboxCheckmarkSmall:after { 4814 left: 5px; 4815 top: 1px; 4816 width: 6px; 4817 height: 10px; 4818 border: solid #009c00; 4819 border-width: 0 3px 3px 0; 4820 -webkit-transform: rotate(45deg); 4821 -ms-transform: rotate(45deg); 4822 transform: rotate(45deg); 4823} 4824 4825 4826 4827 4828 4829 4830 4831 4832 .gktGiftMessageContainer { 4833 display: grid; 4834 grid-template-columns: 1fr; 4835 grid-template-rows: auto; 4836 padding: 5px 0px; 4837 } 4838 4839 .gktGiftMessageItemContainer{ 4840 display: grid; 4841 grid-template-columns: 1fr; 4842 grid-template-rows: auto; 4843 padding: 3px 0px; 4844 margin: 3px 0px; 4845 border-radius: 3px; 4846 font-size: 14px; 4847 } 4848 4849 .gktGiftMessageItemContainer label { 4850 margin-bottom: 0px 4851 } 4852 4853 .gktGiftMessageItemContainerLabelText{ 4854 align-self: center; 4855 font-size:14px; 4856 justify-self: left; 4857 text-align: left; 4858 } 4859 4860 .gktGiftMessageItemContainerLabelText > p{ 4861 padding: 0px; 4862 margin: 0px; 4863 } 4864 4865 .gktGiftMessageImage{ 4866 width: 40px; 4867 height: 40px; 4868 border: 1px solid #f1f2f3; 4869 } 4870 .gktGiftMessageItemContainerItem1{ 4871 grid-row: 1 / 5; 4872 } 4873 4874 .gktGiftMessageItemContainerItem2{ 4875 4876 } 4877 4878 .gktGiftMessageItemContainerItem3{ 4879 position: relative; 4880 display: flex; 4881 width: fit-content; 4882 height: 30px; 4883 border-radius: 4px; 4884 overflow: hidden; 4885 } 4886 4887 label.gktCustomCheckboxMsgContainer { 4888 display: grid; 4889 grid-template-columns: 1fr; 4890 min-height: 30px; 4891 font-weight: 600; 4892 } 4893 4894 /* The container */ 4895 .gktCustomCheckboxMsgContainer { 4896 display: block; 4897 position: relative; 4898 padding-left: 35px; 4899 4900 cursor: pointer; 4901 -webkit-user-select: none; 4902 -moz-user-select: none; 4903 -ms-user-select: none; 4904 user-select: none; 4905 } 4906 4907 /* Hide the browser's default checkbox */ 4908 .gktCustomCheckboxMsgContainer input { 4909 position: absolute; 4910 opacity: 0; 4911 cursor: pointer; 4912 height: 0; 4913 width: 0; 4914 } 4915 4916 /* Create a custom checkbox */ 4917 .gktCustomMsgCheckboxCheckmark { 4918 position: absolute; 4919 top: 2px; 4920 left: 0; 4921 height: 25px; 4922 width: 25px; 4923 border: 1px solid #a2a2a2; 4924 border-radius: 4px; 4925 } 4926 4927 /* On mouse-over, add a grey background color */ 4928 .gktCustomCheckboxMsgContainer:hover input ~ .gktCustomMsgCheckboxCheckmark { 4929 background-color: #ccc; 4930 } 4931 4932 /* When the checkbox is checked, add a blue background 4933 .gktCustomCheckboxMsgContainer input:checked ~ .gktCustomMsgCheckboxCheckmark { 4934 background-color: #2196F3; 4935 } */ 4936 4937 /* Create the gktCustomMsgCheckboxCheckmark/indicator (hidden when not checked) */ 4938 .gktCustomMsgCheckboxCheckmark:after { 4939 content: ""; 4940 position: absolute; 4941 display: none; 4942 } 4943 4944 /* Show the gktCustomMsgCheckboxCheckmark when checked */ 4945 .gktCustomCheckboxMsgContainer input:checked ~ .gktCustomMsgCheckboxCheckmark:after { 4946 display: block; 4947 } 4948 4949 /* Style the gktCustomMsgCheckboxCheckmark/indicator */ 4950 .gktCustomCheckboxMsgContainer .gktCustomMsgCheckboxCheckmark:after { 4951 left: 8px; 4952 top: 1px; 4953 width: 8px; 4954 height: 16px; 4955 border: solid #009c00; 4956 border-width: 0 3px 3px 0; 4957 -webkit-transform: rotate(45deg); 4958 -ms-transform: rotate(45deg); 4959 transform: rotate(45deg); 4960 } 4961 4962 4963 textarea.gktGiftMessageTextArea { 4964 display: none; 4965 border: 1px solid #b9babb; 4966 height: 60px; 4967 margin-left: 1px; 4968 -webkit-transition: all 0.6s ease-in-out; 4969 transition: all 0.6s ease-in-out; 4970 font-size: 14px; 4971 4972 } 4973 4974 4975 4976 .openGiftKartModal { 4977 vertical-align: middle; 4978 } 4979 4980 #other { 4981 text-align: right; 4982 width: 100%; 4983 max-width: 100%; 4984 } 4985 4986 .header__inline h1, 4987 .header__inline h2, 4988 .header__inline h3, 4989 .header__inline h4, 4990 .header__inline h5, 4991 .header__inline h6, 4992 .header__inline p { 4993 display: inline; 4994 } 4995 4996 4997 .GiftKartModalbtn:hover, 4998 .gktModalSave:hover { 4999 transform: scale(0.95); 5000 } 5001 5002 5003 .GiftKartContainer { 5004 display: none; 5005 width: 100%; 5006 height: 100vh; 5007 position: fixed; 5008 opacity: 1; 5009 background: #222; 5010 z-index: 999999999; 5011 top: 0; 5012 left: 0; 5013 overflow: hidden; 5014 animation-name: fadeIn_Container; 5015 animation-duration: 1s 5016 } 5017 5018 .GiftKartModal { 5019 display: none; 5020 top: 0; 5021 min-width: 250px; 5022 width: 50vw !important; 5023 margin: 0 auto; 5024 margin-top: 25vh !important; 5025 z-index: 9999999999; 5026 background: #fff; 5027 box-shadow: 0 0 10px #000; 5028 animation-name: fadeIn_Modal; 5029 animation-duration: .8s; 5030 } 5031 5032 .GiftKartheader { 5033 padding: 5px 10px; 5034 width: 100%; 5035 height: 70px; 5036 border-radius: 10px 10px 0 0; 5037 border-bottom: 2px solid #ccc 5038 } 5039 5040 .GiftKartheader a { 5041 text-decoration: none; 5042 float: right; 5043 line-height: 70px; 5044 margin-right: 20px; 5045 color: #aaa 5046 } 5047 5048 .GiftKartcontent { 5049 width: 100%; 5050 } 5051 5052 #first_label { 5053 padding-top: 30px 5054 } 5055 5056 #second_label { 5057 padding-top: 25px 5058 } 5059 5060 .GiftKartfooter, 5061 .gktModalFooter { 5062 padding: 13px 10px; 5063 text-align: right; 5064 width: 100%; 5065 5066 } 5067 5068 5069 5070 5071 @media screen and (max-width: 900px) { 5072 .GiftKartModalContent-left { 5073 display: none; 5074 } 5075 5076 .GiftKartModalContent { 5077 grid-template-columns: 1fr !important; 5078 } 5079 5080 .GiftKartModalContent-right-giftingOptions { 5081 font-size: 15px !important; 5082 } 5083 } 5084
5085 @keyframes fadeIn_Modal { 5086 from { 5087 opacity: 0 5088 } 5089 5090 to { 5091 opacity: 1 5092 } 5093 } 5094 5095 @keyframes fadeIn_Container { 5096 from { 5097 opacity: 0 5098 } 5099 5100 to { 5101 opacity: .9 5102 } 5103 } 5104 5105 #is-a-gift { 5106 margin: 0px; 5107 padding: 10px; 5108 } 5109 5110 #giftnote, 5111 .gktMessageTextarea { 5112 color: #636363; 5113 border: 1px solid #ccc; 5114 width: 100%; 5115 border-radius: 5px; 5116 height: 200px; 5117 padding: 10px; 5118 margin-top: 5px; 5119 resize: none; 5120 font-size: 14px !important; 5121 } 5122 5123 .giftnote-giftKart { 5124 border: 1px solid black !important; 5125 border-radius: 0px !important; 5126 } 5127 5128 .giftnote-giftKart:focus { 5129 outline: 0; 5130 } 5131 5132 .GiftKartModalContent { 5133 display: grid; 5134 grid-template-columns: 1fr 1fr; 5135 grid-template-rows: 1; 5136 } 5137 5138 .GiftKartModalContent-right { 5139 display: grid; 5140 grid-template-columns: 1fr; 5141 grid-template-rows: 30px 50px; 5142 } 5143 5144 .GiftKartModalContent-right-closeButton, 5145 .gktModalClose { 5146 fill: rgba(255, 255, 255, 0.851); 5147 background: rgba(32, 33, 36, 0.1); 5148 -webkit-border-radius: 50%; 5149 border-radius: 50%; 5150 width: 24px; 5151 height: 24px; 5152 padding: 1px; 5153 align-self: baseline; 5154 justify-self: end; 5155 margin-top: 3px; 5156 margin-right: 3px; 5157 cursor: pointer; 5158 } 5159 5160 .GiftKartModalContent-right-header { 5161 align-self: center; 5162 justify-self: center; 5163 font-weight: 1000; 5164 } 5165 5166 .GiftKartModalContent-right-giftingOptions { 5167 font-size: 20px; 5168 padding: 10px; 5169 } 5170 5171 .GiftKartModalContent-right-footer { 5172 margin: 15px 20px; 5173 display: grid; 5174 align-items: center; 5175 } 5176 5177 .GiftKartModalbtn, 5178 .gktModalSave { 5179 cursor: pointer; 5180 padding: 6px 12px; 5181 font-weight: 500; 5182 text-align: center; 5183 background-color: #A96668; 5184 color: white; 5185 transition: transform .2s; 5186 margin: 0 20%; 5187 } 5188 5189 .ql-size-small { 5190 font-size: 11px; 5191 } 5192 5193 .ql-size-large { 5194 font-size: 26px; 5195 } 5196 5197 .ql-size-huge { 5198 font-size: 36px; 5199 } 5200 5201 .gktModalWrapper { 5202 5203 display: none; 5204 width: 100%; 5205 height: 100vh; 5206 position: fixed; 5207 opacity: 1; 5208 background: #222; 5209 z-index: 999999999; 5210 top: 0; 5211 left: 0; 5212 overflow: hidden; 5213 animation-name: fadeIn_Container; 5214 animation-duration: 1s 5215 } 5216 5217 /* Modal Content */ 5218 .gktModal { 5219 5220 position: fixed; 5221 top: 25%; 5222 left: 50%; 5223 min-width: 250px; 5224 width: 50vw !important; 5225 margin: 10px auto; 5226 padding: 10px; 5227 margin-top: 25vh !important; 5228 border-radius: 2%; 5229 background: #fefefe; 5230 box-shadow: 0 0 10px #000; 5231 animation-name: fadeIn_Modal; 5232 animation-duration: .8s; 5233 5234 transform: translate(-50%, -50%); 5235 } 5236 5237 5238 5239 5240 .gktModalClose:hover, 5241 .gktModalClose:focus { 5242 color: #000; 5243 text-decoration: none; 5244 cursor: pointer; 5245 } 5246 5247 5248 5249 .gktPageWrapper { 5250 display: grid; 5251 grid-template-columns: 1fr; 5252 cursor: pointer !important; 5253 margin-bottom: 5px; 5254 /* padding: 0px 10px; */ 5255 } 5256 5257 5258 .gktPageWrapperV2 { 5259 display: grid; 5260 grid-template-columns: 1fr; 5261 cursor: pointer !important; 5262 5263 } 5264 5265 .gktProductPageUpsellWrapper { 5266 display: none; 5267 width: 100% 5268 } 5269 5270 .gktComboWrapper { 5271 display: none; 5272 , 5273 width: 100% 5274 } 5275 5276 .gktGiftMessageWrapper { 5277 display: none; 5278 width: 100% 5279 } 5280 5281 .gktGiftMsgAndWrapWrapper { 5282 display: none; 5283 width: 100% 5284 } 5285 5286 5287 .gktCartUpsellWrapper { 5288 display: none; 5289 width: 100% 5290 } 5291 5292 5293 5294 .gktCartGiftMessageWrapper { 5295 display: none; 5296 width: 100% 5297 } 5298 5299 .gktCartGiftMsgAndWrapWrapper { 5300 display: none; 5301 width: 100% 5302 } 5303 5304 .gktGiftMessageWrapper { 5305 display: none; 5306 width: 100% 5307 } 5308 5309 .gktCartGiftMessageWrapper { 5310 display: none; 5311 width: 100% 5312 } 5313 5314 5315 .gktPageWrapper input { 5316 display: inline-block; 5317 } 5318 5319 .gktPageWrapper label { 5320 margin-left: 1px; 5321 } 5322 5323 .giftCartPageWrapper { 5324 display: grid; 5325 grid-template-columns: 25px 4fr; 5326 align-items: baseline; 5327 justify-items: start; 5328 } 5329 5330 5331 5332 .gktModalHeader { 5333 padding: 10px; 5334 } 5335 5336 .gktContentWrapper { 5337 display: grid; 5338 } 5339 5340 .gktGridLayout { 5341 /* is attached dynamically to gktContentWrapper*/ 5342 grid-template-columns: 1fr 1fr; 5343 } 5344 5345 /*.gktLeftContent and gktRightContent */ 5346 .gktContentWrapper>div { 5347 display: grid; 5348 grid-template-rows: 1fr 3fr; 5349 grid-gap: 10px; 5350 padding: 5px 10px; 5351 margin: 5px 10px; 5352 font-size: 30px; 5353 } 5354 5355 .gktContentWrapper>div:empty { 5356 display: none; 5357 } 5358 5359 .gktMessageCheckboxHeading, 5360 .gktWrapCheckboxHeading { 5361 font-size: 20px !important; 5362 } 5363 5364 .gktModalFooter { 5365 text-align: center; 5366 } 5367 5368 5369 5370 /* Header should be in one line*/ 5371 .gktModalHeader { 5372 display: grid; 5373 grid-template-columns: auto 25px; 5374 } 5375 5376 5377 .gktProductPageWrapper { 5378 position: relative; 5379 justify-items: start; 5380 align-items: end; 5381 } 5382 5383 .gktJustifyCenter { 5384 justify-self: center; 5385 align-self: center; 5386 } 5387 5388 .gktGiftWrapImage { 5389 width: 200px; 5390 height: 200px; 5391 background-repeat: no-repeat; 5392 background-position: 50% 50%; 5393 justify-self: center; 5394 object-fit: cover; 5395 } 5396 5397 5398 .gktCartGiftMsgAndWrapHeader { 5399 display: grid; 5400 justify-items: left; 5401 padding: 3px 0px; 5402 margin: 3px 0px; 5403 5404 } 5405 5406 .gktGiftMsgAndWrapHeader { 5407 display: grid; 5408 justify-items: left; 5409 padding: 3px 0px; 5410 margin: 3px 0px; 5411 } 5412 5413 .gktGiftMsgAndWrapWrapperInnerEle { 5414 display: grid !important; 5415 grid-template-columns: 25px auto; 5416 align-items: center; 5417 justify-items: center; 5418 user-select: none; 5419 } 5420 5421 .gktGiftMsgAndWrapWrapperInnerEle p { 5422 margin: 0 !important; 5423 padding: 0 !important; 5424 } 5425 5426 5427 .gktGiftMsgAndWrapHeader>label { 5428 margin: 0 !important; 5429 padding: 0 !important; 5430 } 5431 5432 .gktCartGiftMsgAndWrapHeader>label { 5433 margin: 0 !important; 5434 padding: 0 !important; 5435 } 5436 5437 .gift-checkbox-giftKart { 5438 align-self: center; 5439 justify-self: center; 5440 } 5441 5442 .gktCheckboxLayout { 5443 display: grid !important; 5444 grid-template-columns: 25px auto; 5445 font-size: 20px; 5446 align-items: center; 5447 } 5448 5449 .gktMessageCheckboxHeading>p, 5450 .gktModalPopupHeading>p, 5451 .gktGiftWrapCheckboxHeading>p { 5452 margin: 0 !important; 5453 } 5454 5455 .gktAlignCenter { 5456 align-self: center; 5457 } 5458 5459 @media screen and (max-width: 900px) { 5460 .gktGridLayout { 5461 grid-template-columns: 1fr; 5462 } 5463 5464 .gktContentWrapper>div { 5465 grid-template-rows: 1fr !important; 5466 } 5467 5468 .gktLeftContent { 5469 grid-template-rows: 1fr 1fr !important; 5470 } 5471 5472 .gktMessageTextarea { 5473 width: 100% !important; 5474 height: 100px !important; 5475 } 5476 5477 .gktModal { 5478 top: 10% !important; 5479 5480 } 5481 5482 .gktDisplayWrapImageOnPhone { 5483 display: block !important; 5484 } 5485 5486 .gktModal { 5487 width: 95vw !important; 5488 } 5489 5490 .gktModalWrapper p, 5491 .gktModal p { 5492 font-size: 20px !important; 5493 } 5494 5495 } 5496 5497 .ql-font-arial { 5498 font-family: 'Arial'; 5499 } 5500 5501 .ql-font-times-new-roman { 5502 font-family: 'Times New Roman'; 5503 } 5504 5505 .ql-font-courier-new { 5506 font-family: 'Courier New'; 5507 } 5508 5509 .ql-font-comic-sans-ms { 5510 font-family: 'Comic Sans MS'; 5511 } 5512 5513 .ql-font-impact { 5514 font-family: 'Impact'; 5515 } 5516 5517 .ql-font-lucida-console { 5518 font-family: 'Lucida Console'; 5519 } 5520 5521 .ql-font-lucida-sans-unicode { 5522 font-family: 'Lucida Sans Unicode'; 5523 } 5524 5525 .ql-font-tahoma { 5526 font-family: 'Tahoma'; 5527 } 5528 5529 .ql-font-verdana { 5530 font-family: 'Verdana'; 5531 } 5532 5533 .ql-font-helvetica { 5534 font-family: 'Helvetica'; 5535 } 5536 5537 .ql-font-trebuchet-ms { 5538 font-family: 'Trebuchet MS'; 5539 } 5540 5541 .ql-font-georgia { 5542 font-family: 'Georgia'; 5543 } 5544 5545 .ql-font-garamond { 5546 font-family: 'Garamond'; 5547 } 5548 5549 .ql-font-brush-script-mt { 5550 font-family: 'Brush Script MT'; 5551 } 5552 5553 .loadingCheckoutPage{ 5554 display:flex; 5555 align-items:center; 5556 justify-content: center; 5557 opacity:0.5; 5558 } 5559 5560 5561 5562 .gktGiftMessageContainer { 5563 display: grid; 5564 grid-template-columns: 1fr; 5565 grid-template-rows: auto; 5566 padding: 5px 0px; 5567 } 5568 5569 .gktGiftMessageItemContainer{ 5570 display: grid; 5571 grid-template-columns: 1fr; 5572 grid-template-rows: auto; 5573 padding: 3px 0px; 5574 margin: 3px 0px; 5575 border-radius: 3px; 5576 font-size: 14px; 5577 } 5578 5579 .gktGiftMessageItemContainer label { 5580 margin-bottom: 0px 5581 } 5582 5583 .gktGiftMessageItemContainerLabelText{
5584 align-self: center; 5585 font-size:14px; 5586 justify-self: left; 5587 text-align: left; 5588 } 5589 .gktGiftMessageImage{ 5590 width: 40px; 5591 height: 40px; 5592 border: 1px solid #f1f2f3; 5593 } 5594 .gktGiftMessageItemContainerItem1{ 5595 grid-row: 1 / 5; 5596 } 5597 5598 .gktGiftMessageItemContainerItem2{ 5599 5600 } 5601 5602 .gktGiftMessageItemContainerItem3{ 5603 position: relative; 5604 display: flex; 5605 width: fit-content; 5606 height: 30px; 5607 border-radius: 4px; 5608 overflow: hidden; 5609 } 5610 5611 label.gktGiftMsgAndWrapWrapperInnerEle { 5612 display: grid; 5613 grid-template-columns: 1fr; 5614 min-height: 30px; 5615 font-weight: 600; 5616 } 5617 5618 /* The container */ 5619 .gktGiftMsgAndWrapWrapperInnerEle { 5620 display: block; 5621 position: relative; 5622 padding-left: 35px; 5623 5624 cursor: pointer; 5625 -webkit-user-select: none; 5626 -moz-user-select: none; 5627 -ms-user-select: none; 5628 user-select: none; 5629 } 5630 5631 /* Hide the browser's default checkbox */ 5632 .gktGiftMsgAndWrapWrapperInnerEle input { 5633 position: absolute; 5634 opacity: 0; 5635 cursor: pointer; 5636 height: 0; 5637 width: 0; 5638 } 5639 5640 /* Create a custom checkbox */ 5641 .gktCustomWrapCheckboxCheckmark { 5642 position: absolute; 5643 top: 2px; 5644 left: 0; 5645 height: 25px; 5646 width: 25px; 5647 border: 1px solid #a2a2a2; 5648 border-radius: 4px; 5649 } 5650 5651 /* On mouse-over, add a grey background color */ 5652 .gktGiftMsgAndWrapWrapperInnerEle:hover input ~ .gktCustomWrapCheckboxCheckmark { 5653 background-color: #ccc; 5654 } 5655 5656 /* When the checkbox is checked, add a blue background 5657 .gktGiftMsgAndWrapWrapperInnerEle input:checked ~ .gktCustomWrapCheckboxCheckmark { 5658 background-color: #2196F3; 5659 } */ 5660 5661 /* Create the gktCustomWrapCheckboxCheckmark/indicator (hidden when not checked) */ 5662 .gktCustomWrapCheckboxCheckmark:after { 5663 content: ""; 5664 position: absolute; 5665 display: none; 5666 } 5667 5668 /* Show the gktCustomWrapCheckboxCheckmark when checked */ 5669 .gktGiftMsgAndWrapWrapperInnerEle input:checked ~ .gktCustomWrapCheckboxCheckmark:after { 5670 display: block; 5671 } 5672 5673 /* Style the gktCustomWrapCheckboxCheckmark/indicator */ 5674 .gktGiftMsgAndWrapWrapperInnerEle .gktCustomWrapCheckboxCheckmark:after { 5675 left: 8px; 5676 top: 1px; 5677 width: 8px; 5678 height: 16px; 5679 border: solid #009c00; 5680 border-width: 0 3px 3px 0; 5681 -webkit-transform: rotate(45deg); 5682 -ms-transform: rotate(45deg); 5683 transform: rotate(45deg); 5684 } 5685 5686 5687 5688 textarea.gktGiftMessageTextArea { 5689 display: none; 5690 border: 1px solid #b9babb; 5691 height: 60px; 5692 margin-left: 1px; 5693 -webkit-transition: all 0.6s ease-in-out; 5694 transition: all 0.6s ease-in-out; 5695 font-size: 14px; 5696 } 5697 5698 5699 5700 5701.gktNotificationWrapper{ 5702 position:fixed; 5703 margin: 0 !important; 5704 padding: 0 !important; 5705 top: 40px; 5706 right: 5px; 5707 display: none; 5708 z-index: 99999999999999; 5709} 5710 5711.gktNotificationItem{ 5712 margin: 4px 0px; 5713 background: white; 5714 color: black; 5715 padding: 4px 8px; 5716 -moz-box-shadow: 10px 10px 16px #000000; 5717 -webkit-box-shadow: 10px 10px 16px #000000; 5718 box-shadow: 0px 15px 30px rgba(0,0,0,0.08); 5719 max-width: 250px; 5720 display:grid; 5721 grid-template-columns: 30px 1fr 20px; 5722 justify-items: center; 5723 align-items: center; 5724 border-left: 5px solid green; 5725 border-radius: 4px; 5726 transform: translateX(300px); 5727 transition: 0.3s; 5728} 5729 5730.gktNotificationItemContent{ 5731 padding-right: 10px; 5732 5733} 5734 5735.gktNotificationItemContent2{ 5736 display: grid; 5737 justify-self: start; 5738 align-self: center; 5739 5740} 5741 5742.gktNotificationItemContent3{ 5743 display: grid; 5744 font-size: 14px; 5745 justify-self: start; 5746} 5747.gktNotificationItemContent4{ 5748 display: grid; 5749 justify-self: end; 5750} 5751 5752 5753 5754 5755.gktNotificationItemContent3SubText{ 5756 font-size: 12px; 5757} 5758 5759 5760 5761 5762 5763 5764.gktOneClickUpsellContainer { 5765 display: grid; 5766 grid-template-columns: 1fr; 5767 grid-template-rows: auto; 5768 padding: 5px 0px; 5769} 5770 5771.gktOneClickUpsellItemContainer{ 5772 display: grid; 5773 grid-template-columns: 1fr; 5774 grid-template-rows: auto; 5775 padding: 3px 0px; 5776 margin: 3px 0px; 5777 border-radius: 3px; 5778 font-size: 14px; 5779} 5780 5781.gktOneClickUpsellItemContainer label { 5782 margin-bottom: 0px 5783} 5784 5785.gktOneClickUpsellItemContainerLabelText{ 5786 align-self: center; 5787 font-size:12px; 5788 justify-self: left; 5789 text-align: left; 5790} 5791.gktOneClickUpsellImage{ 5792 width: 40px; 5793 height: 40px; 5794 border: 1px solid #f1f2f3; 5795} 5796.gktOneClickUpsellItemContainerItem1{ 5797 grid-row: 1 / 5; 5798} 5799 5800.gktOneClickUpsellItemContainerItem2{ 5801 5802} 5803 5804.gktOneClickUpsellItemContainerItem3{ 5805 position: relative; 5806 display: flex; 5807 width: fit-content; 5808 height: 30px; 5809 border-radius: 4px; 5810 overflow: hidden; 5811} 5812 5813 label.gktCustomCheckboxContainer { 5814 display: grid; 5815 grid-template-columns: 5fr 1fr; 5816} 5817 5818/* The container */ 5819.gktCustomCheckboxContainer { 5820 display: block; 5821 position: relative; 5822 padding-left: 35px; 5823 5824 cursor: pointer; 5825 -webkit-user-select: none; 5826 -moz-user-select: none; 5827 -ms-user-select: none; 5828 user-select: none; 5829} 5830 5831/* Hide the browser's default checkbox */ 5832.gktCustomCheckboxContainer input { 5833 position: absolute; 5834 opacity: 0; 5835 cursor: pointer; 5836 height: 0; 5837 width: 0; 5838} 5839 5840/* Create a custom checkbox */ 5841.gktCustomCheckboxCheckmark { 5842 position: absolute; 5843 top: 5px; 5844 left: 0; 5845 height: 25px; 5846 width: 25px; 5847 border: 1px solid #a2a2a2; 5848 border-radius: 4px; 5849} 5850 5851/* On mouse-over, add a grey background color */ 5852.gktCustomCheckboxContainer:hover input ~ .gktCustomCheckboxCheckmark { 5853 background-color: #ccc; 5854} 5855 5856/* When the checkbox is checked, add a blue background 5857.gktCustomCheckboxContainer input:checked ~ .gktCustomCheckboxCheckmark { 5858 background-color: #2196F3; 5859} */ 5860 5861/* Create the gktCustomCheckboxCheckmark/indicator (hidden when not checked) */ 5862.gktCustomCheckboxCheckmark:after {
5863 content: ""; 5864 position: absolute; 5865 display: none; 5866} 5867 5868/* Show the gktCustomCheckboxCheckmark when checked */ 5869.gktCustomCheckboxContainer input:checked ~ .gktCustomCheckboxCheckmark:after { 5870 display: block; 5871} 5872 5873/* Style the gktCustomCheckboxCheckmark/indicator */ 5874.gktCustomCheckboxContainer .gktCustomCheckboxCheckmark:after { 5875 left: 8px; 5876 top: 1px; 5877 width: 8px; 5878 height: 16px; 5879 border: solid #009c00; 5880 border-width: 0 3px 3px 0; 5881 -webkit-transform: rotate(45deg); 5882 -ms-transform: rotate(45deg); 5883 transform: rotate(45deg); 5884} 5885 5886 .gktVideoPlayerHide { 5887 display: none !important; 5888 } 5889 5890 .gktVideoMsgPlayerWrapper { 5891 /* height: 100vh; */ 5892 z-index: 10000000000000; 5893 display: none; 5894 align-items: center; 5895 justify-items: center; 5896 width: 100%; 5897 /* position: fixed; */ 5898 top: 30px; 5899 margin: 10px auto; 5900 } 5901 5902 .gktRecorder { 5903 width: 100%; 5904 min-height: 250px; 5905 position: relative; 5906 border-radius: 2%; 5907 overflow: hidden; 5908 } 5909 5910 .gktVideoPlayer, 5911 .gktVideoPlayerRecording { 5912 width: 100%; 5913 height: auto; 5914 } 5915 5916 .gktRecorderCloseBtn { 5917 position: absolute; 5918 z-index: 1; 5919 left: 2%; 5920 top: 5%; 5921 background: transparent; 5922 border: none; 5923 display: none; 5924 } 5925 5926 .gktRecorderCloseBtn img { 5927 height: 30px; 5928 width: 30px; 5929 filter: invert(90%); 5930 cursor: pointer; 5931 } 5932 5933 .gktVideoPlayerStartBtn, 5934 .gktVideoPlayerStopBtn { 5935 position: absolute; 5936 bottom: 2%; 5937 left: 50%; 5938 transform: translateX(-50%); 5939 cursor: pointer; 5940 height: 60px; 5941 width: 60px; 5942 border-radius: 50%; 5943 border: none; 5944 background-color: transparent; 5945 } 5946 5947 .gktVideoPlayerStartBtn { 5948 background-color: white; 5949 } 5950 5951 .gktVideoPlayerStopBtn { 5952 background-color: red; 5953 } 5954 5955 .gktVideoPlayerRedDot, 5956 .gktVideoPlayerRedSquare { 5957 height: 20px; 5958 width: 20px; 5959 position: absolute; 5960 top: 50%; 5961 left: 50%; 5962 transform: translate(-50%, -50%); 5963 } 5964 5965 .gktVideoPlayerRedDot { 5966 background-color: red; 5967 border-radius: 50%; 5968 } 5969 5970 .gktVideoPlayerRedSquare { 5971 background-color: white; 5972 border-radius: 10%; 5973 } 5974 5975 .gktPermissionDenied { 5976 position: absolute; 5977 top: 50%; 5978 left: 50%; 5979 transform: translate(-50%, -50%); 5980 color: white; 5981 font-size: 16px; 5982 } 5983 5984 .gktVideoPlayerTimeLeft { 5985 position: absolute; 5986 bottom: 4%; 5987 right: 4%; 5988 color: white; 5989 font-size: 12px; 5990 background: black; 5991 padding: 4px; 5992 color: white; 5993 opacity: 0.7; 5994 } 5995 5996 .gktVideoPlayerStatus { 5997 position: absolute; 5998 bottom: 4%; 5999 left: 4%; 6000 font-size: 12px; 6001 padding: 4px; 6002 background-color: black; 6003 color: white; 6004 opacity: 0.7; 6005 } 6006 6007 6008 6009 .gktVideoPlayerControls { 6010 width: 100%; 6011 text-align: center; 6012 position: absolute; 6013 top: 50%; 6014 left: 50%; 6015 transform: translate(-50%, -50%); 6016 z-index: 1; 6017 display: grid; 6018 grid-template-columns: repeat(3, 1fr); 6019 justify-content: space-evenly; 6020 align-items: center; 6021 } 6022 6023 .gktLoadingHeading { 6024 position: absolute; 6025 top: 50%; 6026 left: 50%; 6027 transform: translate(-50%, -50%); 6028 z-index: 1; 6029 color: white; 6030 font-size: 20px; 6031 } 6032 6033 .gktUploadingVideoHeading { 6034 position: absolute; 6035 top: 50%; 6036 left: 50%; 6037 transform: translate(-50%, -50%); 6038 z-index: 1; 6039 color: #e3dada; 6040 font-size: 16px; 6041 text-align: center; 6042 line-height: 40px; 6043 } 6044 6045 .gktVideoPlayerControlsAcceptBtnDiv, 6046 .gktVideoPlayerControlsPlayBtnDiv, 6047 .gktVideoPlayerControlsReStartBtnDiv{ 6048 display: flex; 6049 flex-direction: column; 6050 justify-content: center; 6051 align-items: center; 6052 } 6053 6054 .gktVideoPlayerControlsBtnDivInfo{ 6055 font-size: 12px; 6056 color: white; 6057 margin: 0 0 8px 0; 6058 } 6059 6060 .gktVideoPlayerControlsAcceptBtn, 6061 .gktVideoPlayerControlsPlayBtn, 6062 .gktVideoPlayerControlsReStartBtn { 6063 background-color: transparent; 6064 height: 90px; 6065 width: 90px; 6066 border-radius: 50%; 6067 cursor: pointer; 6068 border:0; 6069 /* margin-right: 20px; */ 6070 } 6071 6072 old.gktVideoPlayerControlsAcceptBtn { 6073 border: 5px solid #3ce669; 6074 } 6075 6076 old.gktVideoPlayerControlsPlayBtn { 6077 border: 5px solid #d3d3d3; 6078 } 6079 6080 old.gktVideoPlayerControlsReStartBtn { 6081 border: 5px solid #e03838; 6082 } 6083 6084 .gktVideoPlayerControlsAcceptBtnImg, 6085 .gktVideoPlayerControlsPlayBtnImg, 6086 .gktVideoPlayerControlsReStartBtnImg { 6087 height: auto; 6088 width: 100%; 6089 } 6090 6091 old.gktVideoPlayerControlsAcceptBtnImg { 6092 filter: invert(69%) sepia(59%) saturate(537%) hue-rotate(80deg) brightness(98%) contrast(93%); 6093 } 6094 6095 old.gktVideoPlayerControlsPlayBtnImg { 6096 filter: invert(100%) sepia(0) saturate(7500%) hue-rotate(116deg) brightness(80%) contrast(109%); 6097 } 6098 6099 old.gktVideoPlayerControlsReStartBtnImg { 6100 filter: invert(23%) sepia(77%) saturate(3858%) hue-rotate(348deg) brightness(98%) contrast(80%); 6101 } 6102 6103 /* 500px and down */ 6104 @media only screen and (max-width: 600px) { 6105 .gktVideoPlayerRecording { 6106 object-fit: cover; 6107 height: 100%; 6108 } 6109 .gktRecorder { 6110 min-height: 36vh; 6111 } 6112 .gktVideoPlayer, 6113 .gktVideoPlayerRecording{ 6114 width: 100%; 6115 object-fit: cover; 6116 position: absolute; 6117 height: 100%; 6118 } 6119 /* .gktVideoPlayerControlsAcceptBtn, 6120 .gktVideoPlayerControlsPlayBtn, 6121 .gktVideoPlayerControlsReStartBtn { 6122 height: 50px; 6123 width: 50px; 6124 } */ 6125 6126 .gktVideoPlayerControlsAcceptBtnImg, 6127 .gktVideoPlayerControlsPlayBtnImg, 6128 .gktVideoPlayerControlsReStartBtnImg { 6129 height: 28px; 6130 width: 28px; 6131 } 6132 } 6133 6134 /* 350px and down */ 6135 @media only screen and (max-width: 600px) { 6136 6137 6138 6139 6140 .gktVideoPlayerStartBtn, 6141 .gktVideoPlayerStopBtn { 6142 height: 40px; 6143 width: 40px; 6144 } 6145 6146 .gktVideoPlayerRedDot, 6147 .gktVideoPlayerRedSquare { 6148 width: 10px; 6149 height: 10px; 6150 } 6151 6152 } 6153 .gktGiftCardMessageContent{ 6154 overflow-y:auto; 6155 } 6156 .gktGiftCardMessageContent ::-webkit-scrollbar {
6157 width: 5px; 6158 } 6159 6160 /* Track */ 6161 .gktGiftCardMessageContent ::-webkit-scrollbar-track { 6162 background: #f1f1f1; 6163 } 6164 6165 /* Handle */ 6166 .gktGiftCardMessageContent ::-webkit-scrollbar-thumb { 6167 background: #2c2c2c 0% 0% no-repeat padding-box; 6168 } 6169 6170 /* Handle on hover */ 6171 .gktGiftCardMessageContent ::-webkit-scrollbar-thumb:hover { 6172 background: #000000 0% 0% no-repeat padding-box; 6173 } 6174 6175 /* Extra small devices (phones, 600px and down) */ 6176 /* @media only screen and (max-width: 800px) { 6177 .gktRecorder { 6178 width: 375px; 6179 height: 650px; 6180 background-color: black; 6181 } 6182 6183 .gktVideoPlayer, 6184 .gktVideoPlayerRecording { 6185 top: 50%; 6186 left: 50%; 6187 transform: translate(-50%, -50%); 6188 } 6189 6190 .gktVideoPlayerRecording { 6191 object-fit: contain; 6192 } 6193 6194 .gktVideoPlayerControls { 6195 width: 80%; 6196 } 6197 6198 .gktVideoPlayerControlsAcceptBtn, 6199 .gktVideoPlayerControlsPlayBtn, 6200 .gktVideoPlayerControlsReStartBtn { 6201 margin-right: 7px; 6202 } 6203 6204 .gktVideoPlayerTimeLeft, 6205 .gktVideoPlayerStatus { 6206 font-size: 18px; 6207 background-color: rgba(0,0,0,0.2); 6208 padding: 2px 4px; 6209 } 6210 6211 } */ 6212 6213 6214 /* @media only screen and (max-width: 850px) {} */ 6215 6216 /* Small devices (portrait tablets and large phones, 600px and up) */ 6217 /* @media only screen and (min-width: 600px) {} */ 6218 6219 /* Medium devices (landscape tablets, 768px and up) */ 6220 /* @media only screen and (min-width: 768px) {} */ 6221 6222 /* Large devices (laptops/desktops, 992px and up) */ 6223 @media only screen and (min-width: 900px) { 6224 .gktRecorder { 6225 min-height: 180px; 6226 height: 100%; 6227 } 6228 .gktRecord,.gktRecorded{ 6229 height: 100%; 6230 } 6231 .gktVideoPlayer, .gktVideoPlayerRecording{ 6232 width: 100%; 6233 object-fit: cover; 6234 height: 100%; 6235 } 6236 .gktVideoMsgPlayerWrapper{ 6237 height: 300px; 6238 } 6239 6240 .gktGiftCardMessageContent{ 6241 max-height: 350px; 6242 } 6243 6244 } 6245 6246 /* Extra large devices (large laptops and desktops, 1200px and up) */ 6247 /* @media only screen and (min-width: 1200px) {} */ 6248 </style> 6249
6250<script async> 6251 // import a file from 6252 let DEFAULT_addToCartBtnSelectors = 'input[name="add"], button[name="add"], form[action*="/cart/add"] input[type="submit"], form[action*="/cart/add"] button[type="submit"], form[action*="/cart/add"] button:not([type="button"]), form[action*="/cart/add"] .gkt__add-to-cart'; 6253 let DEFAULT_checkoutBtnSelectors = 'button[name="checkout"], input[name="checkout"], form[action*="/cart"] a[href="/checkout"], a[href="/checkout"], form[action="/cart"] input[type="submit"][name="checkout"], form[action="/cart"] button[type="submit"][name="checkout"]'; 6254 let DEFAULT_quantityBtnSelectors = '.ajaxcart__qty,quantity-input .quantity,.product-form__input, .product-form__quantity '; 6255 let DEFAULT_sideCartSelectors = '.cart-notification,cart-notification,.cart-notification-wrapper,#cart-notification, #CartDrawer, .drawer, .drawer-cover, .Drawer'; 6256 let DEFAULT_buyNowBtn = '.shopify-payment-button__button, .shopify-payment-button__button--unbranded'; 6257 let DEFAULT_cartForm = 'form[action="/cart"], form[action="/cart/"], form[action="cart"]'; 6258 6259 6260 // window = this.window || {}; 6261 6262 // the below code is liquid code that we are using in our theme.liquid file 6263 // how do i avoid compilation issues with js 6264 6265 // let liquidValues = require('../snippets/shopify-liquid-values.liquid'); 6266 6267 //initialze liquid values 6268 // check if window.shopifyLiquidValues EXISTS , if not then 6269 // if(window.shopifyLiquidValues){ 6270 // console.log("window.shopifyLiquidValues is coming from theme-app-extension",window.shopifyLiquidValues); 6271 // return 6272 // } 6273 6274 6275 // console.log(document?.currentScript?.src); 6276 // old-code should execute when new code isnt prresent 6277 6278 if(!window.shopifyLiquidValues){ 6279 let shopifyLiquidValues = { 6280 product: { handle: null }, 6281 selected_or_first_available_variant: null, 6282 customer: { 6283 first_name: null, 6284 email: null, 6285 id: null, 6286 has_account: null, 6287 total_spent: null 6288 } 6289 } 6290 6291 window.shopifyLiquidValues = shopifyLiquidValues; 6292 } 6293 6294 // {liquidValues} 6295 // // liquidValues 6296 6297 var gktUtils = { 6298 f: {} 6299 } 6300 window.gktUtils = gktUtils; 6301 6302 /* 6303 *fn(param1, param2) => 6304 *param1 is url of script that we suppose to load 6305 *param2 is function that should be called after script is loaded 6306 */ 6307 gktUtils.f.loadScript = function (a, b) { 6308 var c = document.createElement("script"); 6309 c.type = "text/javascript"; 6310 c.src = a; 6311 document.getElementsByTagName("head")[0].appendChild(c) 6312 c.onload = function () { b() }; 6313 }; 6314 6315 /* 6316 * we changed loadScript function - if else block for onload is removed as it was not making sense 6317 *fn(param1) => 6318 *param1 - represents function that should be executed once jquery is loaded 6319 *https://www.w3schools.com/jquery/jquery_noconflict.asp 6320 */ 6321 gktUtils.f.loadJquery = function (b) { 6322 console.log("does this work"); 6323 let flag = false; 6324 if("undefined" === typeof jQuery || 1.9 > parseFloat(jQuery.fn.jquery)){ 6325 flag = true; 6326 } 6327 if("undefined" != typeof jQuery && jQuery.post == undefined){ 6328 flag = true; 6329 } 6330 6331 if(flag){ 6332 gktUtils.f.loadScript("https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js", function () { 6333 gktJquery = jQuery.noConflict(!0); 6334 b(gktJquery) 6335 }) 6336 }else{ 6337 b(jQuery); 6338 } 6339 }; 6340 6341 var gkt = { 6342 debug: [], 6343 version: 1.1, 6344 state: { 6345 submitted: "", 6346 product_added: "", 6347 page_type: "", 6348 insertWrapperOnPage: [], 6349 cartData: undefined, 6350 isOverWriteBuyNowBtnTriggered: false, 6351 timer: undefined, 6352 freeGiftcardPopupModalTriggered: false, 6353 freeGiftcardPopupModalCount : parseInt(sessionStorage.getItem("freeGiftcardPopupModalCount"))|| 0, 6354 freeGiftcardPopupModalMAXCount : 2, 6355 gktFreeGiftcardBuyMoreProductNotificationSubHeadingShown: false,
6356 sendGiftcardOnPageBtnClicked: false, 6357 activeCampaignName: "EMPTY", 6358 }, 6359 constants: { 6360 themesIds: { 6361 DAWN_THEME: 887, 6362 VENTURE_THEME: 775, 6363 EXPRESS_THEME: 885, 6364 CRAVE_THEME: 1363, 6365 SENSE_THEME: 1356, 6366 CRAFT_THEME: 1368, 6367 } 6368 }, 6369 cartInterval: "", 6370 productinterval: "", 6371 f: { 6372 6373 bootstrap: function (settings) { 6374 console.log("bootstap?"); 6375 gkt.f.initDOM(settings); 6376 gkt.f.initThemeCSS(settings); 6377 gkt.f.globalListener(settings) 6378 // gkt.gktGiftMsgAndWrap.init(settings); 6379 gkt.storage.loadValuesFromStorage(gkt.settings); 6380 gkt.themeSpecificCode.init(gkt.settings) 6381 }, 6382 initDOM: function (settings) { 6383 console.log("initDOM?"); 6384 // gkt.$ = jQuery; 6385 gkt.$(document).ready(function () { 6386 gkt.f.initDOMElements(settings); 6387 // gkt.f.initDOMEvents(settings); 6388 }); 6389 }, 6390 initDOMElements: function (settings) { 6391 //insert the string skeletonDOM as html 6392 const skeletonDOM = gkt.$.parseHTML('<div><div class="gktModalWrapper" style="display:none;"><div class="gktModal"><div class="gktModalHeader"><div class="gktModalClose"></div></div><div class="gktContentWrapper"><div class="gktLeftContent"><div class="gktJustifyCenter"><label class="gktCheckboxLayout"><input type="checkbox" checked="true" class="gktGiftMessageCheckbox"><div class="gktMessageCheckboxHeading"></div></label></div><textarea class="gktMessageTextarea gktAlignCenter"></textarea></div><div class="gktRightContent"><div class="gktJustifyCenter"><label class="gktCheckboxLayout"><input type="checkbox" checked="true" class="gktGiftWrapCheckbox"><div class="gktGiftWrapCheckboxHeading"></div></label></div><img class="gktGiftWrapImage gktAlignCenter" loading="lazy" alt="gift card"></div></div><div class="gktModalFooter"><div class="gktModalSave"></div></div></div></div></div><div class="gktComboModalWrapper"><div class="gktComboModal"><div class="gktComboModalHeader"><strong class="gktComboModalPopupHeading"></strong><div class="gktComboModalClose"></div></div><div class="gktComboContent"><div class="gktComboContentHeader"></div><div class="gktComboContentFooter"><div class="gktComboContentFooterBtn1"></div><div class="gktComboContentFooterBtn2"></div></div></div></div></div></div><div class="gktGiftCardModalWrapper"><div class="gktGiftCardModal"><div class="gktGiftCardModalHeader"><strong class="gktGiftCardModalPopupHeading"></strong><div class="gktGiftCardModalClose"></div></div><div class="gktGiftCardContent"><div class="gktGiftCardContentHeader"></div><form><div class="gktGiftCardGreetingCardContent"></div><div class="gktGiftCardDetailsContent"></div><div class="gktGiftCardMessageContent"></div></form><div class="gktGiftCardContentFooter"><div class="gktGiftCardContentFooterBtn1"></div></div></div><div class="gktPoweredByBanner"></div></div></div><div class="gktFreeGiftcardPopupModalWrapper"><div class="gktFreeGiftcardPopupModal"></div></div></div><div class="gktNotificationWrapper"></div></div>') 6393 gkt.$("body").append(skeletonDOM); 6394 // gkt.elements.productPageWrapperV2.append(skeletonDOM); 6395 // gkt.elements.cartPageWrapperV2.append(skeletonDOM); 6396 6397 //attach a link to the body 6398 gkt.$("body").append('<link rel="stylesheet" href="https://cdn.quilljs.com/1.2.6/quill.snow.css">'); 6399 }, 6400 getSettings: async function () { 6401 //promise 6402 console.log("GET setting of giftkart fired") 6403 return new Promise(function (resolve, reject) { 6404 6405 console.log("fetching from s3") 6406 gkt.f.getSettingsFromS3().then( 6407 success => { 6408 resolve(success); 6409 } 6410 ).catch(error => { 6411 fetch("/apps/gkt/getTmpCartSettings",{ 6412 method: 'GET', 6413 }).then( 6414 response => response.json() // if the response is a JSON object 6415 ).then( 6416 success => { 6417 if(success.responseCode == 200){ 6418 console.log("success-data", success.data); 6419 } 6420 resolve(success.data); 6421 } 6422 ).catch(error => { 6423 console.log(error) // Handle the error response object 6424 reject(error) 6425 6426 }); 6427 }); 6428 }); 6429 6430 }, 6431 setSelectors: function(){ 6432 let settings = gkt.settings 6433 gkt.selectors = { 6434 addToCart: settings.app.addToCartBtnSelectors, 6435 checkoutBtn: settings.app.checkoutBtnSelectors, 6436 sideCartSelectors: settings.app.sideCartSelectors, 6437 buyNowBtn: settings.app.buyNowBtn, 6438 cartForm: settings.app.cartForm, 6439 productPageWrapperV2: '.gktProductPageWrapperV2', 6440 cartPageWrapperV2: '.gktCartPageWrapperV2', 6441 quantityBtnSelectors : settings.app.quantityBtnSelectors, 6442 } 6443 }, 6444 getSettingsFromS3: async function () { 6445 //promise 6446 let shopName = window.Shopify.shop 6447 console.log("GET setting of giftlab pro fired") 6448 return new Promise(function (resolve, reject) { 6449 fetch("https://giftkart-staging.s3.us-east-2.amazonaws.com/tempCartSettings/"+shopName+`.json?nocache=${(new Date()).getTime()}`,{ 6450 method: 'GET', 6451 }).then( 6452 response => response.json() // if the response is a JSON object 6453 ).then( 6454 success => { 6455 if(success.responseCode == 200){ 6456 console.log("success-data", success); 6457 } 6458 resolve(success); 6459 } 6460 ).catch(error => { 6461 console.log(error) // Handle the error response object 6462 reject(error) 6463 }) 6464 }) 6465 }, 6466 getLoggedInCustomer: async function () { 6467 try{ 6468 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 6469 let customerData = await fetch(`/apps/gkt/getLoggedInCustomer?email=${shopifyLiquidValues.customer.email}`); 6470 // await new Promise(resolve => setTimeout(resolve, 10000)); //sleep to check loading state 6471 let customerDataJson = await customerData.json(); 6472 customerDataJson = customerDataJson.data; 6473 gkt.settings.customer = customerDataJson; 6474 return customerDataJson; 6475 } 6476 }catch(e){ 6477 console.log("error in getLoggedIncustomer=",e) 6478 console.log("Have you setup /apps/gkt proxy properly?") 6479 return false;
6480 } 6481 }, 6482 addGiftCardToRewardCodeAPI: async function (_id) { 6483 try{ 6484 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 6485 let addToGiftCardAPI = await fetch(`/apps/gkt/addGiftcardToRewardCode?gktGiftcardId=${_id}`,{ 6486 method: 'POST', 6487 }); 6488 let addToGiftCardAPIJson = await addToGiftCardAPI.json(); 6489 addToGiftCardAPIJson = addToGiftCardAPIJson.data; 6490 gkt.settings.customer = addToGiftCardAPIJson; 6491 return addToGiftCardAPIJson; 6492 } 6493 }catch(e){ 6494 console.log("error in addGiftCardToRewardCodeAPI=",e) 6495 console.log("Have you setup /apps/gkt proxy properly?") 6496 return false; 6497 } 6498 }, 6499 setSettings: function(tmpCartSettings){ 6500 var cart_settings = { 6501 giftWrapProduct: { 6502 productId: tmpCartSettings.productId, 6503 productVairantID: tmpCartSettings.productVariantId, 6504 giftWrapPrice: tmpCartSettings.giftWrapPrice, 6505 giftWrapProductImage: tmpCartSettings.giftWrapImgUrl, 6506 giftWrapShopifyImgUrl: tmpCartSettings.giftWrapShopifyImgUrl, 6507 giftWrapHandle: tmpCartSettings.giftWrapHandle, 6508 isGiftWrapEnabled: tmpCartSettings.isGiftWrap, 6509 isVisibleOnCart: tmpCartSettings.isVisibleOnCart, 6510 isVisibleOnAllProductPages: tmpCartSettings.isVisibleOnAllProductPages, 6511 isVisibleOnSpecificProductPages: tmpCartSettings.isVisibleOnSpecificProductPages, 6512 visibleOnSpecificProductPages: tmpCartSettings.visibleOnSpecificProductPages 6513 }, 6514 giftMessage: tmpCartSettings.giftMessage || {}, 6515 popup: { 6516 popupHeadingText: tmpCartSettings.popupHeadingText, 6517 messageCheckboxHeading: tmpCartSettings.messageCheckboxHeading, 6518 giftWrapCheckboxHeading: tmpCartSettings.giftWrapCheckboxHeading, 6519 messageBoxplaceholder: tmpCartSettings.messageBoxplaceholder, 6520 saveButtonBackgroundColor: tmpCartSettings.saveButtonBackgroundColor, 6521 saveButtonTextColor: tmpCartSettings.saveButtonTextColor, 6522 saveButtonText: tmpCartSettings.saveButtonText, 6523 cartPopupBackgroundColor: tmpCartSettings.cartPopupBackgroundColor, 6524 reloadOnCancelClick: tmpCartSettings.reloadOnCancelClick 6525 }, 6526 giftingOptions: { 6527 isGiftWrapEnabled: tmpCartSettings.isGiftWrap, 6528 isGiftMessageEnabled: tmpCartSettings.isGiftField, 6529 enabledGifiting: tmpCartSettings.enabledGifiting, 6530 shopifyPageinnerHTML: tmpCartSettings.cartPageText 6531 }, 6532 videoMessage: tmpCartSettings.videoMessageData, 6533 pageWrapper: { cartPageText: tmpCartSettings.cartPageText }, 6534 6535 combos: tmpCartSettings.combos || [], 6536 oneClickUpsells: tmpCartSettings.oneClickUpsells || [], 6537 giftCards: tmpCartSettings.giftCards || [], 6538 greetingCards : tmpCartSettings.greetingCardData, 6539 rewardCampaigns: tmpCartSettings.rewardCampaignData, 6540 urlCampaignDataList: tmpCartSettings.urlCampaignDataList, 6541 app: { 6542 disableApp: tmpCartSettings.userData.customSettings.disableApp || false, 6543 disableSideCart: tmpCartSettings.userData.customSettings.disableSideCart || false, 6544 refreshProductPageOnGiftWrap: tmpCartSettings.userData.customSettings.refreshProductPageOnGiftWrap || false, 6545 addToCartBtnSelectors: tmpCartSettings.userData.customSettings.addToCartBtnSelectors || DEFAULT_addToCartBtnSelectors, 6546 checkoutBtnSelectors: tmpCartSettings.userData.customSettings.checkoutBtnSelectors || DEFAULT_checkoutBtnSelectors, 6547 quantityBtnSelectors: tmpCartSettings.userData.customSettings.quantityBtnSelectors || DEFAULT_quantityBtnSelectors, 6548 sideCartSelectors: tmpCartSettings.userData.customSettings.sideCartSelectors || DEFAULT_sideCartSelectors, 6549 // cartDrawerSelectors: tmpCartSettings.userData.customSettings.cartDrawerSelectors || DEFAULT_cartDrawerSelectors, 6550 // sideCartDrawerOverlay: tmpCartSettings.userData.customSettings.sideCartDrawerOverlay || DEFAULT_sideCartDrawerOverlay,
6551 themeBackgroundColor : tmpCartSettings.userData.customSettings.themeBackgroundColor || "", 6552 6553 themeFontFamily: tmpCartSettings.userData.customSettings.themeFontFamily || "", 6554 themeFontColor: tmpCartSettings.userData.customSettings.themeFontColor || "", 6555 6556 themeButtonBackgroundColor: tmpCartSettings.userData.customSettings.themeButtonBackgroundColor || "", 6557 themButtonTextColor: tmpCartSettings.userData.customSettings.themButtonTextColor || "", 6558 themeButtonBorderColor: tmpCartSettings.userData.customSettings.themeButtonBorderColor || "", 6559 themeButtonBoxShadow: tmpCartSettings.userData.customSettings.themeButtonBoxShadow || "", 6560 //button font family 6561 themeButtonFontFamily: tmpCartSettings.userData.customSettings.themeButtonFontFamily || "", 6562 6563 themeHeaderFontFamily: tmpCartSettings.userData.customSettings.themeHeaderFontFamily || "", 6564 themeHeaderFontColor: tmpCartSettings.userData.customSettings.themeHeaderFontColor || "", 6565 6566 themeLabelFontColor: tmpCartSettings.userData.customSettings.themeLabelFontColor || "", 6567 themeLabelFontFamily: tmpCartSettings.userData.customSettings.themeLabelFontFamily || "", 6568 6569 hidePoweredByBanner: tmpCartSettings.userData.customSettings.hidePoweredByBanner || false, 6570 useGiftCardAddToCartButtonOverwrite2: tmpCartSettings.userData?.customSettings?.useGiftCardAddToCartButtonOverwrite2 || false, 6571 6572 buyNowBtn: tmpCartSettings.userData.customSettings.buyNowBtn || DEFAULT_buyNowBtn, 6573 cartForm: tmpCartSettings.userData.customSettings.cartForm || DEFAULT_cartForm, 6574 addAfterAddTocartBtn:tmpCartSettings.userData.customSettings.addAfterAddTocartBtn || false, 6575 addAftercheckoutBtn: tmpCartSettings.userData.customSettings.addAftercheckoutBtn || false, 6576 activeVariantCodes: tmpCartSettings.userData.customSettings.activeVariantCodes || "123456789", 6577 customStyleForGiftcard: tmpCartSettings.userData.customSettings.customStyleForGiftcard || null, 6578 redirectUrlForSendGiftcardBtn: tmpCartSettings.userData.customSettings.redirectUrlForSendGiftcardBtn ? window.location.origin + tmpCartSettings.userData.customSettings.redirectUrlForSendGiftcardBtn : window.location.origin + "/cart/checkout" , 6579 }, 6580 accountWidget: tmpCartSettings.userData.accountWidget, 6581 merchantInfo: tmpCartSettings.userData, 6582 languageData: tmpCartSettings.languageData, 6583 SERVER_URL: tmpCartSettings.SERVER_URL, 6584 urlSearchString: window.location.search ? window.location.search : "" 6585 } 6586 6587 gkt.settings = cart_settings; 6588 console.log("settings assigned") 6589 6590 }, 6591 6592 preparePoweredByBannerUI: function () { 6593 try{ 6594 let brandingToBeShown = ['basic', 'plus', 'basic-alpha', 'plus-alpha', 'basic-beta', 'plus-beta', 'basic-gamma', 'premium-gamma', 'basic-sept8', 'pro-nov7', 'pro-jan16-free', 'pro-jan16-19'] 6595 6596 let showPoweredByBanner = false; 6597 6598 if(gkt.settings.app.hidePoweredByBanner == true){ 6599 showPoweredByBanner = false; 6600 }else{ 6601 for(let i=0;i<brandingToBeShown.length;i++){ 6602 if(gkt.settings.merchantInfo.isSubscription == false || gkt.settings.merchantInfo.isSubscription.name == brandingToBeShown[i]){ 6603 showPoweredByBanner = true; 6604 break; 6605 } 6606 } 6607 } 6608 6609 6610 6611 if(showPoweredByBanner){ 6612 let gktPoweredByBannerHTML = gkt.$("<div>").addClass("gktPoweredByBanner"); 6613 let gktPoweredByBannerPreImageText = gkt.$("<div>").addClass("gktPoweredByBannerPreImageText").html("Powered by "); 6614 let gktPoweredByBannerPostImageText = gkt.$("<div>").addClass("gktPoweredByBannerPostImageText").html(" GiftKart"); 6615 let gktPoweredByBannerLogo = gkt.$("<img>").addClass("gkt-branding-banner-logo"); 6616 gktPoweredByBannerLogo.attr("src","https://d3ks0ngva6go34.cloudfront.net/public/giftkart_logo.jpg"); 6617 gktPoweredByBannerLogo.attr("alt","GiftKart"); 6618 //very smol 6619 gktPoweredByBannerLogo.attr("width","22"); 6620 gktPoweredByBannerLogo.attr("height","22"); 6621 6622 gktPoweredByBannerHTML.append(gktPoweredByBannerPreImageText); 6623 gktPoweredByBannerHTML.append(gktPoweredByBannerLogo); 6624 gktPoweredByBannerHTML.append(gktPoweredByBannerPostImageText); 6625 6626 gktPoweredByBannerHTML.on("click",function(){ 6627 window.open("https://apps.shopify.com/giftkart","_blank"); 6628 }) 6629 6630 return gktPoweredByBannerHTML; 6631 }else{ 6632 gkt.$(".gktPoweredByBanner").remove(); 6633 } 6634 return; 6635 }catch(err){ 6636 console.log("error in preparePoweredByBannerUI",err); 6637 return; 6638 } 6639 }, 6640 initThemeCSS: function (){ 6641 console.log("initThemeCSS?",gkt.selectors.addToCart);
6642 let addToCartBtnEle = gkt.$(document).find(gkt.selectors.addToCart) 6643 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 6644 6645 let buttonToOverRide = gkt.$(addToCartBtnEle).length > 0 ? addToCartBtnEle : checkoutBtnEle; 6646 6647 if(gkt.settings.app.themeFontFamily == "" && gkt.$("body").length>0){ 6648 gkt.settings.app.themeFontFamily = gkt.$("body").css("font-family"); 6649 } 6650 //find the font color of the theme 6651 if(gkt.settings.app.themeFontColor == "" && gkt.$("p").length > 0){ 6652 gkt.settings.app.themeFontColor = gkt.$("p").css("color"); 6653 } 6654 //theme background color 6655 if(gkt.settings.app.themeBackgroundColor == "" && gkt.$("body").length > 0){ 6656 gkt.settings.app.themeBackgroundColor = gkt.$("body").css("background-color"); 6657 } 6658 if(gkt.settings.app.themeLabelFontColor == "" && gkt.$("label").length > 0){ 6659 gkt.settings.app.themeLabelFontColor = gkt.$("label").css("color"); 6660 } 6661 // themeLabelFontFamily 6662 if(gkt.settings.app.themeLabelFontFamily == "" && gkt.$("label").length > 0){ 6663 gkt.settings.app.themeLabelFontFamily = gkt.$("label").css("font-family"); 6664 } 6665 if(gkt.settings.app.themeButtonBackgroundColor == "" && gkt.$(buttonToOverRide).length > 0 ){ 6666 gkt.settings.app.themeButtonBackgroundColor = gkt.$(buttonToOverRide).css("background-color"); 6667 } 6668 if(gkt.settings.app.themButtonTextColor == "" && gkt.$(buttonToOverRide).length > 0){ 6669 gkt.settings.app.themButtonTextColor = gkt.$(buttonToOverRide).css("color"); 6670 } 6671 if(gkt.settings.app.themeButtonBorderColor == "" && gkt.$(buttonToOverRide).length > 0){ 6672 gkt.settings.app.themeButtonBorderColor = gkt.$(buttonToOverRide).css("border-color"); 6673 } 6674 //box shadow 6675 if(gkt.settings.app.themeButtonBoxShadow == "" && gkt.$(buttonToOverRide).length > 0){ 6676 gkt.settings.app.themeButtonBoxShadow = gkt.$(buttonToOverRide).css("box-shadow"); 6677 } 6678 // button font family 6679 if(gkt.settings.app.themeButtonFontFamily == "" && gkt.$(buttonToOverRide).length > 0){ 6680 gkt.settings.app.themeButtonFontFamily = gkt.$(buttonToOverRide).css("font-family"); 6681 } 6682 if(gkt.settings.app.themeHeaderFontFamily == "" && gkt.$("h1").length > 0){ 6683 gkt.settings.app.themeHeaderFontFamily = gkt.$("h1").css("font-family"); 6684 } 6685 if(gkt.settings.app.themeHeaderFontColor == "" && gkt.$("h1").length > 0){ 6686 gkt.settings.app.themeHeaderFontColor = gkt.$("h1").css("color"); 6687 } 6688 6689 }, 6690 getPageType: function () { 6691 var pageType = ""; 6692 if (window.location.pathname.includes("/cart") && !window.location.pathname.includes("/products")) { 6693 pageType = "cart"; 6694 } else if (window.location.pathname.includes("/products")) { 6695 pageType = "product"; 6696 } else if (window.location.pathname.includes("/collections")) { 6697 pageType = "COLLECTION"; 6698 } else if (window.location.pathname.includes("/")) { 6699 pageType = "HOME"; 6700 } else if ("undefined" != typeof Shopify && "undefined" != typeof Shopify.Checkout) { 6701 pageType = "CHECKOUT"; 6702 } else { 6703 pageType = "PAGE_NOT_FOUND"; 6704 } 6705 return pageType; 6706 }, 6707 getProductPageHandle: function () { 6708 if ("product" === gkt.state.page_type && shopifyLiquidValues.product.handle) { 6709 // let pattern = /(?<=\\/products\\/)((?!\\?|\\$).)+/g 6710 // if(window && window.location && window.location.href){ 6711 // return window.location.href.match(pattern)[0] 6712 // } 6713 return shopifyLiquidValues.product.handle 6714 6715 } 6716 return "undefined" 6717 6718 }, 6719 applyPopupCSS: function (element) { 6720 //gktGiftCardModal background-color 6721 // gktGiftCardInputFieldsDiv color of the font 6722 gkt.$(element).css("background-color", gkt.settings.app.themeBackgroun
6722dColor); 6723 }, 6724 applyButtonCSS : function(element){ 6725 6726 //apply gkt.settings.app.themButtonTextColor themeButtonBackgroundColor themeButtonBorderColor to the button 6727 if(gkt.settings.app.themButtonTextColor != ""){ 6728 element.css("color", gkt.settings.app.themButtonTextColor); 6729 } 6730 if(gkt.settings.app.themeButtonBackgroundColor != ""){ 6731 element.css("background-color", gkt.settings.app.themeButtonBackgroundColor); 6732 } 6733 if(gkt.settings.app.themeButtonBorderColor != ""){ 6734 element.css("border","1px solid") 6735 element.css("border-color", gkt.settings.app.themeButtonBorderColor); 6736 } 6737 // box shadow 6738 if(gkt.settings.app.themeButtonBoxShadow != ""){ 6739 element.css("box-shadow", gkt.settings.app.themeButtonBoxShadow); 6740 } 6741 //themeButtonFontFamily 6742 if(gkt.settings.app.themeButtonFontFamily != ""){ 6743 element.css("font-family", gkt.settings.app.themeButtonFontFamily); 6744 } 6745 6746 6747 }, 6748 resetButtonCSS: function (element){ 6749 //reset the button css 6750 element.css("color",""); 6751 element.css("background-color",""); 6752 element.css("border",""); 6753 element.css("border-color",""); 6754 element.css("box-shadow",""); 6755 }, 6756 applyHeaderCSS: function (element){ 6757 //apply gkt.settings.app.themeFontFamily themeFontColor to the header 6758 if(gkt.settings.app.themeHeaderFontFamily != ""){ 6759 element.css("font-family", gkt.settings.app.themeHeaderFontFamily); 6760 } 6761 if(gkt.settings.app.themeHeaderFontColor != ""){ 6762 element.css("color", gkt.settings.app.themeHeaderFontColor); 6763 } 6764 }, 6765 applyLabelCSS: function (element){ 6766 //apply gkt.settings.app.themeLabelFontColor to the label 6767 if(gkt.settings.app.themeLabelFontColor != ""){ 6768 element.css("color", gkt.settings.app.themeLabelFontColor); 6769 } 6770 element.css("font-family","inherit"); 6771 if(gkt.settings.app.themeLabelFontFamily != ""){ 6772 element.css("font-family", gkt.settings.app.themeLabelFontFamily); 6773 } 6774 }, 6775 getSelectedVariant: function () { 6776 if ("product" === gkt.state.page_type) { 6777 6778 let activeCodes = gkt.settings.app.activeVariantCodes; 6779 6780 if(activeCodes.indexOf("1") >= 0){ 6781 const params = Object.fromEntries(new URLSearchParams(location.search)) 6782 if(params && params.variant){ 6783 return params.variant 6784 } 6785 } 6786 6787 if(activeCodes.indexOf("2") >= 0){ 6788 if (ShopifyAnalytics && ShopifyAnalytics.meta && ShopifyAnalytics.meta.selectedVariantId) { 6789 for(let i = 0; i < ShopifyAnalytics.meta.product.variants.length; i++){ 6790 if(ShopifyAnalytics.meta.product.variants[i].id == ShopifyAnalytics.meta.selectedVariantId){ 6791 return ShopifyAnalytics.meta.selectedVariantId 6792 } 6793 } 6794 } 6795 } 6796 if(activeCodes.indexOf("3") >= 0){ 6797 if (document.querySelector('[name="id"]') && document.querySelector('[name="id"]').value) { 6798 return document.querySelector('[name="id"]').value 6799 } 6800 } 6801 6802 if(activeCodes.indexOf("4") >= 0){ 6803 if (shopifyLiquidValues.selected_or_first_available_variant) { 6804 return shopifyLiquidValues.selected_or_first_available_variant.id 6805 } 6806 } 6807 6808 return undefined 6809 } 6810 }, 6811 6812 getProductQuantity: function () { 6813 if (document.querySelector('[name="quantity"]') && document.querySelector('[name="quantity"]').value) { 6814 if(Number(document.querySelector('[name="quantity"]').value) && Number(document.querySelector('[name="quantity"]').value) <= 10){ 6815 return Number(document.querySelector('[name="quantity"]').value) 6816 }else{ 6817 return 1 6818 } 6819 }else { 6820 return 1 6821 } 6822 }, 6823 6824 getElements: function (settings) { 6825 return { 6826 gktGiftMsgAndWrapWrapperParent: gkt.$(gkt.$.parseHTML('<div class="gktGiftMsgAndWrapHeader"><div class="gktGiftMsgAndWrapHeaderItem"><label for="gift-wrapping" class="gktGiftMsgAndWrapWrapperInnerEle"><input id="gift-wrapping" class="gktGiftOptionsCheckbox" type="checkbox" name="addGiftOptions"><span class="gktCustomWrapCheckboxCheckmark"></span><div class="gktGiftMsgAndWrapWrapperInnerEleHeading"></div></label></div></div>')), 6827 gktCartGiftMsgAndWrapWrapperParent: gkt.$(gkt.$.parseHTML('<div class="gktCartGiftMsgAndWrapHeader"><div class="gktCartGiftMsgAndWrapHeaderItem"><label for="gift-wrapping" class="gktGiftMsgAndWrapWrapperInnerEle"><input id="gift-wrapping" class="gktGiftOptionsCheckbox" type="checkbox" name="addGiftOptions"><span class="gktCustomWrapCheckboxCheckmark"></span><div class="gktGiftMsgAndWrapWrapperInnerEleHeading"></div></label></div></div>')),
6828 addToCartBtn: gkt.$(document).find(gkt.selectors.addToCart), 6829 addToCartButtonCloned: undefined, 6830 checkoutBtn: gkt.$(document).find(gkt.selectors.checkoutBtn), 6831 cartForm: gkt.$(document).find(gkt.selectors.cartForm), 6832 productPageWrapperV2: gkt.$(gkt.$.parseHTML('<div class="gktPageWrapper gktProductPageWrapperV2"><div class="gktComboWrapper"></div><div class="gktProductPageUpsellWrapper"></div><div class="gktGiftMsgAndWrapWrapper"></div><div class="gktGiftMessageWrapper"></div><div class="gktGiftCardWrapper"></div></div>')), 6833 cartPageWrapperV2: gkt.$(gkt.$.parseHTML('<div class="gktPageWrapper gktCartPageWrapperV2"><div class="gktCartUpsellWrapper"></div><div class="gktCartGiftMsgAndWrapWrapper"></div><div class="gktCartGiftMessageWrapper"></div><div class="gktAccountWidgetWrapper"></div></div>')), 6834 buyNowBtn: gkt.$(document).find(gkt.selectors.buyNowBtn) 6835 } 6836 }, 6837 6838 initialize: async function (jQuery) { 6839 // gkt.$.ajaxSetup({global: true}); 6840 let tmpCartSettings = await gkt.f.getSettings(); 6841 gkt.f.setSettings(tmpCartSettings) 6842 gkt.f.setSelectors(); 6843 gkt.state.page_type = gkt.f.getPageType(); 6844 gkt.elements = gkt.f.getElements(gkt.settings); 6845 if ("" === gkt.state.page_type) return false; 6846 gkt.utility.setLanguageLocale(); 6847 return gkt.f.bootstrap(gkt.settings); 6848 }, 6849 globalListener: function (settings) { 6850 let isIntervalActive = false 6851 //if app is disabled reurn 6852 if (settings.app.disableApp) { 6853 return 6854 } else { 6855 if ("product" === gkt.state.page_type) { 6856 gkt.productPage.init(settings) 6857 } 6858 6859 if (settings.app.disableSideCart) { 6860 if ("cart" === gkt.state.page_type) { 6861 gkt.cartPage.init(settings) 6862 } 6863 } else { 6864 gkt.cartPage.init(settings) 6865 6866 } 6867 } 6868 6869 if(gkt.state && gkt.state.activeCampaignName == "EMPTY"){ 6870 gkt.utility.getUrlRewardCampaignName() 6871 } 6872 6873 6874 setInterval(async () => { 6875 if (!isIntervalActive) { 6876 // console.log("globalListener-active") 6877 6878 isIntervalActive = true 6879 6880 6881 // insert productpage wrapper if productPage is initialized 6882 if ("product" === gkt.state.page_type && 6883 gkt.elements.addToCartBtn.length > 0 && 6884 gkt.$(document).find(gkt.selectors.productPageWrapperV2).length == 0) { 6885 console.log("productPage-insertWrapperIntoPage1") 6886 gkt.productPage.f.insertWrapperIntoPage(settings) 6887 } 6888 6889 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 6890 6891 // insert cartPage wrapper if cartPage is initialized 6892 if (checkoutBtnEle.length > 0 && 6893 gkt.$(document).find(gkt.selectors.cartPageWrapperV2).length == 0) { 6894 console.log("cartPage-insertWrapperIntoPage") 6895 await gkt.cartPage.f.insertWrapperIntoPage(settings) 6896 } 6897 6898 // check if comboproduct overwrite buyNowButton 6899 if (false && gkt.gktCombo.state.comboHandle != "") { 6900 gkt.gktCombo.f.comboBuyNowButtonOverwrite() 6901 } 6902 6903 // check if giftCard overwrite buyNowButton 6904 if (gkt.gktGiftCard.state.giftCardData) { 6905 if(!gkt.elements.addToCartBtn.is(':visible') || gkt.settings.app.useGiftCardAddToCartButtonOverwrite2 == true){ 6906 gkt.elements.addToCartBtn = gkt.$(document).find(g
6906kt.selectors.addToCart) 6907 if(gkt.settings.app.useGiftCardAddToCartButtonOverwrite2 == true){ 6908 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite2(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 6909 }else{ 6910 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 6911 } 6912 } 6913 gkt.gktGiftCard.f.giftCardBuyNowButtonOverwrite() 6914 if(!gkt.state.sendGiftcardOnPageBtnClicked){ 6915 gkt.gktGiftCard.f.changeGiftCardAddToCartButtonText(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText)) 6916 } 6917 6918 } 6919 6920 // check if giftwrap, message or oneclick upsell overwrite buyNowButton 6921 if(gkt.state.isOverWriteBuyNowBtnTriggered && gkt.$(document).find(".gkt-overwrite-buy-now-btn").length == 0){ 6922 gkt.utility.overWriteBuyNowBtn() 6923 } 6924 6925 if(gkt.state.activeCampaignName != "" && 6926 gkt.settings.urlCampaignDataList && 6927 gkt.settings.urlCampaignDataList.length && 6928 gkt.settings.urlCampaignDataList.length > 0 6929 ){
6930 let urlRewardCampaignName = gkt.state.activeCampaignName 6931 let rewardCampaign = gkt.settings.urlCampaignDataList.find((campaign) => { 6932 let campaignData = campaign.campaignData 6933 return campaignData.urlBasedCampaign && campaignData.urlBasedCampaign.value && campaignData.urlBasedCampaign.value == urlRewardCampaignName 6934 }) 6935 gkt.settings.rewardCampaigns = rewardCampaign 6936 6937 if(!gkt.state.setCampaignUrlattribute ){ 6938 gkt.state.setCampaignUrlattribute = true 6939 await gkt.utility.updateCart({attributes:{"cb_campaign":gkt.state.activeCampaignName}}) 6940 } 6941 6942 } 6943 6944 if( (gkt.state.page_type == "cart" || "product" === gkt.state.page_type) && 6945 gkt.settings.rewardCampaigns && 6946 gkt.settings.rewardCampaigns.status == "ACTIVE" && 6947 gkt.settings.rewardCampaigns.campaignData && 6948 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct && 6949 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct.length && 6950 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct.length > 0 6951 6952 ){ 6953 await gkt.gktFreeGiftCardPopup.f.addFreeGiftcardProduct() 6954 } 6955 6956 isIntervalActive = false 6957 6958 } 6959 }, 1000) 6960 } 6961 }, 6962 utility: { 6963 getActiveCurrencyRate : function(){ 6964 let currencyRate = 1; 6965 if(window.Shopify && window.Shopify.currency && window.Shopify.currency.rate){ 6966 currencyRate = window.Shopify.currency.rate; 6967 } 6968 return currencyRate; 6969 }, 6970 getCookie: function (cookieName) { 6971 let name = cookieName + "="; 6972 let decodedCookie = decodeURIComponent(document.cookie); 6973 let ca = decodedCookie.split(";"); 6974 for (let i = 0; i < ca.length; i++) { 6975 let c = ca[i]; 6976 while (c.charAt(0) == " ") { 6977 c = c.substring(1); 6978 } 6979 if (c.indexOf(name) == 0) { 6980 return c.substring(name.length, c.length); 6981 } 6982 } 6983 return null; 6984 }, 6985 getLocale: function () { 6986 if (window.Shopify && window.Shopify.locale) { 6987 return window.Shopify.locale 6988 }else{ 6989 return "en" 6990 } 6991 }, 6992 setLanguageLocale: function () { 6993 let locale = gkt.utility.getLocale() 6994 6995 if(gkt.settings.languageData && gkt.settings.languageData.languageMode == "SINGLE"){ 6996 locale = "en" 6997 } 6998 6999 if(!gkt.settings.languageData[locale]){ 7000 locale = "en" 7001 } 7002 gkt.settings.languageData = gkt.settings.languageData[locale] 7003 }, 7004 setCookie: function (cookieName, cookieValue, expiryDays = 7) { 7005 const d = new Date(); 7006 d.setTime(d.getTime() + expiryDays * 24 * 60 * 60 * 1000); 7007 let expires = "expires=" + d.toUTCString(); 7008 document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/"; 7009 }, 7010 addToCart: async function (data) { 7011 try { 7012 // if there is nothing to add in cart..just return true 7013 if (!data.id) { 7014 return true 7015 } 7016 let result = await gkt.$.ajax({ 7017 url: "/cart/add.js", 7018 data: data, 7019 type: "POST", 7020 dataType: "json", 7021 }) 7022 return true 7023 } catch (error) { 7024 console.error("gkt-utility-addToCart"); 7025 console.error(error); 7026 return false 7027 } 7028 }, 7029 updateCart: async function (data) { 7030 try { 7031 let result = await gkt.$.ajax({ 7032 type: "POST", 7033 url: "/cart/update.js", 7034 data: data, 7035 dataType: "json", 7036 }); 7037 return result 7038 } catch (error) { 7039 console.error("gkt-utility-updateCart"); 7040 console.error(error); 7041 return false 7042 } 7043 }, 7044 changeCart: async function (data) { 7045 try { 7046 let result = await gkt.$.ajax({ 7047 type: "POST", 7048 url: "/cart/change.js", 7049 data: data, 7050 dataType: "json", 7051 }); 7052 return true 7053 } catch (error) { 7054 console.error("gkt-utility-changeCart"); 7055 console.error(error); 7056 return false 7057 } 7058 }, 7059 7060 getProductData: async function (productName) { 7061 try { 7062 let result = await gkt.$.ajax({ 7063 type: "GET", 7064 url: "/products/" + productName, 7065 // data: data, 7066 dataType: "json", 7067 }); 7068 return result; 7069 } catch (error) { 7070 console.error("gkt-utility-updateCart"); 7071 console.error(error); 7072 return false 7073 } 7074 }, 7075 getProductDataV2: function (productName) { 7076 try { 7077 return new Promise((res, rej) => { 7078 gkt.$.getJSON("/products/" + productName + ".js", function (product) { 7079 console.log("success-productName: ", productName) 7080 res(product) 7081 }).fail(function () { console.log("fail-productName: ", productName); res(false) }) 7082 }) 7083 return result; 7084 } catch (error) { 7085 console.error("gkt-utility-getProductDataV2"); 7086 console.error(error); 7087 return false 7088 } 7089 }, 7090 addToCartV2: function (data) { 7091 try { 7092 return new Promise((res, rej) => { 7093 gkt.$.post('/cart/add.js', data) 7094 .done(function () { console.log("success-/cart/add.js': "); res(true) }) 7095 .fail(function (e) { 7096 console.log("fail-/cart/add.js", e); 7097 res(false) 7098 }) 7099 }) 7100 return result; 7101 } catch (error) { 7102 console.error("gkt-utility-addToCartV2"); 7103 console.error(error); 7104 return false 7105 } 7106 }, 7107 clearCart: function (data) { 7108 try { 7109 return new Promise((res, rej) => { 7110 gkt.$.post('/cart/clear.js', data) 7111 .done(function () { console.log("success-/cart/clear.js': "); res(true) }) 7112 .fail(function () { console.log("fail-/cart/clear.js"); res(false) }) 7113 }) 7114 return result; 7115 } catch (error) { 7116 console.error("gkt-utility-clearCart"); 7117 console.error(error); 7118 return false 7119 } 7120 }, 7121 getCart: async function (data) { 7122 try { 7123 let result = await gkt.$.ajax({ 7124 type: "GET", 7125 url: "/cart.js", 7126 dataType: "json", 7127 }); 7128 return result 7129 } catch (error) { 7130 console.error("gkt-utility-getCart"); 7131 console.error(error); 7132 return false 7133 } 7134 }, 7135 getCartTotalQuantity: async function () { 7136 try { 7137 let total = 0 7138 let cartData = await gkt.$.ajax({ 7139 type: "GET", 7140 url: "/cart.js", 7141 dataType: "json", 7142 }); 7143 for (var item of cartData['items']) { 7144 total += item["quantity"] 7145 } 7146 return total 7147 } catch (error) { 7148 console.error("gkt-utility-getCart"); 7149 console.error(error); 7150 return false 7151 } 7152 }, 7153 checkIfItemPresentInCart: function (searchedVariantId) { 7154 if (gkt.state.cartData && gkt.state.cartData.items && gkt.state.cartData.items.length && gkt.state.cartData.items.length > 0) { 7155 for (let i = 0; i < gkt.state.cartData.items.length; i++) {
7156 let item = gkt.state.cartData.items[i] 7157 if (item && item.variant_id && item.variant_id == searchedVariantId) { 7158 return item 7159 } 7160 } 7161 return false 7162 } else { 7163 return false 7164 } 7165 }, 7166 getNoteFromCart: function () { 7167 if (gkt.state.cartData && gkt.state.cartData.note && gkt.state.cartData.note != "") { 7168 7169 return gkt.state.cartData.note 7170 } else { 7171 return false 7172 } 7173 }, 7174 isCartTotalMoreThan: async function(value){ 7175 gkt.state.cartData = await gkt.utility.getCart() 7176 7177 if(gkt.state.cartData && gkt.state.cartData.total_price && ((gkt.state.cartData.total_price)/100 >= parseFloat(value))){ 7178 return true 7179 }else{ 7180 return false 7181 } 7182 }, 7183 cloneAddToCartBtn: function () { 7184 7185 }, 7186 overWriteBuyNowBtn: function (){ 7187 7188 let buyNowBtnEle = gkt.$(document).find(gkt.selectors.buyNowBtn) 7189 7190 if(buyNowBtnEle && buyNowBtnEle.length > 0 && gkt.$(document).find(".gkt-overwrite-buy-now-btn").length == 0){ 7191 // buyNowBtnEle.show() 7192 buyNowBtnEle.unbind().unbind("click").off().off("click"); 7193 newBuyNowBtnEle = buyNowBtnEle.clone() 7194 buyNowBtnEle.before(newBuyNowBtnEle) 7195 // buyNowBtnEle.hide() 7196 newBuyNowBtnEle.addClass("gkt-overwrite-buy-now-btn") 7197 7198 buyNowBtnEle.css("visibility", "hidden") 7199 buyNowBtnEle.css("height", "0") 7200 buyNowBtnEle.css("width", "0") 7201 buyNowBtnEle.css("padding", "0") 7202 buyNowBtnEle.css("margin", "0") 7203 buyNowBtnEle.css("line-height", "0"); 7204 buyNowBtnEle.css("min-height", "0"); 7205 7206 newBuyNowBtnEle.on("click", function (event) { 7207 event.preventDefault(); 7208 event.stopPropagation(); 7209 gkt.$(this).attr("disabled", true); 7210 newBuyNowBtnEle.text("loading checkout..."); 7211 setTimeout(() => { gkt.$(this).attr("disabled", false)}, 3000) 7212 addToCartBtnEle = gkt.$(document).find(gkt.selectors.addToCart) 7213 sideCartEle = gkt.$(document).find(gkt.selectors.sideCartSelectors) 7214 7215 // gkt.$(document).find("body").addClass("loadingCheckoutPage") 7216 // gkt.$(document).find("body").text("loading checkout...") 7217 7218 if(sideCartEle && sideCartEle.length > 0){ 7219 sideCartEle.css("display", "none") 7220 } 7221 7222 if(addToCartBtnEle && addToCartBtnEle.length > 0){ 7223 addToCartBtnEle.trigger("click") 7224 } 7225 setTimeout(()=>{ 7226 window.location.href = gkt.settings.app.redirectUrlForSendGiftcardBtn 7227 },1000) 7228 7229 }) 7230 7231 } 7232 }, 7233 emailValidation: function (emailString) { 7234 var atSymbol = emailString.indexOf("@"); 7235 if (atSymbol < 1) return false; 7236 7237 var dot = emailString.lastIndexOf("."); 7238 if (dot <= atSymbol + 2) return false; 7239 7240 // check that the dot is not at the end 7241 if (dot === emailString.length - 1) return false; 7242 7243 return true; 7244 }, 7245 renderLanguageValue: function (parent) { 7246 if (parent){ 7247 return parent.value; 7248 } 7249 return; 7250 }, 7251 7252 slider: { 7253 state: { 7254 slideIndex: 0, 7255 }, 7256 plusSlides: function (selector, n) { 7257 this.showSlides(selector, this.state.slideIndex += n); 7258 }, 7259 //minusSlides
7260 minusSlides: function (selector, n) { 7261 this.showSlides(selector, this.state.slideIndex -= n); 7262 }, 7263 showSlides: function (selector, n) { 7264 var i; 7265 var slides = selector.find(".gktComboItemContainerItem1Img"); 7266 if (slides && slides.length) { 7267 // slides = JSON.parse(slides); 7268 // } 7269 7270 7271 if (n > slides.length) { this.state.slideIndex = 1 } 7272 if (n < 1) { this.state.slideIndex = slides.length } 7273 for (i = 0; i < slides.length; i++) { 7274 slides[i].style.display = "none"; 7275 } 7276 slides[this.state.slideIndex - 1].style.display = "block"; 7277 // plusSlides(1) 7278 } 7279 // setTimeout(function () { plusSlides(n + 1) }, 2000); 7280 }, 7281 }, 7282 7283 isMobileView: function () { 7284 if (window.innerWidth < 768) { 7285 return true; 7286 } else { 7287 return false; 7288 } 7289 }, 7290 displayLoadingSpinner: function () { 7291 let loadingContainer = gkt.$("<div>").addClass("gktLoading"); 7292 let loadingSpinner = gkt.$("<div>").addClass("gktLoadingSpinner"); 7293 loadingContainer.append(loadingSpinner); 7294 return loadingContainer; 7295 }, 7296 dynamicStylesForBranding: function () { 7297 let brandingColor = { 7298 mainTextColor: gkt.settings.accountWidget.customization.mainTextColor, 7299 subTextColor : gkt.settings.accountWidget.customization.subTextColor, 7300 } 7301 let style = 7302 `<style> 7303 .gktAccountWidgetBodyTabActive{ 7304 color: ${brandingColor.mainTextColor} !important; 7305 border-bottom: 2px solid ${brandingColor.mainTextColor} !important; 7306 } 7307 .gktLoadingSpinner-not-used { 7308 border-top: 16px solid ${gkt.settings.accountWidget.customization.buttonColor}; 7309 border-bottom: 16px solid ${gkt.settings.accountWidget.customization.buttonColor}; 7310 } 7311 7312 </style>` 7313 gkt.$('html > head').append(style); 7314 return style; 7315 }, 7316 getLocalDateIn_YYYY_MM_DD: function (date=new Date()) { 7317 const year = date.getFullYear();
7318 const month = ('0' + (date.getMonth() + 1)).slice(-2); 7319 const day = ('0' + date.getDate()).slice(-2) 7320 7321 const dateInLocalTimeZone = `${year}-${month}-${day}`; 7322 return dateInLocalTimeZone; 7323 }, 7324 getUrlRewardCampaignName: function () { 7325 let activeCampaignName = ""; 7326 7327 if(gkt.state.activeCampaignName != "EMPTY"){ 7328 return gkt.state.activeCampaignName; 7329 } 7330 if(sessionStorage.getItem("cb_campaign")){ 7331 activeCampaignName = sessionStorage.getItem("cb_campaign") 7332 gkt.state.activeCampaignName = activeCampaignName; 7333 return activeCampaignName; 7334 } 7335 7336 let campaginString = gkt.settings.urlSearchString.split("cb_campaign=") 7337 if(campaginString && campaginString.length > 1){ 7338 let campaignName = campaginString[1].split("&")[0] 7339 if(campaignName){ 7340 gkt.state.activeCampaignName = campaignName; 7341 sessionStorage.setItem("cb_campaign", campaignName) 7342 return campaignName 7343 }else{ 7344 return "" 7345 } 7346 }else 7347 { 7348 return "" 7349 } 7350 } 7351 }, 7352 storage: { 7353 7354 loadValuesFromStorage: function (settings) { 7355 var gktGiftMessageCheckbox = sessionStorage.getItem("gktGiftMessageCheckbox"); 7356 var gktMessageTextarea = sessionStorage.getItem("gktMessageTextarea"); 7357 var gktGiftWrapCheckbox = sessionStorage.getItem("gktGiftWrapCheckbox"); 7358 var gktGiftOptionsCheckbox = sessionStorage.getItem("gktGiftOptionsCheckbox"); 7359 gkt.$('.gktMessageTextarea').val(gktMessageTextarea); 7360 7361 if (gktGiftMessageCheckbox === null) { 7362 gkt.$('.gktGiftMessageCheckbox').prop('checked', true); 7363 } else { 7364 gkt.$('.gktGiftMessageCheckbox').prop('checked', gktGiftMessageCheckbox === "true"); 7365 } 7366 7367 if (gktGiftWrapCheckbox === null) { 7368 gkt.$('.gktGiftWrapCheckbox').prop('checked', true); 7369 } else { 7370 gkt.$('.gktGiftWrapCheckbox').prop('checked', gktGiftWrapCheckbox === "true"); 7371 } 7372 7373 if (gktGiftOptionsCheckbox === null) { 7374 7375 gkt.elements.cartPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', false) 7376 gkt.elements.productPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', false) 7377 gkt.$(document).find(".gktGiftOptionsCheckbox").prop('checked', false) 7378 } else { 7379 gkt.elements.cartPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7380 gkt.elements.productPageWrapperV2.find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7381 gkt.$(document).find(".gktGiftOptionsCheckbox").prop('checked', gktGiftOptionsCheckbox === "true") 7382 7383 } 7384 7385 }, 7386 setItem: function (field, value) { 7387 sessionStorage.setItem(field, value) 7388 }, 7389 getItem: function (field) { 7390 return sessionStorage.getItem(field) 7391 } 7392 }, 7393 drawerCart: { 7394 init: function (settings) { 7395 gkt.cartPage.init(settings) 7396 } 7397 }, 7398 themeSpecificCode: { 7399 init: function (settings) { 7400 gkt.themeSpecificCode.f.ventureTheme(settings) 7401 gkt.themeSpecificCode.f.expressTheme(settings) 7402 gkt.themeSpecificCode.f.craveTheme(settings) 7403 gkt.themeSpecificCode.f.craftTheme(settings) 7404 gkt.themeSpecificCode.f.senseTheme(settings) 7405 7406 7407 }, 7408 7409 f: { 7410 ventureTheme: function () { 7411 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.VENTURE_THEME) { 7412 // reload on save 7413 gkt.selectors.sideCartDrawerOverlay = "" 7414 } 7415 }, 7416 expressTheme: function () { 7417 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.EXPRESS_THEME) { 7418 // addd a css property of jusyify-items:cetner to cartpagewrapper 7419 gkt.elements.cartPageWrapperV2.css("justify-items", "center") 7420 if (window.location.pathname.includes("/cart")) { 7421 gkt.selectors.checkoutBtn = ".cart__actions" 7422 } 7423 } 7424 }, 7425 craveTheme: function () { 7426 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.CRAVE_THEME) { 7427 // change css of cart__ctas in the document to block 7428 gkt.$(document).find(".cart__ctas").css("display", "block") 7429 7430 } 7431 }, 7432 craftTheme: function () { 7433 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.CRAFT_THEME) { 7434 // change css of cart__ctas in the document to block 7435 gkt.$(document).find(".cart__ctas").css("display", "block") 7436 7437 } 7438 }, 7439 senseTheme: function () { 7440 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.SENSE_THEME) { 7441 // change css of cart__ctas in the document to block 7442 gkt.$(document).find(".cart__ctas").css("display", "block") 7443 7444 } 7445 }, 7446 7447 } 7448 }, 7449 productPage: { 7450 init: async function (settings) { 7451 console.log("productPage-init") 7452 7453 gkt.state.cartData = await gkt.utility.getCart() 7454 // gkt.state.insertWrapperOnPage.push("PRODUCT_PAGE") 7455 7456 gkt.gktMessage.init(settings, "PRODUCT_PAGE") 7457 7458 // gkt.gktCombo.init(settings) 7459 7460 // gkt.gktGiftMsgAndWrap.init(settings, "PRODUCT_PAGE") 7461 7462 gkt.gktOneClickUpsell.init(settings, "PRODUCT_PAGE") 7463 7464 gkt.gktGiftCard.init(settings, "PRODUCT_PAGE") 7465 7466 gkt.gktAccountWidget.init(settings,"CART_PAGE") 7467 7468 gkt.gktNotification.init(settings, "CART_PAGE") 7469 }, 7470 f: { 7471 insertWrapperIntoPage: function (settings) { 7472 7473 if ("undefined" != typeof gkt.elements.addToCartBtn) { 7474 let addToCartBtnEle = gkt.$(document).find(g
7474kt.elements.addToCartBtn) 7475 addToCartBtnEle.each(function (index) { 7476 if (gkt.$(this).is(":visible")) { 7477 if(gkt.settings.app.addAfterAddTocartBtn){ 7478 gkt.$(this).after(gkt.elements.productPageWrapperV2); 7479 }else{ 7480 gkt.$(this).before(gkt.elements.productPageWrapperV2); 7481 } 7482 7483 } 7484 7485 }); 7486 } 7487 }, 7488 }, 7489 7490 actions: { 7491 insertUpsellModal: function () { 7492 // Gs.$("body").append(Gs.settings._modalHtml); 7493 alert("popModal for upsell action") 7494 }, 7495 }, 7496 }, 7497 cartPage: { 7498 init: async function (settings) { 7499 7500 gkt.state.cartData = await gkt.utility.getCart() 7501 7502 gkt.gktMessage.init(settings, "CART_PAGE") 7503 7504 // gkt.gktGiftMsgAndWrap.init(settings, "CART_PAGE") 7505 7506 gkt.gktOneClickUpsell.init(settings, "CART_PAGE") 7507 7508 gkt.gktFreeGiftCardPopup.init(settings, "CART_PAGE") 7509 7510 gkt.gktAccountWidget.init(settings,"CART_PAGE") 7511 7512 gkt.gktNotification.init(settings, "CART_PAGE") 7513 7514 }, 7515 f: { 7516 insertWrapperIntoPage: function (settings) { 7517 return new Promise((res, rej) => { 7518 if ("undefined" != typeof gkt.elements.checkoutBtn) { 7519 let checkoutBtnEle = gkt.$(document).find(gkt.selectors.checkoutBtn) 7520 checkoutBtnEle.each(function (index) { 7521 // console.log("index", index) 7522 if (gkt.$(this).is(":visible")) { 7523 // check if theme ids matches otherwise add element to default position 7524 if (window.Shopify && window.Shopify.theme && window.Shopify.theme.theme_store_id && window.Shopify.theme.theme_store_id == gkt.constants.themesIds.DAWN_THEME) { 7525 gkt.$(this).parent().before(gkt.elements.cartPageWrapperV2); 7526 } else if(gkt.settings.app.addAftercheckoutBtn) { 7527 gkt.$(this).after(gkt.elements.cartPageWrapperV2); 7528 }else{ 7529 gkt.$(this).before(gkt.elements.cartPageWrapperV2); 7530 } 7531 } 7532 }); 7533 7534 } 7535 res() 7536 }) 7537 }, 7538 }, 7539 events: { 7540 ajaxSuccess: function (cartSettings) { 7541 console.log("register ajax success event") 7542 gkt.$(document).ajaxSuccess(function (event, xhr, settings) { 7543 console.log("ajaxSuccess", settings.url) 7544 if (settings.url == "/change.js?line=1&quantity=0" || settings.url == "change.js?line=1&quantity=0" || settings.url == "change.js" || settings.url == "/change.js" || settings.url == "/cart.js" || settings.url == "cart.js" || settings.url == "cart" || settings.url == "/cart") { 7545 setTimeout(function () { 7546 console.log("ajaxSuccess") 7547 7548 }, 2000); 7549 } 7550 }); 7551 } 7552 } 7553 }, 7554 gktOneClickUpsell: { 7555 init: async function (settings, parent) { 7556 await gkt.gktOneClickUpsell.initialize(settings, parent) 7557 gkt.gktOneClickUpsell.f.registerEvents() 7558 }, 7559 initialize: async function (settings, parent) { 7560 let productHandle = gkt.f.getProductPageHandle(settings) 7561 7562 // write function which return two list 7563 // oneClickUpsell products that need to be shown on this product page 7564 // get the list of oneClickUpsellProducts that need to be shown on cart page 7565 let { oneClickUpsellListForCartPage, oneClickUpsellListForProductPage } = gkt.gktOneClickUpsell.f.segregateOneClickUpsells(settings.oneClickUpsells, productHandle) 7566 7567 if (parent == "PRODUCT_PAGE" && oneClickUpsellListForProductPage && oneClickUpsellListForProductPage.length && oneClickUpsellListForProductPage.length > 0) { 7568 let variantListToBeShownOnProductPage = await gkt.gktOneClickUpsell.f.findVariantListToBeShown(oneClickUpsellListForProductPage) 7569 let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 7570 gkt.gktOneClickUpsell.f.insertIntoProductPageWrapper(settings, oneClickUpsellProductPageHTML) 7571 console.log("variantListToBeShownOnProductPage", variantListToBeShownOnProductPage) 7572 gkt.utility.overWriteBuyNowBtn() 7573 gkt.state.isOverWriteBuyNowBtnTriggered = true 7574 console.log("PRODUCT_PAGE") 7575 } 7576 7577 if (parent == "CART_PAGE" && oneClickUpsellListForCartPage && oneClickUpsellListForCartPage.length && oneClickUpsellListForCartPage.length > 0) { 7578 let variantListToBeShownOnCartPage = await gkt.gktOneClickUpsell.f.findVariantListToBeShown(oneClickUpsellListForCartPage) 7579 let oneClickUpsellCartPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnCartPage, parent) 7580 gkt.gktOneClickUpsell.f.insertIntoCartPageWrapper(settings, oneClickUpsellCartPageHTML) 7581 console.log("variantListToBeShownOnCartPage", variantListToBeShownOnCartPage) 7582 console.log("CART_PAGE") 7583 } 7584 7585 }, 7586 f: { 7587 7588 segregateOneClickUpsells: function (oneClickUpsells, currProductHandle) { 7589 let oneClickUpsellListForCartPage = [] 7590 let oneClickUpsellListForProductPage = [] 7591 7592 for (let i = 0; i < oneClickUpsells.length; i++) { 7593 let oneClickUpsell = oneClickUpsells[i] 7594 7595 // add products to cart page list 7596 if (oneClickUpsell.isVisibleOnCart) { 7597 oneClickUpsellListForCartPage.push(oneClickUpsell) 7598 } 7599 7600 // add products to product page list 7601 if (oneClickUpsell.isVisibleOnAllProductPages) { 7602 7603 oneClickUpsellListForProductPage.push(oneClickUpsell) 7604 7605 } else if (oneClickUpsell.isVisibleOnSpecificProductPages && 7606 oneClickUpsell.visibleOnSpecificProductPages && 7607 oneClickUpsell.visibleOnSpecificProductPages.find(x => x.handle === currProductHandle)) { 7608 7609 oneClickUpsellListForProductPage.push(oneClickUpsell) 7610 } 7611 7612 } 7613 7614 return { 7615 oneClickUpsellListForCartPage: oneClickUpsellListForCartPage, 7616 oneClickUpsellListForProductPage: oneClickUpsellListForProductPage 7617 } 7618 }, 7619 findVariantListToBeShown: async function (oneClickUpsellList) { 7620 let responseData = [] 7621 7622 let variantListSelectedByUser = [] 7623 let apiCalls = [] 7624 7625 for (let i = 0; i < oneClickUpsellList.length; i++) { 7626 let oneClickUpsell = oneClickUpsellList[i] 7627 7628 for (let j = 0; j < oneClickUpsell.upsellProducts.length; j++) { 7629 let oneClickUpsellProduct = oneClickUpsell.upsellProducts[j] 7630 apiCalls.push(gkt.utility.getProductDataV2(oneClickUpsellProduct.handle)) 7631 7632 for (let k = 0; k < oneClickUpsellProduct.variants.length; k++) { 7633 variantListSelectedByUser.push(parseInt(oneClickUpsellProduct.variants[k].variantId)) 7634 } 7635 } 7636 7637 } 7638 7639 let oneClickUpsellProducts = await Promise.all(apiCalls) 7640 // get required variants and return 7641 for (let i = 0; i < oneClickUpsellProducts.length; i++) { 7642 let oneClickUpsellProduct = oneClickUpsellProducts[i] 7643 7644 if (!oneClickUpsellProduct) { 7645 continue 7646 } 7647 7648 for (let j = 0; j < oneClickUpsellProduct.variants.length; j++) { 7649 let variant = oneClickUpsellProduct.variants[j] 7650 //if variant.featured_image is null then take the onceClickUpsellProduct.featured_image 7651 if (variant.featured_image) { 7652 variant.featured_image = variant.featured_image.src 7653 } else { 7654 variant.featured_image = oneClickUpsellProduct.featured_image 7655 } 7656 //console.log("ashfaq"); 7657 // if variant is not available dont add it 7658 if (!variant.available) { 7659 continue 7660 } 7661 7662 // if variant is not selected in admin ui, dont add it 7663 if (variantListSelectedByUser.indexOf(variant.id) == -1) { 7664 continue 7665 } 7666 7667 responseData.push(variant) 7668 7669 } 7670 } 7671 7672 return responseData 7673 7674 }, 7675 insertIntoProductPageWrapper: function (settings, oneClickUpsellHTML) { 7676 7677 gkt.elements.productPageWrapperV2.find(".gktProductPageUpsellWrapper").css("display", "block") 7678 7679 // // insert into parent element 7680 // gkt.elements.gktGiftMsgAndWrapWrapperParent.find(".gktGiftMsgAndWrapWrapperInnerEle").append(settings.giftingOptions.shopifyPageinnerHTML); //cartPageText 7681 7682 // insert final element into productPageWrapperV2 7683 gkt.elements.productPageWrapperV2.find(".gktProductPageUpsellWrapper").append(oneClickUpsellHTML); 7684 7685 }, 7686 insertIntoCartPageWrapper: function (settings, oneClickUpsellHTML) { 7687 7688 gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").css("display", "block") 7689 7690 // insert into parent element 7691 // gkt.elements.gktCartGiftMsgAndWrapWrapperParent.find(".gktGiftMsgAndWrapWrapperInnerEle").append(settings.giftingOptions.shopifyPageinnerHTML); //cartPageText 7692 7693 // insert final element into productPageWrapperV2 7694 // gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").append(gkt.elements.gktCartGiftMsgAndWrapWrapperParent); 7695 gkt.elements.cartPageWrapperV2.find(".gktCartUpsellWrapper").append(oneClickUpsellHTML); 7696 7697 }, 7698 prepareUI: function (settings, variantListToBeShown, parent) { 7699 let gktOneClickUpsellContainer = gkt.$("<div>").addClass('gktOneClickUpsellContainer') 7700 7701 7702 for (let i = 0; i < variantListToBeShown.length; i++) { 7703 let variant = variantListToBeShown[i] 7704 let gktOneClickUpsellItemContainer = gkt.$("<div>").addClass('gktOneClickUpsellItemContainer') 7705 let gktOneClickUpsellItemContainerCheckboxLable = gkt.$("<label>").addClass('gktCustomCheckboxContainer') 7706 let inputCheckboxEle = gkt.$("<input>").addClass('gktOneClickUpsellInputCheckboxEle') 7707 .attr("type", "checkbox") 7708 .attr("data-variant", JSON.stringify(variant)) 7709 .attr("data-parent", JSON.stringify(parent)) 7710 7711 if (gkt.utility.checkIfItemPresentInCart(variant.id)) { 7712 inputCheckboxEle.attr("checked", true) 7713 } 7714 let gktOneClickUpsellImage = gkt.$("<img>").addClass('gktOneClickUpsellImage') 7715 .attr("src", variant.featured_image) 7716 gktOneClickUpsellImage.css("width", "40px") 7717 gktOneClickUpsellImage.css("height", "40px") 7718 gktOneClickUpsellImage.css("justify-self", "right") 7719 7720 gktOneClickUpsellItemContainerCheckboxLable.append(inputCheckboxEle) 7721 gktOneClickUpsellItemContainerCheckboxLable.append(gkt.$("<span>").addClass("gktCustomCheckboxCheckmark")) 7722 7723 7724 let appendString = "" + variant.name 7725 let price = variant.price > 0 ? parseFloat(variant.price / 100) : variant.price 7726 if (settings.merchantInfo && settings.merchantInfo.currencyInfo && settings.merchantInfo.currencyInfo.symbol) { 7727 appendString = appendString + " + " + settings.merchantInfo.currencyInfo.symbol + price 7728 } 7729 //create a div with appendString 7730 let gktOneClickUpsellItemContainerLableText = gkt.$("<div>").addClass('gktOneClickUpsellItemContainerLabelText') 7731 .text(appendString) 7732 gktOneClickUpsellItemContainerCheckboxLable.append(gktOneClickUpsellItemContainerLableText) 7733 gktOneClickUpsellItemContainer.append(gktOneClickUpsellItemContainerCheckboxLable) 7734 gktOneClickUpsellItemContainerCheckboxLable.append(gktOneClickUpsellImage) 7735 gktOneClickUpsellContainer.append(gktOneClickUpsellItemContainer) 7736 } 7737 7738 return gktOneClickUpsellContainer 7739 }, 7740 registerEvents: function () { 7741 gkt.$(document).on("click", ".gktOneClickUpsellInputCheckboxEle", async function (event) { 7742 await gkt.gktOneClickUpsell.actions.handleOneClickUpsellOnChangEvent(event); 7743 //gktPage type is cartPage then reload page 7744 if (gkt.state.page_type == "cart") { 7745 window.location.reload() 7746 //turn off click events till the page loads 7747 gkt.$("body").css("pointer-events", "none") 7748 } 7749 }) 7750 } 7751 }, 7752 actions: { 7753 handleOneClickUpsellOnChangEvent: async function (cb) { 7754 if (cb && cb.target) { 7755 let variant = JSON.parse(cb.target.getAttribute("data-variant")) 7756 let parent = cb.target.getAttribute("data-parent") 7757 7758 // if true 7759 if (cb.target.checked) { 7760 await gkt.utility.updateCart({ updates: { [variant.id]: 1 }, attributes:{[variant.id]:"gktOneClickUpsellBuy"}}) 7761 } 7762 else { 7763 await gkt.utility.updateCart({ updates: { [variant.id]: 0 }, attributes:{[variant.id]:""} }) 7764 } 7765 7766 } 7767 7768 } 7769 } 7770 7771 }, 7772 gktGiftCard: { 7773 init: async function (settings, parent) { 7774 await gkt.gktGiftCard.initialize(settings, parent) 7775 gkt.gktGiftCard.f.registerEvents() 7776 }, 7777 state: { 7778 isGiftCardAddToCartButtonOverwrite: false, 7779 isGiftCardBuyNowButtonOverwrite: false, 7780 giftCardAddToCartButtonClone: "", 7781 giftCardData: undefined, 7782 giftCardDi
7782v: undefined, 7783 greetingCardActiveImageSrc: undefined, 7784 greetingCardSelectedCategory: undefined, 7785 giftCardDeliveryOption: "sendNow", 7786 greetingCardImageListDiv: undefined, 7787 modalNavList : [], 7788 }, 7789 initialize: async function (settings, parent) { 7790 let productHandle = gkt.f.getProductPageHandle() 7791 let giftCardProduct = gkt.gktGiftCard.f.checkIfGiftCardProduct(productHandle, settings.giftCards) 7792 7793 if (giftCardProduct) { 7794 7795 7796 gkt.gktGiftCard.state.giftCardData = giftCardProduct 7797 gkt.gktGiftCard.state.giftCardData.isEmbededOnPage = gkt.gktGiftCard.state?.giftCardData?.isEmbededOnPage ? true : false; 7798 gkt.gktGiftCard.f.giftCardAddToCartButtonOverwrite(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage) 7799 gkt.gktGiftCard.f.giftCardBuyNowButtonOverwrite() 7800 7801 gkt.gktGiftCard.f.changeGiftCardAddToCartButtonText(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText)) 7802 gkt.gktGiftCard.f.initializeModal() 7803 7804 if(gkt.gktGiftCard.state.giftCardData.isEmbededOnPage){ 7805 let productpageUi = gkt.gktGiftCard.f.getProductPageGiftCardUi() 7806 gkt.gktGiftCard.f.insertIntoProductPageWrapper(productpageUi) 7807 } 7808 7809 gkt.gktGiftCard.f.setCustomStylingForGiftcard() 7810 7811 // initialize video messages 7812 gkt.gktVideoMsg.init(settings, parent) 7813 } 7814 console.log("gktGiftCard initialize") 7815 console.log("settings.giftCard") 7816 }, 7817 f: { 7818 insertIntoProductPageWrapper: function (productpageUi) { 7819 gkt.elements.productPageWrapperV2.find(".gktGiftCardWrapper").css("display", "block") 7820 gkt.elements.productPageWrapperV2.find(".gktGiftCardWrapper").append(productpageUi); 7821 7822 }, 7823 getProductPageGiftCardUi: function () { 7824 let { modalHeading, modalDescription, recipientName, recipientNamePlaceholder, recipientEmail, recipientEmailPlaceholder, senderName, senderNamePlaceholder, giftNote, giftNotePlaceholder, buyNowButtonText,backButtonText,deliveryDate,sendNowButtonText,sendLaterButtonText } = gkt.settings.languageData.giftcardV2.purchasePageFields; 7825 let productPageGiftCardUi = gkt.$("<div>").addClass("productPageGiftCardUi") 7826 let gktGiftCardToInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(recipientNamePlaceholder)).addClass("gktGiftCardToInputField"); 7827 let gktGiftCardEmailInputField = gkt.$("<input>").attr("type", "email").attr("placeholder", gkt.utility.renderLanguageValue(recipientEmailPlaceholder)).addClass("gktGiftCardEmailInputField"); 7828 let gktGiftCardMessageInputField = gkt.$("<textarea>").addClass("gktGiftCardMessageInputField").attr("placeholder", gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNotePlaceholder)) 7829 let gktGiftCardEmailValidation = gkt.$("<p>", { class: "gktGiftCardEmailValidation" }); 7830 7831 productPageGiftCardUi.append(gktGiftCardToInputField) 7832 productPageGiftCardUi.append(gktGiftCardEmailInputField) 7833 productPageGiftCardUi.append(gktGiftCardEmailValidation) 7834 productPageGiftCardUi.append(gktGiftCardMessageInputField) 7835 gkt.productPageGiftCardUi = productPageGiftCardUi; 7836 return productPageGiftCardUi 7837 }, 7838 setCustomStylingForGiftcard: function (){ 7839 let customStyleForGiftcard = gkt.settings.app.customStyleForGiftcard 7840 if(customStyleForGiftcard){ 7841 var styleSheet = document.createElement("style") 7842 styleSheet.innerText = customStyleForGiftcard 7843 document.body.appendChild(styleSheet) 7844 7845 } 7846 }, 7847 checkIfGiftCardProduct: function (currProductHandle, giftCards) { 7848 for (let i = 0; i < giftCards.length; i++) { 7849 if (giftCards[i] && giftCards[i].shopifyData && giftCards[i].shopifyData.handle == currProductHandle) { 7850 return giftCards[i] 7851 } 7852 7853 } 7854 return undefined 7855 }, 7856 giftCardAddToCartButtonOverwrite: function (isEmbededOnPage) { 7857 7858 // set required states 7859 gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite = true 7860 7861 gkt.elements.addToCartBtn.attr("type", "button") 7862 gkt.elements.addToCartBtn.attr("disabled", false) 7863 7864 gkt.elements.addToCartBtn.unbind().unbind("click").off().off("click"); 7865 7866 if(isEmbededOnPage){ 7867 gkt.elements.addToCartBtn.on("click", function (event) { 7868 let formValid = gkt.gktGiftCard.f.performFormValidation(); 7869 if(!formValid){ 7870 return 7871 } 7872 gkt.$(this).attr("disabled", true); 7873 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 7874 gkt.state.sendGiftcardOnPageBtnClicked = true 7875 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 7876 gkt.gktGiftCard.action.onMessageSubmit(event); 7877 7878 }) 7879 }else{ 7880 gkt.elements.addToCartBtn.on("click", function (event) { 7881 // gkt.$(this).attr("disabled", true); 7882 // setTimeout(() => { gkt.$(this).attr("disabled", false); }, 1000) 7883 gkt.gktGiftCard.action.giftCardAddToCartButton(event) 7884 }) 7885 7886 } 7887 7888 }, 7889 giftCardAddToCartButtonOverwrite2: function (isEmbededOnPage) { 7890 // setTimeout(()=>{ 7891 7892 if(gkt.$('.button--add-to-cart-gkt') && gkt.$('.button--add-to-cart-gkt').length && gkt.$('.button--add-to-cart-gkt').length == 1){ 7893 return 7894 } 7895 7896 // set required states 7897 gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite = true 7898 7899 gkt.elements.addToCartBtn.attr("type", "button") 7900 gkt.elements.addToCartBtn.attr("disabled", false) 7901 let oldbutton = gkt.elements.addToCartBtn 7902 let cloneAddToCartBtn = gkt.$("<div>").addClass('button').addClass("button--add-to-cart").addClass("button--add-to-cart-gkt") 7903 cloneAddToCartBtn.append(gkt.$("<span>").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.addToCartButtonText))) 7904 gkt.$(".gktProductPageWrapperV2").append(cloneAddToCartBtn) 7905 7906 oldbutton.css("visibility", "hidden") 7907 oldbutton.css("height", "0") 7908 oldbutton.css("width", "0") 7909 oldbutton.css("padding", "0") 7910 oldbutton.css("margin", "0") 7911 oldbutton.css("line-height", "0"); 7912 oldbutton.css("min-height", "0"); 7913 7914 7915 7916 7917 gkt.elements.addToCartBtn.unbind().unbind("click").off().off("click"); 7918 7919 if(isEmbededOnPage){ 7920 gkt.elements.addToCartBtn.on("click", function (event) { 7921 let formValid = gkt.gktGiftCard.f.performFormValidation(); 7922 if(!formValid){ 7923 return 7924 } 7925 gkt.$(this).attr("disabled", true); 7926 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 7927 gkt.state.sendGiftcardOnPageBtnClicked = true 7928 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 7929 gkt.gktGiftCard.action.onMessageSubmit(event); 7930 7931 }) 7932 }else{ 7933 cloneAddToCartBtn.on("click", function (event) { 7934 // gkt.$(this).attr("disabled", true); 7935 // setTimeout(() => { gkt.$(this).attr("disabled", false); }, 1000) 7936 gkt.gktGiftCard.action.giftCardAddToCartButton(event) 7937 }) 7938 7939 } 7940 7941 // }, 500) 7942 7943 }, 7944 giftCardBuyNowButtonOverwrite: function () { 7945 // set required states 7946 gkt.gktGiftCard.state.isGiftCardBuyNowButtonOverwrite = true 7947
7948 if (gkt.$(document).find(gkt.selectors.buyNowBtn)) { 7949 // gkt.$(document).find(gkt.selectors.buyNowBtn).hide() 7950 let buyNowBtnEle = gkt.$(document).find(gkt.selectors.buyNowBtn) 7951 buyNowBtnEle.css("visibility", "hidden") 7952 buyNowBtnEle.css("height", "0") 7953 buyNowBtnEle.css("width", "0") 7954 buyNowBtnEle.css("padding", "0") 7955 buyNowBtnEle.css("margin", "0") 7956 buyNowBtnEle.css("line-height", "0"); 7957 buyNowBtnEle.css("min-height", "0"); 7958 } 7959 }, 7960 changeGiftCardAddToCartButtonText: function (insideHtml) { 7961 if (gkt.gktGiftCard.state.isGiftCardAddToCartButtonOverwrite) { 7962 gkt.elements.addToCartBtn.html(insideHtml) 7963 } else { 7964 return false 7965 } 7966 7967 }, 7968 openGiftCardModal: function () { 7969 gkt.$('.gktGiftCardModalWrapper').css('display', 'block') 7970 gkt.$('.gktGiftCardModal .gktPoweredByBanner').html(gkt.f.preparePoweredByBannerUI()); 7971 }, 7972 registerEvents: function () { 7973 gkt.$(document).on("click", ".gktGiftCardModalClose", gkt.gktGiftCard.action.onModalClose) 7974 }, 7975 initializeModal: function () { 7976 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 7977 gkt.settings.greetingCards.greetingCardImgs && 7978 gkt.settings.greetingCards.greetingCardImgs.length>0; 7979 7980 7981 if(isGreetingCardEnabled ){ 7982 gkt.gktGiftCard.f.prepareGreetingCardUI() 7983 gkt.gktGiftCard.f.populateModalNavList(); 7984 gkt.gktGiftCard.f.displayGreetingCardForm() 7985 } 7986 else{ 7987 gkt.$('.greetingCardImageList').remove() 7988 gkt.gktGiftCard.f.populateModalNavList(); 7989 gkt.gktGiftCard.f.displayGiftCardDetailsForm() 7990 } 7991 gkt.gktGiftCard.f.prepareGiftCardUI(); 7992 gkt.gktGiftCard.f.prepareGiftCardMessage(); 7993 }, 7994 renderGreetingCardImages:function(imageList){ 7995 if(imageList){ 7996 let greetingCardImageList = gkt.$("<div>").addClass("greetingCardImageList") 7997 for (let i = 0; i < imageList.length; i++) { 7998 let _img = imageList[i].src; 7999 // add an input event listener to each image of radio type 8000 imageInput = gkt.$("<input>").attr("type", "radio").attr("name", "greetingCardImage").attr("value", imageList[i].src) 8001 imageInput.addClass("greetingCardImageInput") 8002 let imageLabel = gkt.$("<label>").addClass('greetingCardImageLabel') 8003 let image = gkt.$("<img>").addClass('greetingCardImage') 8004 8005 //on click set the current item to the preview image as active image 8006 imageLabel.on("click", gkt.gktGiftCard.action.onGreetingCardImageClick) 8007 8008 //if image is checked then attach activeGreetingCard css to it 8009 if (gkt.gktGiftCard.state.greetingCardActiveImageSrc == imageList[i].src) { 8010 imageInput.attr("checked", true) 8011 imageLabel.addClass("activeGreetingCard") 8012 gkt.gktGiftCard.action.addCheckMarkDivs(imageLabel); 8013 } 8014 image.attr("src", imageList[i].src) 8015 imageLabel.append(imageInput) 8016 imageLabel.append(image) 8017 greetingCardImageList.append(imageLabel) 8018 } 8019 // if greetingCardImageList has no elements then return that there are no Images to display 8020 if (greetingCardImageList.children().length == 0) { 8021 return gkt.$("<div>").addClass('greetingCardImageList').html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.noImagesAvailable)) 8022 } 8023 return greetingCardImageList; 8024 } 8025 8026 }, 8027 8028 changeGreetingCardImageList: function(category){
8029 let imageList = gkt.settings.greetingCards.greetingCardImgs 8030 let imageListFiltered = gkt.gktGiftCard.f.filterGreetingCardImages(imageList,category) 8031 let greetingCardImageList = gkt.gktGiftCard.f.renderGreetingCardImages(imageListFiltered) 8032 // find the div with class greetingCardImageList and replace it with the new one 8033 gkt.gktGiftCard.state.greetingCardImageListDiv = greetingCardImageList; 8034 8035 gkt.$(".greetingCardImageList").replaceWith(greetingCardImageList) 8036 return greetingCardImageList; 8037 }, 8038 filterGreetingCardImages: function(imageList,category){ 8039 let imageListFiltered = [] 8040 for (let i = 0; i < imageList.length; i++) { 8041 if(imageList[i].categoryId == category.id){ 8042 imageListFiltered.push(imageList[i]) 8043 } 8044 } 8045 return imageListFiltered 8046 }, 8047 prepareGreetingCardUI : async function (){ 8048 console.log("gktGiftCard.f.prepareGreetingCardUI") 8049 const greetingCardFields = gkt.settings.languageData.giftcardV2.greetingCardFields 8050 const continueButtonText = greetingCardFields.greetingCardContinueButtonText; 8051 const greetingCardCategory = greetingCardFields.greetingCardCategory; 8052 // This is where we have the greeting card categories, we need to render them in the modal as list items 8053 const greetingCardCategories = [greetingCardFields.greetingCardCategory1,greetingCardFields.greetingCardCategory2,greetingCardFields.greetingCardCategory3] 8054 8055 let greetingCardContainer = gkt.$("<div>").addClass('gktGiftCardContainer') 8056 let greetingCardMainBody = gkt.$("<div>").addClass('greetingCardMainBody') 8057 8058 8059 8060 8061 // add a line of categories which the user can click on 8062 let greetingCardCategoryList = gkt.$("<ul>").addClass('greetingCardCategoryList') 8063 let greetingCardCategoryListItem = gkt.$("<li>").addClass('greetingCardCategoryListItem') 8064 let greetingCardCategoryListItemText = gkt.$("<a>").addClass('greetingCardCategoryListItemText') 8065 let imageInput = undefined; 8066 let imageList = gkt.settings.greetingCards.greetingCardImgs; 8067 8068 // add the image of the gift card as the first item in the list 8069 //find the giftcard associated with this page handle 8070 8071 //find the giftcard associated with this page handle 8072 8073 8074 gkt.f.applyLabelCSS(greetingCardCategoryListItemText) 8075 8076 let productHandle = gkt.f.getProductPageHandle(gkt.settings) 8077 8078 //now get the giftcard associated with this page handle 8079 // let currGiftcardItem = gkt.settings.giftCards.find(giftcardItem => giftcardItem.shopifyData.handle == productHandle) 8080 if(false){ 8081 let currGiftcardItem = await gkt.utility.getProductDataV2(productHandle); 8082 let currGiftcardItemImage = currGiftcardItem.images[0] || currGiftcardItem.featured_image 8083 if(currGiftcardItemImage){ 8084 8085 //add the image of the gift card as the first item in the list 8086 //unshift is supprted by all browsers, checked on MDN 8087 8088 imageList.unshift({ 8089 category: "Occasion", 8090 categoryId: "greetingCardCategory1", 8091 id:0, 8092 src:currGiftcardItemImage 8093 }) 8094 } 8095 8096 // const getFirstImageFromGeneralCategory = imageList.find(x=>x.categoryId=="greetingCardCategory1"); 8097 let defaultGreetingCardSelection; 8098 if(currGiftcardItemImage){ 8099 defaultGreetingCardSelection = imageList[0]; 8100 } 8101 // const letsUseTheGiftCardImage = ; 8102 if(currGiftcardItemImage){ 8103 gkt.gktGiftCard.state.greetingCardActiveImageSrc = defaultGreetingCardSelection.src 8104 } 8105 } 8106 8107 gkt.gktGiftCard.state.greetingCardImageListDiv = gkt.gktGiftCard.f.renderGreetingCardImages(imageList) 8108 8109 for (let i = 0; i < greetingCardCategories.length; i++) { 8110 let greetingCardCategoryListItemClone = gkt.$(greetingCardCategoryListItem).clone() 8111 let greetingCardCategoryListItemTextClone = gkt.$(greetingCardCategoryListItemText).clone() 8112 greetingCardCategoryListItemTextClone.html(gkt.utility.renderLanguageValue(greetingCardCategories[i])) 8113 8114 // Select the first category as default (General) 8115 if(i == 0){ 8116 const _this = greetingCardCategoryListItemClone[0]; 8117 gkt.gktGiftCard.state.greetingCardSelectedCategory = greetingCardCategories[0] 8118 gkt.gktGiftCard.action.onGreetingCardCategoryClick.call(_this) 8119 } 8120 greetingCardCategoryListItemClone.on("click",function(){ 8121 gkt.gktGiftCard.state.greetingCardSelectedCategory=greetingCardCategories[i] 8122 gkt.gktGiftCard.action.onGreetingCardCategoryClick.call(this) 8123 }) 8124 greetingCardCategoryListItemClone.append(greetingCardCategoryListItemTextClone) 8125 greetingCardCategoryList.append(greetingCardCategoryListItemClone) 8126 } 8127 8128 let imageListFiltered = gkt.gktGiftCard.f.filterGreetingCardImages(imageList,greetingCardCategories[0]) 8129 let greetingCardImageListHTML = gkt.gktGiftCard.f.renderGreetingCardImages(imageListFiltered) 8130 greetingCardMainBody.html(greetingCardImageListHTML) 8131 8132 greetingCardContainer.append(greetingCardCategoryList) 8133 greetingCardContainer.append(greetingCardMainBody) 8134 8135 let gktGiftCardGreetingCardContent = gkt.$(".gktGiftCardGreetingCardContent") 8136 gktGiftCardGreetingCardContent.append(greetingCardContainer) 8137 8138 8139 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(continueButtonText)); 8140 }, 8141 prepareGiftCardUI: function () { 8142 console.log("gktGiftCard.f.prepareGiftCardUI") 8143 const inputFieldsHTML = gkt.gktGiftCard.f.renderInputFieldsForGiftCardDetail
8143s(); 8144 let gktGiftCardDetailsContent = gkt.$(".gktGiftCardDetailsContent") 8145 //TODO prepareBackButton() 8146 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled 8147 && gkt.settings.greetingCards.greetingCardImgs 8148 && gkt.settings.greetingCards.greetingCardImgs.length>0; 8149 let gktGiftCardModalBackButton; 8150 if(isGreetingCardEnabled){ 8151 gktGiftCardModalBackButton = gkt.gktGiftCard.f.prepareBackButton(gkt.gktGiftCard.f.displayGreetingCardForm); 8152 gktGiftCardDetailsContent.append(gktGiftCardModalBackButton); 8153 } 8154 8155 gktGiftCardDetailsContent.append(inputFieldsHTML) 8156 // gktGiftCardDetailsContent.append(gktVideoMsgButton) 8157 8158 // append close button 8159 gktGiftCardModalCloseDiv = gkt.$(".gktGiftCardModalClose") 8160 let closeButtonSvg = '<svg width="24px" height="24px" enable-background="new 0 0 587.91 587.91" version="1.1" viewBox="0 0 587.91 587.91" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m86.451 501.46c26.937 26.936 58.315 48.088 93.265 62.871 36.207 15.314 74.642 23.078 114.24 23.078 39.596 0 78.032-7.764 114.24-23.078 34.949-14.783 66.328-35.936 93.266-62.871 26.936-26.938 48.09-58.316 62.871-93.266 15.314-36.207 23.08-74.643 23.08-114.24 0-39.598-7.766-78.033-23.08-114.24-14.781-34.95-35.936-66.328-62.871-93.265-26.938-26.937-58.316-48.09-93.266-62.872-36.208-15.315-74.643-23.079-114.24-23.079-39.597 0-78.032 7.765-114.24 23.079-34.95 14.782-66.328 35.936-93.265 62.872s-48.09 58.315-62.873 93.264c-15.313 36.207-23.078 74.642-23.078 114.24 0 39.596 7.765 78.031 23.079 114.24 14.782 34.95 35.936 66.328 62.872 93.266zm207.5-458.12c138.41 0 250.61 112.2 250.61 250.62 0 138.41-112.2 250.61-250.61 250.61s-250.62-112.2-250.62-250.61c0-138.41 112.2-250.62 250.62-250.62z"/><path d="m293.96 587.91c-39.667 0-78.167-7.778-114.43-23.117-35.01-14.809-66.442-35.998-93.423-62.979-26.983-26.984-48.172-58.417-62.979-93.425-15.341-36.269-23.119-74.77-23.119-114.43 0-39.663 7.778-78.165 23.118-114.44 14.807-35.008 35.997-66.44 62.979-93.423s58.415-48.172 93.423-62.979c36.27-15.34 74.771-23.118 114.43-23.118 39.666 0 78.167 7.778 114.43 23.119 35.009 14.807 66.441 35.997 93.425 62.979 26.984 26.985 48.173 58.417 62.979 93.423 15.341 36.27 23.119 74.771 23.119 114.43 0 39.662-7.778 78.163-23.119 114.43-14.806 35.007-35.994 66.439-62.979 93.425-26.982 26.98-58.415 48.169-93.425 62.979-36.266 15.338-74.767 23.116-114.43 23.116zm0-586.91c-39.529 0-77.898 7.751-114.04 23.039-34.889 14.757-66.215 35.874-93.106 62.765-26.892 26.892-48.009 58.217-62.766 93.105-15.288 36.147-23.039 74.517-23.039 114.05 0 39.527 7.751 77.898 23.039 114.04 14.757 34.889 35.874 66.214 62.766 93.106 26.89 26.889 58.215 48.006 93.106 62.765 36.142 15.287 74.512 23.038 114.04 23.038s77.901-7.751 114.04-23.039c34.89-14.758 66.216-35.875 93.106-62.764 26.893-26.895 48.009-58.22 62.764-93.106 15.289-36.146 23.041-74.516 23.041-114.04 0-39.529-7.752-77.899-23.041-114.04-14.754-34.887-35.871-66.212-62.764-93.106-26.892-26.891-58.218-48.008-93.106-62.765-36.144-15.289-74.514-23.04-114.04-23.04zm0 544.07c-67.075 0-130.14-26.12-177.56-73.549-47.429-47.43-73.55-110.49-73.55-177.56s26.12-130.14 73.55-177.56c47.429-47.429 110.49-73.55 177.56-73.55s130.14 26.121 177.56 73.55c47.43 47.43 73.55 110.49 73.55 177.56s-26.12 130.14-73.55 177.56c-47.429 47.429-110.49 73.549-177.56 73.549zm0-501.23c-66.808 0-129.62 26.017-176.86 73.257-47.24 47.241-73.257 110.05-73.257 176.86s26.017 129.62 73.257 176.86c47.24 47.24 110.05 73.257 176.86 73.257s129.62-26.017 176.86-73.257c47.24-47.239 73.257-110.05 73.257-176.86 0-66.808-26.017-129.62-73.257-176.86-47.241-47.241-110.05-73.257-176.86-73.257z"/><path d="m184.92 402.99c4.183 4.184 9.664 6.275 15.146 6.275s10.964-2.092 15.146-6.275l78.742-78.742 78.743 78.742c4.182 4.184 9.664 6.275 15.146 6.275s10.963-2.092 15.146-6.275c8.365-8.363 8.365-21.926 0-30.291l-78.744-78.742 78.742-78.743c8.365-8.365 8.365-21.928 0-30.292-8.363-8.365-21.926-8.365-30.291 0l-78.743 78.743-78.742-78.743c-8.365-8.365-21.928-8.365-30.292 0-8.365 8.365-8.365 21.927 0 30.292l78.743 78.743-78.743 78.742c-8.364 8.365-8.364 21.928 1e-3 30.291z"/><path d="m387.84 409.76c-5.856 0-11.36-2.28-15.5-6.422l-78.389-78.389-78.388 78.389c-4.14 4.142-9.645 6.422-15.5 6.422s-11.36-2.28-15.5-6.422c-4.14-4.14-6.42-9.644-6.42-15.498 0-5.855 2.28-11.359 6.42-15.5l78.389-78.389-78.389-78.389c-8.546-8.547-8.546-22.453 0-31 4.14-4.14 9.644-6.42 15.5-6.42 5.855 0 11.36 2.28 15.5 6.42l78.389 78.389 78.389-78.389c4.141-4.14 9.645-6.42 15.5-6.42 5.854 0 11.358 2.28 15.498 6.42 4.141 4.14 6.42 9.645 6.42 15.5s-2.279 11.36-6.42 15.5l-78.389 78.389 78.391 78.389c4.141 4.141 6.421 9.645 6.421 15.5 0 5.854-2.28 11.358-6.421 15.498-4.143 4.141-9.647 6.422-15.501 6.422zm-93.889-86.225 79.096 79.096c3.95 3.952 9.204 6.129 14.793 6.129 5.587 0 10.841-2.177 14.793-6.
8160129 3.951-3.95 6.128-9.203 6.128-14.791s-2.177-10.842-6.128-14.793l-79.098-79.096 79.096-79.096c3.951-3.951 6.127-9.205 6.127-14.793s-2.176-10.841-6.127-14.792c-3.95-3.951-9.203-6.127-14.791-6.127s-10.842 2.176-14.793 6.127l-79.096 79.096-79.096-79.096c-3.951-3.951-9.205-6.127-14.793-6.127s-10.841 2.176-14.792 6.127c-8.156 8.157-8.156 21.428 0 29.585l79.096 79.096-79.096 79.096c-3.951 3.951-6.127 9.205-6.127 14.793s2.176 10.841 6.127 14.791c3.952 3.952 9.205 6.129 14.793 6.129s10.841-2.177 14.793-6.129l79.095-79.096z"/></svg>' 8161 gktGiftCardModalCloseDiv.append(closeButtonSvg) 8162 }, 8163 prepareBackButton: function (callback){ 8164 let gktGiftCardModalBackButton = gkt.$("<div>").addClass("gktGiftCardModalBackButton") 8165 let gktGiftCardModalBackButtonSVG = gkt.$("<div>").addClass("gktGiftCardModalBackButtonSVG") 8166 gktGiftCardModalBackButtonSVG.append('<svg class="svg-icon" style="width: 16px; height: 16px;vertical-align: middle;fill: currentColor;overflow: hidden; transform: rotate(180deg);" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M682.666667 533.333333a21.333333 21.333333 0 0 1-15.146667-6.186666l-298.666667-298.666667a21.333333 21.333333 0 0 1 30.293334-30.293333l298.666666 298.666666a21.333333 21.333333 0 0 1 0 30.293334A21.333333 21.333333 0 0 1 682.666667 533.333333z" fill="#333333" /><path d="M384 832a21.333333 21.333333 0 0 1-15.146667-6.186667 21.333333 21.333333 0 0 1 0-30.293333l298.666667-298.666667a21.333333 21.333333 0 0 1 30.293333 30.293334l-298.666666 298.666666A21.333333 21.333333 0 0 1 384 832z" fill="#333333" /></svg>') 8167 let gktGiftCardModalBackButtonText = gkt.$("<div>").addClass("gktGiftCardModalBackButtonText").append(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.backButtonText)) 8168 gktGiftCardModalBackButton.append(gktGiftCardModalBackButtonSVG) 8169 gktGiftCardModalBackButton.append(gktGiftCardModalBackButtonText) 8170 gktGiftCardModalBackButton.on("click", function () { 8171 callback() 8172 }) 8173 return gktGiftCardModalBackButton; 8174 }, 8175 renderInputFieldsForGiftCardDetails: function(){ 8176 let { modalHeading, modalDescription, recipientName, recipientNamePlaceholder, recipientEmail, recipientEmailPlaceholder, senderName, senderNamePlaceholder, giftNote, giftNotePlaceholder, buyNowButtonText,backButtonText,deliveryDate,sendNowButtonText,sendLaterButtonText } = gkt.settings.languageData.giftcardV2.purchasePageFields; 8177 8178 let gktGiftCardModalPopupHeading = gkt.$("gktGiftCardModalPopupHeading") 8179 let gktGiftCardModalHeader = gkt.$(".gktGiftCardModalHeader") 8180 8181 let gktGiftCardToInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(recipientNamePlaceholder)).addClass("gktGiftCardToInputField"); 8182 let gktGiftCardEmailInputField = gkt.$("<input>").attr("type", "email").attr("placeholder", gkt.utility.renderLanguageValue(recipientEmailPlaceholder)).addClass("gktGiftCardEmailInputField"); 8183 let gktGiftCardFromInputField = gkt.$("<input>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(senderNamePlaceholder)).addClass("gktGiftCardFromInputField"); 8184 8185 // attach a checkbox, 8186 let gktGiftCardModalCheckboxContainer = gkt.$("<div>").addClass("gktGiftCardModalCheckboxContainer") 8187 let gktGiftCardModalCheckbox = gkt.$("<label>").addClass("gktGiftCardModalCheckbox") 8188 let gktGiftCardInputCheckbox = gkt.$("<input>").attr("type","checkbox").addClass("gktGiftCardModalCheckboxInput").attr("name","gktGiftCardModalCheckbox") 8189 .on("change",function(){ 8190 gkt.gktGiftCard.action.onSendSelfClick(); 8191 }) 8192 8193 let gktCustomCheckboxCheckmarkSmall = gkt.$("<span>").addClass("gktCustomCheckboxCheckmarkSmall").attr("for","gktGiftCardModalCheckbox") 8194 let gktGiftCardModalCheckboxLabel = gkt.$("<span>").addClass("gktGiftCardModalCheckboxLabel").attr("for","gktGiftCardModalCheckbox") 8195 gktGiftCardModalCheckboxContainer.append(gktGiftCardModalCheckbox) 8196 8197 // a date picker 8198 let gktGiftCardDatePicker = gkt.$("<input>").attr("type", "date").addClass("gktGiftCardDatePicker"); 8199 // todays date is the default value 8200 // gktGiftCardDatePicker.attr("value", new Date().toISOString().slice(0, 10)); 8201 gktGiftCardDatePicker.attr("value", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 8202 let gktGiftCardMessageInputField = gkt.$("<textarea>").attr("type", "text").attr("placeholder", gkt.utility.renderLanguageValue(giftNotePlaceholder)).addClass("gktGiftCardMessageInputField").attr("rows", "4"); 8203 8204 8205 let gktGiftCardEmailValidation = gkt.$("<p>", { class: "gktGiftCardEmailValidation" }); 8206 let gktGiftCardDateValidation = gkt.$("<p>", { class: "gktGiftCardDateValidation" }); 8207 // add a label to all of these fields 8208 let gktGiftCardToLabel = gkt.$("<label>").addClass("gktGiftCardToLabel").html(gkt.utility.renderLanguageValue(recipientName)); 8209 let gktGiftCardFromLabel = gkt.$("<label>").addClass("gktGiftCardFromLabel").html(gkt.utility.renderLanguageValue(senderName)) 8210 let gktGiftCardEmailLabel = gkt.$("<label>").addClass("gktGiftCardEmailLabel").html(gkt.utility.renderLanguageValue(recipientEmail)) 8211 // let gktGiftCardMessageLabel = gkt.$("<label>").addClass("gktGiftCardMessageLabel").html(giftNote.value) 8212 let gktGiftCardDateLabel = gkt.$("<label>").addClass("gktGiftCardDateLabel").html(gkt.utility.renderLanguageValue(deliveryDate)) 8213 8214 // applyLabelCSS to all of these fields 8215 gkt.f.applyLabelCSS(gktGiftCardToLabel) 8216 gkt.f.applyLabelCSS(gktGiftCardFromLabel) 8217 gkt.f.applyLabelCSS(gktGiftCardEmailLabel) 8218 gkt.f.applyLabelCSS(gktGiftCardDateLabel) 8219 8220 // create two buttons, detailing Delivery Options 8221 let gktDeliveryOptions = gkt.$("<div>").addClass("gktDeliveryOptions") 8222 let gktGiftCardSendNowButton = gkt.$("<button>").addClass("gktGiftCardSendNowButton").html(gkt.utility.renderLanguageValue(sendNowButtonText)); 8223 let gktGiftCardSendLaterButton = gkt.$("<button>").addClass("gktGiftCardSendLaterButton").html(gkt.utility.renderLanguageValue(sendLaterButtonText)); 8224 8225 8226 // type as button else they autosubmit the form. 8227 gktGiftCardSendNowButton.attr("type", "button"); 8228 8229 gktGiftCardSendLaterButton.attr("type", "button"); 8230 8231 gktDeliveryOptions.append(gktGiftCardSendNowButton) 8232 gktDeliveryOptions.append(gktGiftCardSendLaterButton) 8233 // add all of these to the gktGiftCardDateLabel 8234 gktGiftCardDateLabel.append(gktDeliveryOptions) 8235 8236 gktGiftCardSendNowButton.addClass("activeDeliveryOption"); 8237 8238 gktGiftCardSendNowButton.css("font-family", gkt.settings.app.themeButtonFontFamily); 8239 gktGiftCardSendLaterButton.css("font-family", gkt.settings.app.themeButtonFontFamily); 8240 gkt.f.applyButtonCSS(gktGiftCardSendNowButton) 8241 8242 //add onClickFunctionality to Send Later which opens up a date picker 8243 gktGiftCardSendLaterButton.on("click", function () { 8244 gktGiftCardDatePicker.css("display", "block"); 8245 gkt.f.applyButtonCSS(gktGiftCardSendLaterButton); 8246 8247 gkt.f.resetButtonCSS(gktGiftCardSendNowButton) 8248 gktGiftCardSendLaterButton.addClass("activeDeliveryOption"); 8249 gktGiftCardSendNowButton.removeClass("activeDeliveryOption"); 8250 gkt.gktGiftCard.state.giftCardDeliveryOption = "sendLater" 8251 gktGiftCardDateLabel.append(gktGiftCardDatePicker).append(gktGiftCardDateValidation) 8252 }) 8253 8254 gktGiftCardSendNowButton.on("click", function () { 8255 gktGiftCardDatePicker.css("display", "none"); 8256 gkt.f.applyButtonCSS(gktGiftCardSendNowButton) 8257 //add activeDeliveryOption class to the button 8258 gktGiftCardSendNowButton.addClass("activeDeliveryOption"); 8259 gkt.f.resetButtonCSS(gktGiftCardSendLaterButton) 8260 gktGiftCardSendLaterButton.removeClass("activeDeliveryOption"); 8261 gkt.gktGiftCard.state.giftCardDeliveryOption = "sendNow" 8262 }) 8263 8264 gktGiftCardToLabel.attr("required", true) 8265 gktGiftCardFromLabel.attr("required", true) 8266 gktGiftCardEmailLabel.attr("required", true) 8267 // gktGiftCardMessageLabel.attr("required", true) 8268 // add todays date as default value 8269 8270 // gktGiftCardDatePicker.attr("value", new Date().toISOString().slice(0, 10)) 8271 gktGiftCardDatePicker.attr("value", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 8272 8273 8274 //attach a date min and max value attr to the date picker 8275 // gktGiftCardDatePicker.attr("min", new Date().toISOString().slice(0, 10)); 8276 gktGiftCardDatePicker.attr("min", gkt.utility.getLocalDateIn_YYYY_MM_DD()); 8277 8278 8279 // and max date is set to the 60 days after 8280 // gktGiftCardDatePicker.attr("max", new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10)); 8281 8282 const _maxDate = new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000); 8283 gktGiftCardDatePicker.attr("max", gkt.utility.getLocalDateIn_YYYY_MM_DD(_maxDate)); 8284 8285 // add all of these fields to a div 8286 let gktGiftCardInputFieldsDiv = gkt.$("<div>").addClass("gktGiftCardInputFieldsDiv") 8287 8288 let gktGiftCardInputReceiverName = gkt.$("<div>").addClass("gktGiftCardInputReceiverName") 8289 // let gktGiftCardInputRow1Div1 = gkt.$("<div>").addClass("gktGiftCardInputRow1Div1") 8290 // let gktGiftCardInputRow1Div2 = gkt.$("<div>").addClass("gktGiftCardInputRow1Div2") 8291 let gktGiftCardInputReceiverEmail = gkt.$("<div>").addClass("gktGiftCardInputReceiverEmail") 8292 let gktGiftCardInputRow3Div1 = gkt.$("<div>").addClass("gktGiftCardInputRow3Div1") 8293 let gktGiftCardInputSenderName = gkt.$("<div>").addClass("gktGiftCardInputSenderName") 8294 8295 let gktGiftCardInputRow5 = gkt.$("<div>").addClass("gktGiftCardInputRow5") 8296 8297 // gktGiftCardInputRow1.append(gktGiftCardInputRow1Div1).append(gktGiftCardInputRow1Div2) 8298 gktGiftCardInputReceiverName.append(gktGiftCardToLabel).append(gktGiftCardToInputField) 8299 gktGiftCardInputReceiverEmail.append(gktGiftCardEmailLabel).append(gktGiftCardEmailInputField).append(gktGiftCardEmailValidation) 8300 // gktGiftCardInputRow3Div1. 8301 gktGiftCardInputSenderName.append(gktGiftCardFromLabel).append(gktGiftCardFromInputField) 8302 gktGiftCardInputRow5.append(gktGiftCardDateLabel) 8303 8304 gktGiftCardModalCheckboxLabel.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.sendToSelfText)); 8305 8306 gktGiftCardModalCheckbox.append(gktGiftCardInputCheckbox) 8307 gktGiftCardModalCheckbox.append(gktCustomCheckboxCheckmarkSmall) 8308 gktGiftCardModalCheckbox.append(gktGiftCardModalCheckboxLabel) 8309 8310 gktGiftCardInputFieldsDiv.append(gktGiftCardModalCheckboxContainer) 8311 gktGiftCardInputFieldsDiv.append(gktGiftCardInputReceiverName) 8312 gktGiftCardInputFieldsDiv.append(gktGiftCardInputReceiverEmail) 8313 gktGiftCardInputFieldsDiv.append(gktGiftCardInputSenderName) 8314 gktGiftCardInputFieldsDiv.append(gktGiftCardInputRow5) 8315 8316 return gktGiftCardInputFieldsDiv; 8317 }, 8318 prepareGiftCardMessage : function (){ 8319 8320 let gktGiftCardMessage = gkt.$(".gktGiftCardMessageContent"); 8321 // a label field 8322 let gktGiftCardMessageLabel = gkt.$("<label>").addClass("gktGiftCardMessageLabel").attr("for", "gktGiftCardMessage").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNote)); 8323 let gktGiftCardMessageInputField = gkt.$("<textarea>").addClass("gktGiftCardMessageInputField").attr("placeholder", gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftNotePlaceholder)) 8324 let gktVideoMsgButton; 8325 8326 8327 gkt.f.applyLabelCSS(gktGiftCardMessageLabel) 8328 8329 // create an empty divider to separate the message and the video message button 8330 let gktGiftCardMessageDivider = gkt.$("<div>").addClass("gktGiftCardMessageDivider")
8331 let gktVideoMsgCheckboxWrapper; 8332 let gktVideoMsgCheckboxLabel; 8333 if(gkt.settings.videoMessage.isVideoMessagingEnabled ){ 8334 //gktVideoMsgButton = gkt.$("<button>").addClass("gktVideoMsgButton").attr("type", "button").text(gkt.settings.languageData.videoMessage.sendVideoMessageText.value); 8335 gktVideoMsgButton = gkt.$("<button>").addClass("gktVideoMsgButton").attr("type", "button").text("Video Msg"); 8336 gktVideoMsgCheckboxLabel = gkt.$("<label>").addClass("gktVideoMsgCheckboxLabel").attr("for", "gktVideoMsgCheckbox").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.recordVideoLabel)); 8337 // create a label with switch classname 8338 8339 gkt.f.applyLabelCSS(gktVideoMsgCheckboxLabel) 8340 8341 gktVideoMsgCheckboxWrapper = gkt.$("<label>").addClass("gktVideoMsgCheckboxWrapper").attr("for", "gktVideoMsg") 8342 8343 //input which is type of checkbox 8344 8345 let gktVideoMsgCheckboxField; 8346 8347 // a span which is round and slider css 8348 let gktVideoMsgSlider = gkt.$("<span>").addClass("gktVideoMsgSlider").attr("id", "gktVideoMsgSlider"); 8349 8350 8351 8352 if(gkt.utility.isMobileView()){ 8353 //create a checkbox and a dropzone to upload a video 8354 gktVideoMsgSlider = gkt.$("<span>").addClass("gktVideoMsgSlider_Mobile").attr("id", "gktVideoMsgSlider_Mobile"); 8355 let gktVideoMessageFileInput = gkt.$("<input>").attr("type", "file").addClass("gktVideoMessageFileInput").attr("id", "gktVideoMessageFileInput").attr("capture", "user").attr("accept", "video/*"); 8356 // gktVideoMsgCheckboxField = gktVideoMessageFileInput; 8357 gktVideoMsgCheckboxField = gkt.$("<input>").addClass("gktVideoMsgCheckboxField_Mobile").attr("type", "checkbox").attr("id", "gktVideoMsg_Mobile"); 8358 8359 gktVideoMsgSlider.on("click", function(){ 8360 gktVideoMsgCheckboxField.trigger("click") 8361 if(gktVideoMsgCheckboxField.is(":checked")){ 8362 gktVideoMsgSlider.addClass("gktVideoMsgSliderActive") 8363 gktVideoMessageFileInput.click(); 8364 }else{ 8365 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8366 gkt.gktVideoMsg.f.clickClose(event); 8367 } 8368 }) 8369 8370 gktVideoMessageFileInput.on("change", async function({target}){ 8371 console.log("file input changed target", target) 8372 if (target.files && target.files.length) { 8373 try { 8374 gkt.gktVideoMsg.f.prepareVideoMsgPlayer() 8375 8376 console.log("target.files[0]", target.files[0]) 8377 gkt.gktVideoMsg.state.recordedBlob = target.files[0]; 8378 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.attr("src",URL.createObjectURL(gkt.gktVideoMsg.state.recordedBlob)); 8379 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 8380 // await gkt.gktVideoMsg.f.covertBlobToBase64(target.files[0]); 8381 //do something with above data string 8382 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 8383 } catch(error) { 8384 //handle error 8385 console.log(error,"error occured while uploading file") 8386 } 8387 }else{ 8388 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8389 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'none') 8390 } 8391 }) 8392 //append gktVideoMessageFileInput to gktVideoMsg
8392CheckboxWrapper 8393 gktVideoMessageFileInput.css("display", "none"); 8394 gktVideoMsgCheckboxWrapper.append(gktVideoMessageFileInput); 8395 }else{ 8396 gktVideoMsgCheckboxField = gkt.$("<input>").addClass("gktVideoMsgCheckboxField").attr("type", "checkbox").attr("id", "gktVideoMsg"); 8397 gktVideoMsgCheckboxField.on("change", function(event){ 8398 if(gktVideoMsgCheckboxField.is(":checked")){ 8399 console.log("it is checked"); 8400 gkt.gktVideoMsg.actions.gktVideoMsgButton(event); 8401 }else{ 8402 gktVideoMsgSlider.removeClass("gktVideoMsgSliderActive") 8403 gkt.gktVideoMsg.f.clickClose(event); 8404 } 8405 }) 8406 } 8407 gktVideoMsgCheckboxWrapper.append(gktVideoMsgCheckboxField) 8408 gktVideoMsgCheckboxWrapper.append(gktVideoMsgSlider) 8409 } 8410 // gktGiftCardMessageInputField and gktGiftCardMessageLabel are added to same parent div 8411 let gktVideoMessageCheckboxRow = gkt.$("<div>").addClass("gktVideoMessageCheckboxRow") 8412 gktVideoMessageCheckboxRow.append(gktVideoMsgCheckboxLabel).append(gktVideoMsgCheckboxWrapper) 8413 let gktGiftCardMessageInputFieldsDiv = gkt.$("<div>").addClass("gktGiftCardMessageInputFieldsDiv") 8414 gktGiftCardMessageInputFieldsDiv.append(gktGiftCardMessageLabel).append(gktGiftCardMessageInputField) 8415 gktGiftCardModalBackButton = gkt.gktGiftCard.f.prepareBackButton(gkt.gktGiftCard.f.displayGiftCardDetailsForm); 8416 gktGiftCardMessage.append(gktGiftCardModalBackButton); 8417 gktGiftCardMessage.append(gktGiftCardMessageInputFieldsDiv) 8418 gktGiftCardMessage.append(gktGiftCardMessageDivider) 8419 // gktGiftCardMessage.append(gktVideoMsgButton) 8420 gktGiftCardMessage.append(gktVideoMessageCheckboxRow) 8421 // gkt.$(".gktGiftCardModalPopupHeading").append(gktGiftCardModalBackButton) 8422 8423 8424 }, 8425 populateModalNavList : function(){ 8426 let isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 8427 gkt.settings.greetingCards.greetingCardImgs && 8428 gkt.settings.greetingCards.greetingCardImgs.length>0; 8429 let isSendToSelfChecked =gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8430 if(isGreetingCardEnabled){ 8431 gkt.gktGiftCard.state.modalNavList.push({id:"GREETING_CARD", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.greetingCardNavItem), visited:false,active:false}); 8432 } 8433 //("Gift Card Details"); 8434 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_CARD_DETAILS", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftCardDetailsNavItem), visited:false,active:false}); 8435 if(!isSendToSelfChecked){ 8436 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_MESSAGE", name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftcardMessageNavItem), visited:false,active:false}); 8437 } 8438 8439 }, 8440 renderGiftCardModalNav: function(){ 8441 console.log("rendering gift card modal nav"); 8442 let gktGiftCardModalNavHTML = gkt.$("<div>").addClass("gktGiftCardModalNav"); 8443 let gktGiftCardModalNavForMobileHTML = gkt.$("<div>").addClass("gktGiftCardModalNavForMobile"); 8444 const isGreetingCardEnabled = gkt.settings.greetingCards.isGreetingCardEnabled && 8445 gkt.settings.greetingCards.greetingCardImgs && 8446 gkt.settings.greetingCards.greetingCardImgs.length>0; 8447
8448 if (gkt.gktGiftCard.state.modalNavList.length<1){ 8449 gkt.gktGiftCard.f.populateModalNavList(); 8450 } 8451 8452 gktGiftCardModalNavList = gkt.gktGiftCard.state.modalNavList; 8453 8454 // now create the nav list and append it to the modal nav while attaching a span for ">" 8455 for(let i=0; i<gktGiftCardModalNavList.length; i++){ 8456 let gktGiftCardModalNavListItem = gkt.$("<div>").addClass("gktGiftCardModalNavListItem").html(gktGiftCardModalNavList[i].name); 8457 gkt.f.applyHeaderCSS(gktGiftCardModalNavListItem); 8458 8459 //if modal the item has visited true then set it as activeNavItem 8460 if(gktGiftCardModalNavList[i].visited){ 8461 gktGiftCardModalNavListItem.addClass("activeNavItem"); 8462 } 8463 8464 let gktGiftCardModalNavListItemSpan; 8465 if(i < gktGiftCardModalNavList.length-1){ 8466 gktGiftCardModalNavListItemSpan = gkt.$("<div>").addClass("gktGiftCardModalNavListItemSpan").html('<svg class="svg-icon" style="width: 16px; height: 16px;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M682.666667 533.333333a21.333333 21.333333 0 0 1-15.146667-6.186666l-298.666667-298.666667a21.333333 21.333333 0 0 1 30.293334-30.293333l298.666666 298.666666a21.333333 21.333333 0 0 1 0 30.293334A21.333333 21.333333 0 0 1 682.666667 533.333333z" fill="#333333" /><path d="M384 832a21.333333 21.333333 0 0 1-15.146667-6.186667 21.333333 21.333333 0 0 1 0-30.293333l298.666667-298.666667a21.333333 21.333333 0 0 1 30.293333 30.293334l-298.666666 298.666666A21.333333 21.333333 0 0 1 384 832z" fill="#333333" /></svg>'); 8467 } 8468 if(gktGiftCardModalNavList[i].active){ 8469 gktGiftCardModalNavListItem.addClass("activeNavItem"); 8470 gktGiftCardModalNavForMobileHTML.html(gktGiftCardModalNavListItem.clone()) 8471 } 8472 gktGiftCardModalNavHTML.append(gktGiftCardModalNavListItem) 8473 gktGiftCardModalNavHTML.append(gktGiftCardModalNavListItemSpan) 8474 } 8475 // if gktGiftCardModalNav is not present in the DOM, then append it else replace it 8476 if(gkt.$(".gktGiftCardModalNav").length){ 8477 gkt.$(".gktGiftCardModalNav").replaceWith(gktGiftCardModalNavHTML) 8478 } 8479 else{ 8480 gkt.$(".gktGiftCardModalHeader").append(gktGiftCardModalNavHTML) 8481 } 8482 8483 if(gkt.$(".gktGiftCardModalNavForMobile").length){ 8484 gkt.$(".gktGiftCardModalNavForMobile").replaceWith(gktGiftCardModalNavForMobileHTML) 8485 } 8486 else{ 8487 gkt.$(".gktGiftCardModalHeader").append(gktGiftCardModalNavForMobileHTML) 8488 } 8489 8490 }, 8491 attachEventsToDetailsForm: function () { 8492 // cleanup the previous attached events 8493 gkt.$(".gktGiftCardContentFooterBtn1").off("
8493click"); 8494 8495 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.giftcardDetailsButton)); 8496 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8497 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8498 gkt.$(this).attr("disabled", true); 8499 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8500 gkt.gktGiftCard.action.onDetailsSubmit(event) 8501 }) 8502 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8503 gkt.$(".gktGiftCardContentFooter").append(gkt.gktGiftCard.state.giftCardAddToCartButtonClone) 8504 }, 8505 attachEventsToGreetingCardForm : function(){ 8506 // cleanup the previous attached events 8507 gkt.$(".gktGiftCardContentFooterBtn1").off("click"); 8508 8509 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.greetingCardFields.greetingCardContinueButtonText)); 8510 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8511 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8512 gkt.$(this).attr("disabled", true); 8513 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8514 gkt.gktGiftCard.action.onGreetingCardSubmit(event) 8515 }) 8516 // set the first nav item as active 8517 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8518 }, 8519 attachEventsToMessageForm : function (){ 8520 // cleanup the previous attached events 8521 gkt.$(".gktGiftCardContentFooterBtn1").off("
8521click"); 8522 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonText)); 8523 gkt.f.applyButtonCSS(gkt.$(".gktGiftCardContentFooterBtn1")); 8524 gkt.$(".gktGiftCardContentFooterBtn1").on("click", function (event) { 8525 gkt.$(this).attr("disabled", true); 8526 setTimeout(() => { gkt.$(this).attr("disabled", false); }, 4000) 8527 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 8528 gkt.gktGiftCard.action.onMessageSubmit(event) 8529 }) 8530 8531 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8532 }, 8533 displayGreetingCardForm:function(){ 8534 gkt.gktGiftCard.action.hideGiftCardMessageBody(); 8535 gkt.gktGiftCard.action.hideGiftCardDetailsBody(); 8536 8537 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8538 if(item.id == "GREETING_CARD"){ 8539 item.visited = true; 8540 item.active = true; 8541 } 8542 else{ 8543 item.active = false; 8544 } 8545 }) 8546 gkt.gktGiftCard.action.showGreetingCardBody(); 8547 gkt.gktGiftCard.f.attachEventsToGreetingCardForm(); 8548 }, 8549 displayGiftCardDetailsForm : function (){ 8550 gkt.gktGiftCard.action.hideGreetingCardBody(); 8551 gkt.gktGiftCard.action.hideGiftCardMessageBody(); 8552 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8553 if(item.id == "GIFT_CARD_DETAILS"){ 8554 item.visited = true; 8555 item.active = true; 8556 } 8557 else{ 8558 item.active = false; 8559 } 8560 }); 8561 gkt.gktGiftCard.action.showGiftCardDetailsBody() 8562 gkt.gktGiftCard.f.attachEventsToDetailsForm(); 8563 }, 8564 displayMessageForm: function(){ 8565 gkt.gktGiftCard.action.hideGreetingCardBody(); 8566 gkt.gktGiftCard.action.hideGiftCardDetailsBody(); 8567 gkt.gktGiftCard.state.modalNavList.find(function(item){ 8568 if(item.id == "GIFT_MESSAGE"){ 8569 item.visited = true; 8570 item.active = true; 8571 }else{ 8572 item.active = false; 8573 } 8574 }); 8575 //and all the other nav items are inactive 8576 8577 gkt.gktGiftCard.action.showGiftCardMessageBody(); 8578 gkt.gktGiftCard.f.attachEventsToMessageForm(); 8579 }, 8580 validateForm: function () { 8581 let isValid = true 8582 console.log("validateForm"); 8583 // run validation on all fields which are visible 8584 gkt.$(".gktGiftCardInputFieldsDiv input").each(function () { 8585 if(gkt.$(this).is(":visible")){ 8586 if (gkt.$(this).val().trim() == "") { 8587 gkt.$(this).css("border", "1px solid red") 8588 isValid = false 8589 } else { 8590 gkt.$(this).css("border", "1px solid #cccccc") 8591 } 8592 } 8593 }) 8594 return isValid; 8595 }, 8596 emailValidation: function (emailString) { 8597 var atSymbol = emailString.indexOf("@"); 8598 if (atSymbol < 1) return false;
8599 8600 var dot = emailString.lastIndexOf("."); 8601 if (dot <= atSymbol + 2) return false; 8602 8603 // check that the dot is not at the end 8604 if (dot === emailString.length - 1) return false; 8605 8606 return true; 8607 }, 8608 dateValidation : function (date){ 8609 // if deliveryOption is sendNow then send date should be today 8610 if(gkt.gktGiftCard.state.giftCardDeliveryOption == "sendNow"){ 8611 date = new Date(); 8612 } 8613 // let today = new Date().toISOString().slice(0, 10) 8614 let today = gkt.utility.getLocalDateIn_YYYY_MM_DD(); 8615 // let dateToCompare = new Date(date).toISOString().slice(0, 10) 8616 let dateToCompare = gkt.utility.getLocalDateIn_YYYY_MM_DD(new Date(date)); 8617 if (dateToCompare < today) { 8618 return false 8619 } 8620 // else if (dateToCompare > new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10)) { 8621 else if (dateToCompare > gkt.utility.getLocalDateIn_YYYY_MM_DD(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000))) { 8622 return false 8623 } 8624 else { 8625 return true 8626 } 8627 }, 8628 performFormValidation : function (e){ 8629 8630 // let gkGifttCardEmailValueIsValid = gkt.f.validateEmail(gkGifttCardEmailValue) 8631 let gkGifttCardEmailValue = gkt.$(".gktGiftCardEmailInputField").val() 8632 let gkGifttCardDateValue = gkt.$(".gktGiftCardDatePicker").val() 8633 let emailValid = gkt.gktGiftCard.f.emailValidation(gkGifttCardEmailValue); 8634 let isFormValid = gkt.gktGiftCard.f.validateForm(); 8635 let dateValid = gkt.gktGiftCard.f.dateValidation(gkGifttCardDateValue); 8636 if (isFormValid && emailValid && dateValid) { 8637 gkt.$(".gktGiftCardContentFooterBtn1").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.buyNowButtonTextLoading)); 8638 return true; 8639 } else if (!emailValid) { 8640 //TODO 8641 gkt.$(".gktGiftCardEmailValidation").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.emailValidationError)); 8642 return; 8643 }else if (!dateValid){ 8644 gkt.$(".gktGiftCardDateValidation").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.purchasePageFields.dateValidationError)); 8645 return; 8646 } 8647 else { 8648 return; 8649 } 8650 8651 }, 8652 }, 8653 action: { 8654 giftCardAddToCartButton: async function (e) { 8655 e.preventDefault(); 8656 e.stopPropagation(); 8657 8658 gkt.gktGiftCard.f.openGiftCardModal() 8659 8660 console.log("giftCardAddToCartButton-clicked") 8661 }, 8662 onModalClose: function (e) { 8663 // hide the modal 8664 gkt.$(".gktGiftCardModalWrapper").hide(); 8665 }, 8666 onModalBack:function(e){ 8667 gkt.gktGiftCard.action.showGreetingCardBody() 8668 gkt.gktGiftCard.action.hideGiftCardDetailsBody() 8669 }, 8670 removeCheckmarkDivsFromSiblings: function(element){ 8671 element.siblings().find(".gkt_checkmark").remove() 8672 element.siblings().removeClass("activeGreetingCard") 8673 }, 8674 addCheckMarkDivs: function (element) { 8675 let checkMarkDiv = gkt.$("<span>").addClass("gkt_checkmark") 8676 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_circle")) 8677 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_stem")) 8678 checkMarkDiv.append(gkt.$("<div>").addClass("gkt_checkmark_kick")) 8679 element.append(checkMarkDiv) 8680 }, 8681 onGreetingCardImageClick : function(image){ 8682 // Pass either the image or just trigger this as a callback on Onclick 8683 let imageSrc; 8684 if (false) { 8685 imageSrc = image 8686 8687 } else { 8688 imageSrc = gkt.$(this).find("img").attr("src") 8689 } 8690 console.log("onclick triggered") 8691 // gkt.$('.greetingCardImagePreview').attr("src", imageSrc) 8692 gkt.gktGiftCard.state.greetingCardActiveImageSrc = imageSrc 8693 8694 gkt.$(this).find("input").prop("checked", true) 8695 gkt.$(this).addClass("activeGreetingCard") 8696 // add an icon on top of it 8697 gkt.gktGiftCard.action.addCheckMarkDivs(gkt.$(this)) 8698 gkt.gktGiftCard.action.removeCheckmarkDivsFromSiblings(gkt.$(this)) 8699 8700 }, 8701 onGreetingCardCategoryClick : function(){ 8702 // empty the active state greeting card 8703 console.log("onGreetingCardCategoryClick"); 8704 gkt.$(this).addClass("activeGreetingCardCategory") 8705 // remove activeCategory class from other categories 8706 gkt.$(this).siblings().removeClass("activeGreetingCardCategory") 8707 gkt.gktGiftCard.f.changeGreetingCardImageList(gkt.gktGiftCard.state.greetingCardSelectedCategory); 8708 }, 8709 onSendSelfClick : function(){ 8710 // todo 8711 let isSendToSelfChecked =gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8712 if(!isSendToSelfChecked){ 8713 gkt.$(".gktGiftCardInputSenderName").show(); 8714 gkt.$(".gktGiftCardInputReceiverName").show(); 8715 //find id GIFT_MESSAGE if not found then push
8716 if (gkt.gktGiftCard.state.modalNavList.indexOf("GIFT_MESSAGE") == -1) { 8717 gkt.gktGiftCard.state.modalNavList.push({id:"GIFT_MESSAGE",name:gkt.utility.renderLanguageValue(gkt.settings.languageData.giftcardV2.navigationFields.giftcardMessageNavItem),visited:false,active:false}) 8718 } 8719 } 8720 else{ 8721 gkt.$(".gktGiftCardInputSenderName").hide(); 8722 gkt.$(".gktGiftCardInputReceiverName").hide(); 8723 gkt.gktGiftCard.state.modalNavList.find(function(element){ 8724 if(element.id == "GIFT_MESSAGE"){ 8725 gkt.gktGiftCard.state.modalNavList.splice(gkt.gktGiftCard.state.modalNavList.indexOf(element),1) 8726 } 8727 }) 8728 } 8729 //remove array element assoicated with the id = GIFT_MESSAGE in gkt.gktgiftCard.state.modalNavList 8730 8731 gkt.gktGiftCard.f.renderGiftCardModalNav(); 8732 }, 8733 onMessageSubmit: async function (e) { 8734 e.preventDefault(); 8735 e.stopPropagation(); 8736 let greetingCardSelected = undefined; 8737 let categorySelected = ""; 8738 if (gkt.settings.greetingCards.isGreetingCardEnabled) { 8739 greetingCardSelected = gkt.gktGiftCard.state.greetingCardActiveImageSrc; 8740 categorySelected = gkt.gktGiftCard.state.greetingCardSelectedCategory; 8741 } 8742 8743 let selectedVariantId = gkt.f.getSelectedVariant(); 8744 let quantity = gkt.f.getProductQuantity(); 8745 let gkGifttCardFromValue = gkt.$(".gktGiftCardFromInputField").val(); 8746 let gkGifttCardToValue = gkt.$(".gktGiftCardToInputField").val(); 8747 let gkGifttCardMessageValue = gkt.$(".gktGiftCardMessageInputField").val(); 8748 let gkGifttCardEmailValue = gkt.$(".gktGiftCardEmailInputField").val(); 8749 let gkGifttCardDateValue = gkt.$(".gktGiftCardDatePicker").val(); 8750 if (gkt.gktGiftCard.state.giftCardDeliveryOption == "sendNow") { 8751 gkGifttCardDateValue = new Date().toISOString().slice(0, 10); 8752 } 8753 8754 const isSendToSelfChecked = gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8755 8756 if (isSendToSelfChecked) { 8757 gkGifttCardFromValue = null; 8758 gkGifttCardToValue = null; 8759 } 8760 if (gkt.$(".gktVideoMsgCheckboxField").is(":checked") != true && gkt.$(".gktVideoMsgCheckboxField_Mobile").is(":checked") != true) { 8761 gkt.gktVideoMsg.state.uploadedVideoId = null; 8762 } 8763 if (gkt.settings.app.redirectUrlForSendGiftcardBtn.includes("checkout")) { 8764 await gkt.utility.clearCart(); 8765 } 8766 8767 let resAddToCart = await gkt.utility.addToCartV2({ 8768 items: [ 8769 { 8770 id: selectedVariantId, 8771 quantity: quantity ? quantity : 1, 8772 properties: { 8773 To: gkGifttCardToValue, 8774 From: gkGifttCardFromValue, 8775 Note: gkGifttCardMessageValue, 8776 "Recipient Email": gkGifttCardEmailValue, 8777 "Delivery Date": gkGifttCardDateValue, 8778 "_Greeting Card Image": greetingCardSelected, 8779 "Greeting Card Selected": greetingCardSelected ? "yes" : null, 8780 "Video Recorded": gkt.gktVideoMsg.state.uploadedVideoId ? "yes" : null, 8781 "_Video Id": gkt.gktVideoMsg.state.uploadedVideoId, 8782 "_Send To Myself": isSendToSelfChecked, 8783 }, 8784 }, 8785 ], 8786 }); 8787 8788 document.dispatchEvent(new CustomEvent("cart:add")); 8789 8790 window.location.href = gkt.settings.app.redirectUrlForSendGiftcardBtn; 8791 }, 8792 8793 onGreetingCardSubmit: async function (e){ 8794 e.preventDefault(); 8795 e.stopPropagation(); 8796 let greetingCardSelected = gkt.gktGiftCard.state.greetingCardActiveImageSrc; 8797 let categorySelected = gkt.gktGiftCard.state.greetingCardSelectedCategory; 8798
8799 gkt.gktGiftCard.f.displayGiftCardDetailsForm(); 8800 }, 8801 onDetailsSubmit: async function (e){ 8802 e.preventDefault(); 8803 console.log("onDetailsSubmit-clicked") 8804 let formValid = gkt.gktGiftCard.f.performFormValidation(); 8805 let isSendToSelfChecked = gkt.$(".gktGiftCardModalCheckbox").find("input").is(":checked"); 8806 8807 if(formValid){ 8808 if(isSendToSelfChecked){ 8809 gkt.gktGiftCard.action.onMessageSubmit(e); 8810 return; 8811 } 8812 gkt.gktGiftCard.f.displayMessageForm(); 8813 } 8814 else return; 8815 }, 8816 hideGreetingCardBody: function () { 8817 gkt.$(".gktGiftCardGreetingCardContent").hide(); 8818 8819 }, 8820 showGreetingCardBody: function () { 8821 gkt.$(".gktGiftCardGreetingCardContent").show(); 8822 }, 8823 showGiftCardDetailsBody: function () { 8824 gkt.$(".gktGiftCardDetailsContent").show(); 8825 }, 8826 hideGiftCardDetailsBody: function () { 8827 gkt.$(".gktGiftCardDetailsContent").hide(); 8828 }, 8829 hideGiftCardMessageBody: function () { 8830 gkt.$(".gktGiftCardMessageContent").hide(); 8831 }, 8832 showGiftCardMessageBody: function () { 8833 gkt.$(".gktGiftCardMessageContent").show(); 8834 }, 8835 }, 8836 }, 8837 gktAccountWidget: { 8838 state: { 8839 isLoading: null, 8840 }, 8841 init: function (settings, parent) { 8842 if(shopifyLiquidValues && shopifyLiquidValues.customer && shopifyLiquidValues.customer.id){ 8843 gkt.gktAccountWidget.initialize(settings, parent) 8844 } 8845 }, 8846 initialize: function (settings, parent) { 8847 let {isEnabledOnCartPage} = gkt.gktAccountWidget.f.checkifAccountWidgetEnabled() 8848 if (parent == "CART_PAGE" && isEnabledOnCartPage){ 8849 let accountWidgetCartPageHTML = gkt.gktAccountWidget.f.prepareUI() 8850 gkt.gktAccountWidget.f.insertIntoCartPageWrapper(settings, accountWidgetCartPageHTML) 8851 } 8852 gkt.utility.dynamicStylesForBranding(); 8853 }, 8854 f: { 8855 checkifAccountWidgetEnabled: function () { 8856 8857 let isEnabledOnCartPage = false; 8858 //isEnabledOnCartPage is the only one that matters 8859 if (gkt.settings.accountWidget.isEnabled){ 8860 isEnabledOnCartPage = true 8861 } 8862 return {isEnabledOnCartPage} 8863 8864 }, 8865 prepareWidgetModal: function () { 8866 8867 let modalWrapper; 8868 if(gkt.$(".gktAccountWidgetModal").length == 0){ 8869 modalWrapper = gkt.$("<div>").addClass("gktAccountWidgetModal") 8870 } else{ 8871 modalWrapper = gkt.$(".gktAccountWidgetModal") 8872 modalWrapper.html(" "); 8873 } 8874 8875 let modalContent = gkt.$("<div>").addClass("gktAccountWidgetModalContent") 8876 8877 let closeButtonSvg = '<svg width="16px" height="16px" enable-background="new 0 0 587.91 587.91" version="1.1" viewBox="0 0 587.91 587.91" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m86.451 501.46c26.937 26.936 58.315 48.088 93.265 62.871 36.207 15.314 74.642 23.078 114.24 23.078 39.596 0 78.032-7.764 114.24-23.078 34.949-14.783 66.328-35.936 93.266-62.871 26.936-26.938 48.09-58.316 62.871-93.266 15.314-36.207 23.08-74.643 23.08-114.24 0-39.598-7.766-78.033-23.08-114.24-14.781-34.95-35.936-66.328-62.871-93.265-26.938-26.937-58.316-48.09-93.266-62.872-36.208-15.315-74.643-23.079-114.24-23.079-39.597 0-78.032 7.765-114.24 23.079-34.95 14.782-66.328 35.936-93.265 62.872s-48.09 58.315-62.873 93.264c-15.313 36.207-23.078 74.642-23.078
8877114.24 0 39.596 7.765 78.031 23.079 114.24 14.782 34.95 35.936 66.328 62.872 93.266zm207.5-458.12c138.41 0 250.61 112.2 250.61 250.62 0 138.41-112.2 250.61-250.61 250.61s-250.62-112.2-250.62-250.61c0-138.41 112.2-250.62 250.62-250.62z"/><path d="m293.96 587.91c-39.667 0-78.167-7.778-114.43-23.117-35.01-14.809-66.442-35.998-93.423-62.979-26.983-26.984-48.172-58.417-62.979-93.425-15.341-36.269-23.119-74.77-23.119-114.43 0-39.663 7.778-78.165 23.118-114.44 14.807-35.008 35.997-66.44 62.979-93.423s58.415-48.172 93.423-62.979c36.27-15.34 74.771-23.118 114.43-23.118 39.666 0 78.167 7.778 114.43 23.119 35.009 14.807 66.441 35.997 93.425 62.979 26.984 26.985 48.173 58.417 62.979 93.423 15.341 36.27 23.119 74.771 23.119 114.43 0 39.662-7.778 78.163-23.119 114.43-14.806 35.007-35.994 66.439-62.979 93.425-26.982 26.98-58.415 48.169-93.425 62.979-36.266 15.338-74.767 23.116-114.43 23.116zm0-586.91c-39.529 0-77.898 7.751-114.04 23.039-34.889 14.757-66.215 35.874-93.106 62.765-26.892 26.892-48.009 58.217-62.766 93.105-15.288 36.147-23.039 74.517-23.039 114.05 0 39.527 7.751 77.898 23.039 114.04 14.757 34.889 35.874 66.214 62.766 93.106 26.89 26.889 58.215 48.006 93.106 62.765 36.142 15.287 74.512 23.038 114.04 23.038s77.901-7.751 114.04-23.039c34.89-14.758 66.216-35.875 93.106-62.764 26.893-26.895 48.009-58.22 62.764-93.106 15.289-36.146 23.041-74.516 23.041-114.04 0-39.529-7.752-77.899-23.041-114.04-14.754-34.887-35.871-66.212-62.764-93.106-26.892-26.891-58.218-48.008-93.106-62.765-36.144-15.289-74.514-23.04-114.04-23.04zm0 544.07c-67.075 0-130.14-26.12-177.56-73.549-47.429-47.43-73.55-110.49-73.55-177.56s26.12-130.14 73.55-177.56c47.429-47.429 110.49-73.55 177.56-73.55s130.14 26.121 177.56 73.55c47.43 47.43 73.55 110.49 73.55 177.56s-26.12 130.14-73.55 177.56c-47.429 47.429-110.49 73.549-177.56 73.549zm0-501.23c-66.808 0-129.62 26.017-176.86 73.257-47.24 47.241-73.257 110.05-73.257 176.86s26.017 129.62 73.257 176.86c47.24 47.24 110.05 73.257 176.86 73.257s129.62-26.017 176.86-73.257c47.24-47.239 73.257-110.05 73.257-176.86 0-66.808-26.017-129.62-73.257-176.86-47.241-47.241-110.05-73.257-176.86-73.257z"/><path d="m184.92 402.99c4.183 4.184 9.664 6.275 15.146 6.275s10.964-2.092 15.146-6.275l78.742-78.742 78.743 78.742c4.182 4.184 9.664 6.275 15.146 6.275s10.963-2.092 15.146-6.275c8.365-8.363 8.365-21.926 0-30.291l-78.744-78.742 78.742-78.743c8.365-8.365 8.365-21.928 0-30.292-8.363-8.365-21.926-8.365-30.291 0l-78.743 78.743-78.742-78.743c-8.365-8.365-21.928-8.365-30.292 0-8.365 8.365-8.365 21.927 0 30.292l78.743 78.743-78.743 78.742c-8.364 8.365-8.364 21.928 1e-3 30.291z"/><path d="m387.84 409.76c-5.856 0-11.36-2.28-15.5-6.422l-78.389-78.389-78.388 78.389c-4.14 4.142-9.645 6.422-15.5 6.422s-11.36-2.28-15.5-6.422c-4.14-4.14-6.42-9.644-6.42-15.498 0-5.855 2.28-11.359 6.42-15.5l78.389-78.389-78.389-78.389c-8.546-8.547-8.546-22.453 0-31 4.14-4.14 9.644-6.42 15.5-6.42 5.855 0 11.36 2.28 15.5 6.42l78.389 78.389 78.389-78.389c4.141-4.14 9.645-6.42 15.5-6.42 5.854 0 11.358 2.28 15.498 6.42 4.141 4.14 6.42 9.645 6.42 15.5s-2.279 11.36-6.42 15.5l-78.389 78.389 78.391 78.389c4.141 4.141 6.421 9.645 6.421 15.5 0 5.854-2.28 11.358-6.421 15.498-4.143 4.141-9.647 6.422-15.501 6.422zm-93.889-86.225 79.096 79.096c3.95 3.952 9.204 6.129 14.793 6.129 5.587 0 10.841-2.177 14.793-6.129 3.951-3.95 6.128-9.203 6.128-14.791s-2.177-10.842-6.128-14.793l-79.098-79.096 79.096-79.096c3.951-3.951 6.127-9.205 6.127-14.793s-2.176-10.841-6.127-14.792c-3.95-3.951-9.203-6.127-14.791-6.127s-10.842 2.176-14.793 6.127l-79.096 79.096-79.096-79.096c-3.951-3.951-9.205-6.127-14.793-6.127s-10.841 2.176-14.792 6.127c-8.156 8.157-8.156 21.428 0 29.585l79.096 79.096-79.096 79.096c-3.951 3.951-6.127 9.205-6.127 14.793s2.176 10.841 6.127 14.791c3.952 3.952 9.205 6.129 14.793 6.129s10.841-2.177 14.793-6.129l79.095-79.096z"/></svg>' 8878 let modalCloseBtn = gkt.$("<div>").addClass("gktAccountWidgetModalClose").append(closeButtonSvg) 8879 8880 8881 modalCloseBtn.on("click", gkt.gktAccountWidget.action.closeAccountWidgetModal) 8882 8883
8884 let gktAccountWidgetRewardDetailsHTML = gkt.gktAccountWidget.f.prepareRewardGiftCardDetails() 8885 8886 let gktAccountWidgetBuyWithRewardsButton = gkt.gktAccountWidget.f.prepareBuyWithRewardsButton() 8887 8888 let gktAccountWidgetBody = gkt.$("<div>").addClass("gktAccountWidgetBody") 8889 8890 // let gktAccountWidgetTabs = two tabs - rewards and gift cards 8891 8892 let gktAccountWidgetBodyTabs = gkt.$("<div>").addClass("gktAccountWidgetBodyTabs") 8893 8894 let gktAccountWidgetBodyTabRewards = gkt.$("<div>").addClass("gktAccountWidgetBodyTabRewards").text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.rewardSection.rewardsTabText)) 8895 8896 let gktAccountWidgetBodyTabGiftCards = gkt.$("<div>").addClass("gktAccountWidgetBodyTabGiftCards").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.giftCardsTabText)) 8897 8898 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetBodyTabs); 8899 8900 8901 gktAccountWidgetBodyTabs.append(gktAccountWidgetBodyTabRewards) 8902 gktAccountWidgetBodyTabs.append(gktAccountWidgetBodyTabGiftCards) 8903 8904 //gktAccountWidgetBodyTabs write css, add event listeners 8905 8906 gktAccountWidgetBodyTabRewards.on("click", gkt.gktAccountWidget.action.showRewardSection); 8907 gktAccountWidgetBodyTabGiftCards.on("click", gkt.gktAccountWidget.action.showGiftCardSection); 8908 8909 8910 gktAccountWidgetBody.append(gktAccountWidgetBodyTabs) 8911 8912 let gktAccountWidgetRewardSection = gkt.gktAccountWidget.f.prepareRewardSection() 8913 let gktAccountWidgetGiftCardSection = gkt.gktAccountWidget.f.prepareGiftCardSection() 8914 8915 gktAccountWidgetBody.append(gktAccountWidgetRewardSection) 8916 gktAccountWidgetBody.append(gktAccountWidgetGiftCardSection) 8917 8918 // gktAccountWidgetBody.append(gktAccountWidgetGiftCardSection) 8919 // gktAccountWidgetRewardDetails.append(gktAccountWidgetBuyWithRewardsButton) 8920 modalContent.append(gktAccountWidgetRewardDetailsHTML) 8921 modalContent.append(gktAccountWidgetBuyWithRewardsButton) 8922 modalContent.append(gktAccountWidgetBody) 8923 modalWrapper.append(modalCloseBtn) 8924 modalWrapper.append(modalContent) 8925 modalWrapper.append(gkt.f.preparePoweredByBannerUI()) 8926 8927 return modalWrapper; 8928 }, 8929 fetchLoggedInUserAndUpdateUI: async function () { 8930 gkt.gktAccountWidget.state.isLoading = true; 8931 8932 //this is to show loading spinner 8933 gkt.gktAccountWidget.f.reRenderModalUI(); 8934 8935 await gkt.f.getLoggedInCustomer(); 8936 gkt.gktAccountWidget.state.isLoading = false; 8937 gkt.gktAccountWidget.f.reRenderModalUI(); 8938 }, 8939 prepareUI: function () { 8940 //a div which is has properties of a button and on click, it opens a modal 8941 let accountWidgetHTML = gkt.$("<div>"); 8942 let widgetActivator = gkt.$("<div>").addClass("gktAccountWidgetActivator"); 8943 gkt.gktAccountWidget.f.applyButtonCSS(widgetActivator); 8944 widgetActivator.text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.accountWidgetDisplayText) || "Account Widget") 8945 //css -> cursor: pointer 8946 widgetActivator.css("cursor", "pointer"); 8947 widgetActivator.on("click", gkt.gktAccountWidget.action.openAccountWidgetModal) 8948 8949 let widgetModalWrapper = gkt.$("<div>").addClass("gktAccountWidgetModalWrapper") 8950 widgetModalWrapper.append(gkt.gktAccountWidget.f.prepareWidgetModal()) 8951 8952 8953 accountWidgetHTML.append(widgetActivator) 8954 console.log("prepare ui called") 8955 gkt.$("body").append(widgetModalWrapper) 8956 8957 8958 return accountWidgetHTML; 8959 },
8960 prepareRewardGiftCardDetails: function () { 8961 let gktAccountWidgetRewardDetails; 8962 if(gkt.$(".gktAccountWidgetRewardDetails").length > 0) { 8963 gkt.$(".gktAccountWidgetRewardDetails").html(" ") 8964 gktAccountWidgetRewardDetails = gkt.$(".gktAccountWidgetRewardDetails") 8965 } else { 8966 gktAccountWidgetRewardDetails = gkt.$("<div>").addClass("gktAccountWidgetRewardDetails") 8967 } 8968 let generalSettingsLanguageData = gkt.settings.languageData.accountWidget.generalSettings; 8969 let gktAccountWidgetRewardBalance = gkt.$("<div>").addClass("gktAccountWidgetRewardBalance").html( gkt.utility.renderLanguageValue(generalSettingsLanguageData.rewardBalanceLabel)|| "Reward Balance 1") 8970 8971 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktAccountWidgetRewardBalance) 8972 // now another span with value of the balance 8973 let gktAccountWidgetRewardBalanceValue = gkt.$("<span>").addClass("gktAccountWidgetRewardBalanceValue"); 8974 8975 let rewardBalanceValue = `--`; 8976 if(gkt.gktAccountWidget.state.isLoading == false){ 8977 if (gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.balance) { 8978 rewardBalanceValue = `${gkt.settings.merchantInfo.currencyInfo.code} ${gkt.settings.customer.rewardgiftcard.balance}` 8979 }else { 8980 rewardBalanceValue = `${gkt.settings.merchantInfo.currencyInfo.code} 0` 8981 } 8982 } 8983 8984 8985 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardBalanceValue) 8986 8987 gktAccountWidgetRewardBalanceValue.text(rewardBalanceValue) 8988 8989 gktAccountWidgetRewardBalance.append(gktAccountWidgetRewardBalanceValue) 8990 8991 let gktRewardCode = gkt.$("<div>").addClass("gktRewardCode").text( gkt.utility.renderLanguageValue(generalSettingsLanguageData.rewardCodeLabel) || "Reward Code 1") 8992 8993 let gktAccountWidgetRewardCodeValue = gkt.$("<span>").addClass("gktAccountWidgetRewardCodeValue"); 8994 8995 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardCodeValue) 8996 8997 8998 let rewardCodeValue = "----"; 8999 9000 if(gkt.gktAccountWidget.state.isLoading == false && gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.decryptCode){ 9001 rewardCodeValue = gkt.settings.customer.rewardgiftcard.decryptCode; 9002 } 9003 9004 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktRewardCode) 9005 9006 gktAccountWidgetRewardCodeValue.text(rewardCodeValue) 9007 9008 gktRewardCode.append(gktAccountWidgetRewardCodeValue) 9009 9010 9011 // let gktAccountWidgetRewardCodeCopyBtn = gkt.$("<div>").addClass("gktAccountWidgetRewardCodeCopyBtn").html("Copy") 9012 // gktAccountWidgetRewardCodeCopyBtn.on("click", gkt.gktAccountWidget.action.copyRewardCode) 9013 // gktRewardCode.append(gktAccountWidgetRewardCodeCopyBtn) 9014 9015 9016 gktAccountWidgetRewardDetails.append(gktAccountWidgetRewardBalance) 9017 gktAccountWidgetRewardDetails.append(gktRewardCode) 9018 return gktAccountWidgetRewardDetails; 9019 }, 9020 prepareRewardSection: function () { 9021 9022 let gktAccountWidgetRewardSection; 9023 if(gkt.$(".gktAccountWidgetRewardSection").length > 0){ 9024 gktAccountWidgetRewardSection = gkt.$(".gktAccountWidgetRewardSection"); 9025 gkt.$(".gktAccountWidgetRewardSection").html(" ") 9026 }else{ 9027 gktAccountWidgetRewardSection = gkt.$("<div>").addClass("gktAccountWidgetRewardSection") 9028 } 9029 9030 let gktAccountWidgetRewardSectionBody = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBody") 9031 9032 let rewardSectionLanguageData = gkt.settings.languageData.accountWidget.rewardSection; 9033 9034 let gktAccountWidgetRewardSectionBodyListHTML = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyList") 9035 9036 if(gkt.gktAccountWidget.state.isLoading == false ){ 9037 let rewardTransactions = gkt.settings.customer ? gkt.settings.customer.rewardgiftcardTransaction : []; 9038 9039 let gktAccountWidgetRewardSectionBodyListHeader = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListHeader") 9040 9041 let gktAccountWidgetHeaderForCode = gkt.$("<div>").addClass("gktAccountWidgetHeaderForCode").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.balanceHeaderLabel) || "Balance" ) 9042 let gktAccountWidgetHeaderForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetHeaderForExpirationDate").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.expirationDateLabel)|| "Exp. Date1" ) 9043 let gktAccountWidgetHeaderForRemarks = gkt.$("<div>").addClass("gktAccountWidgetHeaderForRemarks").text(gkt.utility.renderLanguageValue(rewardSectionLanguageData.remarksLabel) || "Remarks 1") 9044 9045 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForCode) 9046 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForExpirationDate) 9047 gktAccountWidgetRewardSectionBodyListHeader.append(gktAccountWidgetHeaderForRemarks) 9048 9049 9050 gktAccountWidgetRewardSectionBodyListHTML.append(gktAccountWidgetRewardSectionBodyListHeader) 9051 9052 9053 9054 if(rewardTransactions.length > 0){ 9055 rewardTransactions.forEach(function (rewardTransaction) { 9056 let expiryDateFormatted = ' - '; 9057 if(rewardTransaction.expiryDate){ 9058 expiryDateFormatted = rewardTransaction.expiryDate && rewardTransaction.expiryDate.length > 10 ? rewardTransaction.expiryDate.substring(0,10) : rewardTransaction.expiryDate; 9059 } 9060 let minusSymbol = rewardTransaction.action == "Remove" ? " -" : " "; 9061 let balanceFormatted = rewardTransaction.currency + minusSymbol + parseFloat(rewardTransaction.amount).toFixed(2); 9062 let gktAccountWidgetRewardSectionBodyListItem = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItem") 9063 let balanceFieldDiv = gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemBalance").html(balanceFormatted) 9064 if(rewardTransaction.action == "Remove"){ 9065 balanceFieldDiv.addClass("gktAccountWidgetRewardSectionBodyListItemBalanceRemove") 9066 expiryDateFormatted = " - " 9067 } 9068 gktAccountWidgetRewardSectionBodyListItem.append(balanceFieldDiv) 9069 gktAccountWidgetRewardSectionBodyListItem.append(gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemExpirationDate").html(expiryDateFormatted || "-")) 9070 gktAccountWidgetRewardSectionBodyListItem.append(gkt.$("<div>").addClass("gktAccountWidgetRewardSectionBodyListItemRemarks").html(rewardTransaction.note).text()) 9071 gktAccountWidgetRewardSectionBodyListHTML.append(gktAccountWidgetRewardSectionBodyListItem)
9072 gkt.gktAccountWidget.f.applyMainTextColorCSS(gktAccountWidgetRewardSectionBodyListItem); 9073 }) 9074 9075 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetRewardSectionBodyListHeader); 9076 }else{ 9077 //handle empty state 9078 let noRewardFound = gkt.gktAccountWidget.f.prepareEmptyStateForRewardSection(); 9079 gktAccountWidgetRewardSectionBodyListHTML.html(noRewardFound) 9080 } 9081 gktAccountWidgetRewardSectionBody.append(gktAccountWidgetRewardSectionBodyListHTML) 9082 }else{ 9083 gktAccountWidgetRewardSectionBody.html(gkt.utility.displayLoadingSpinner()) 9084 } 9085 9086 gktAccountWidgetRewardSection.append(gktAccountWidgetRewardSectionBody) 9087 9088 return gktAccountWidgetRewardSection 9089 9090 }, 9091 prepareGiftCardSection: function () { 9092 let gktAccountWidgetGiftCardSection; 9093 9094 if(gkt.$(".gktAccountWidgetGiftCardSection").length > 0){ 9095 gktAccountWidgetGiftCardSection = gkt.$(".gktAccountWidgetGiftCardSection"); 9096 gkt.$(".gktAccountWidgetGiftCardSection").html(" ") 9097 }else{ 9098 gktAccountWidgetGiftCardSection = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSection") 9099 } 9100 9101 let giftcardSectionLanguageData = gkt.settings.languageData.accountWidget.giftcardSection; 9102 9103 let gktAccountWidgetGiftCardSectionBodyListHTML = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyList") 9104 if(gkt.gktAccountWidget.state.isLoading == false){ 9105 const customerGiftCards = gkt.settings.customer.giftcards; 9106 9107 if(customerGiftCards.length > 0){ 9108 9109 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showGiftCardSection; 9110 let gktAccountWidgetGiftCardSectionListHeader = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeader") 9111 9112 let gktAccountWidgetGiftCardSectionListHeaderForCode = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForCode").html(gkt.utility.renderLanguageValue(giftcardSectionLanguageData.codeHeaderLabel)||"Code1" ) 9113 9114 let gktAccountWidgetGiftCardSectionListHeaderForBalance = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForBalance").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.balanceHeaderLabel) || "Balance1") 9115 9116 let gktAccountWidgetGiftCardSectionListHeaderForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForExpirationDate").html(gkt.utility.renderLanguageValue(giftcardSectionLanguageData.expirationDateLabel)|| "Exp. Date1") 9117 9118 let gktAccountWidgetGiftCardSectionListHeaderForAction = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionListHeaderForAction").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.actionHeaderLabel)|| "Action1") 9119 9120 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForCode) 9121 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForBalance) 9122 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForExpirationDate) 9123 gktAccountWidgetGiftCardSectionListHeader.append(gktAccountWidgetGiftCardSectionListHeaderForAction) 9124 9125 gktAccountWidgetGiftCardSectionBodyListHTML.append(gktAccountWidgetGiftCardSectionListHeader) 9126 9127 customerGiftCards.forEach(function (customerGiftCard) { 9128 let gktAccountWidgetGiftCardSectionBodyListItem = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItem") 9129 let gktAccountWidgetGiftCardSectionBodyListItemForCode = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForCode").html("**" + customerGiftCard.code) 9130 let gktAccountWidgetGiftCardSectionBodyListItemForBalance = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForBalance").html(`${gkt.settings.merchantInfo.currencyInfo.code} ${customerGiftCard.balance}`) 9131 let gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate").html(customerGiftCard.expiresOn || "-" ) 9132 let gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount"); 9133 9134 9135 9136 if(customerGiftCard.gktGiftcardId){ 9137 let addToAccountButton = gkt.$("<div>").addClass("gktAccountWidgetGiftCardSectionBodyListItemForAddToAccountButton").html( gkt.utility.renderLanguageValue(giftcardSectionLanguageData.addToAccountButtonText)|| "Add To Account1"); 9138 //attach data attribute to the button 9139 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.append(addToAccountButton) 9140 gkt.gktAccountWidget.f.applyButtonCSS(addToAccountButton); 9141 9142 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.attr("data-giftcard-id", customerGiftCard.gktGiftcardId); 9143 gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount.on("click", gkt.gktAccountWidget.action.addGiftCardToRewardCode) 9144 } 9145 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForCode) 9146 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForBalance) 9147 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForExpirationDate) 9148 gktAccountWidgetGiftCardSectionBodyListItem.append(gktAccountWidgetGiftCardSectionBodyListItemForAddToAccount) 9149 gktAccountWidgetGiftCardSectionBodyListHTML.append(gktAccountWidgetGiftCardSectionBodyListItem) 9150 }) 9151 9152 gkt.gktAccountWidget.f.applySubTextColorCSS(gktAccountWidgetGiftCardSectionListHeader); 9153 gktAccountWidgetGiftCardSection.append(gktAccountWidgetGiftCardSectionBodyListHTML) 9154 9155 }else{ 9156 //empty state data 9157 let noGiftcardFoundHTML = gkt.gktAccountWidget.f.prepareEmptyStateForGiftCardSection(); 9158 gktAccountWidgetGiftCardSectionBodyListHTML.html(noGiftcardFoundHTML) 9159 } 9160 gktAccountWidgetGiftCardSection.append(gktAccountWidgetGiftCardSectionBodyListHTML) 9161 }else{ 9162 gktAccountWidgetGiftCardSection.html(gkt.utility.displayLoadingSpinner()) 9163 } 9164 9165 return gktAccountWidgetGiftCardSection; 9166 9167 }, 9168 prepareEmptyStateForGiftCardSection: function () { 9169 let giftcardSectionLanguageData = gkt.settings.languageData.accountWidget.giftcardSection; 9170 let noGiftcardFoundHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFound") 9171 let noDataFoundMainText = giftcardSectionLanguageData.noGiftcardFoundMainText.value || "No Gift Cards Found1"; 9172 let noDataFoundSubText = giftcardSectionLanguageData.noGiftcardFoundSubText.value || " "; 9173 9174 let noGiftcardFoundMainTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFoundMainText").html(noDataFoundMainText) 9175 let noGiftcardFoundSubTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoGiftCardDataFoundSubText").html(noDataFoundSubText) 9176
9177 gkt.gktAccountWidget.f.applyMainTextColorCSS(noGiftcardFoundMainTextHTML); 9178 gkt.gktAccountWidget.f.applySubTextColorCSS(noGiftcardFoundSubTextHTML); 9179 noGiftcardFoundHTML.append(noGiftcardFoundMainTextHTML).append("<br/>").append(noGiftcardFoundSubTextHTML); 9180 return noGiftcardFoundHTML; 9181 }, 9182 prepareEmptyStateForRewardSection: function () { 9183 let rewardSectionLanguageData = gkt.settings.languageData.accountWidget.rewardSection; 9184 let noRewardsFound = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFound") 9185 let noDataFoundMainText = rewardSectionLanguageData.noRewardFoundMainText.value || "No Rewards Found1"; 9186 let noDataFoundSubText = rewardSectionLanguageData.noRewardFoundSubText.value || " "; 9187 9188 let noRewardFoundMainTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFoundMainText").html(noDataFoundMainText) 9189 let noRewardFoundSubTextHTML = gkt.$("<div>").addClass("gktAccountWidgetNoRewardDataFoundSubText").html(noDataFoundSubText) 9190 9191 gkt.gktAccountWidget.f.applyMainTextColorCSS(noRewardFoundMainTextHTML); 9192 gkt.gktAccountWidget.f.applySubTextColorCSS(noRewardFoundSubTextHTML); 9193 noRewardsFound.append(noRewardFoundMainTextHTML).append("<br/>").append(noRewardFoundSubTextHTML); 9194 return noRewardsFound; 9195 }, 9196 insertIntoCartPageWrapper: function (settings, accountWidgetCartPageHTML) { 9197 gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetWrapper").html(accountWidgetCartPageHTML) 9198 }, 9199 refreshRewardSection_and_RewardDetails: function () { 9200 gkt.gktAccountWidget.f.prepareRewardSection() 9201 gkt.gktAccountWidget.f.prepareRewardGiftCardDetails(); 9202 gkt.gktAccountWidget.f.prepareBuyWithRewardsButton(); 9203 }, 9204 applyMainTextColorCSS: function (element) { 9205 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.mainTextColor){ 9206 let mainTextColor = gkt.settings.accountWidget.customization.mainTextColor; 9207 element.css("color", mainTextColor) 9208 } 9209 }, 9210 applySubTextColorCSS: function (element) { 9211 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.subTextColor){ 9212 let subTextColor = gkt.settings.accountWidget.customization.subTextColor; 9213 element.css("color", subTextColor) 9214 } 9215 }, 9216 applyButtonCSS: function (element) { 9217 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.buttonColor){ 9218 let buttonColor = gkt.settings.accountWidget.customization.buttonColor; 9219 element.css("background-color", buttonColor) 9220 } 9221 if(gkt.settings.accountWidget && gkt.settings.accountWidget.customization && gkt.settings.accountWidget.customization.buttonTextColor){ 9222 let buttonTextColor = gkt.settings.accountWidget.customization.buttonTextColor; 9223 element.css("color", buttonTextColor) 9224 } 9225 }, 9226 reRenderModalUI: function () { 9227 gkt.gktAccountWidget.f.prepareWidgetModal(); 9228 if(gkt.gktAccountWidget.state.activeTabFn){ 9229 gkt.gktAccountWidget.state.activeTabFn(); 9230 } 9231 }, 9232 prepareBuyWithRewardsButton: function () { 9233 9234 let generalSettingsLanguageData = gkt.settings.languageData.accountWidget.generalSettings; 9235 let gktAccountWidgetBuyWithRewardsButton; 9236 if(gkt.$(".gktAccountWidgetBuyWithRewardsButton").length > 0){ 9237 gktAccountWidgetBuyWithRewardsButton = gkt.$(".gktAccountWidgetBuyWithRewardsButton"); 9238 gktAccountWidgetBuyWithRewardsButton.html(""); 9239 }else{ 9240 gktAccountWidgetBuyWithRewardsButton = gkt.$("<div>").addClass("gktAccountWidgetBuyWithRewardsButton") 9241 } 9242 9243 gktAccountWidgetBuyWithRewardsButton.text(gkt.utility.renderLanguageValue(generalSettingsLanguageData.buyWithRewardsButtonText || "Buy with Rewards")) 9244 9245 if(gkt.settings.customer && gkt.settings.customer.rewardgiftcard && gkt.settings.customer.rewardgiftcard.balance > 0 && gkt.settings.customer.rewardgiftcard.decryptCode) { 9246 gktAccountWidgetBuyWithRewardsButton.on("click", gkt.gktAccountWidget.action.buyWithRewardsClicked); 9247 gktAccountWidgetBuyWithRewardsButton.removeClass("gktDisabled"); 9248 }else{ 9249 gktAccountWidgetBuyWithRewardsButton.addClass("gktDisabled"); 9250 } 9251 9252 gkt.gktAccountWidget.f.applyButtonCSS(gktAccountWidgetBuyWithRewardsButton); 9253 return gktAccountWidgetBuyWithRewardsButton; 9254 }, 9255 9256 }, 9257 action: { 9258 openAccountWidgetModal: function () { 9259 gkt.gktAccountWidget.state.isLoading = true; 9260 gkt.gktAccountWidget.f.fetchLoggedInUserAndUpdateUI(); 9261 // gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetModalWrapper").css("display", "grid"); 9262 gkt.$(".gktAccountWidgetModalWrapper").css("display", "grid"); 9263 gkt.gktAccountWidget.action.showRewardSection(); 9264 }, 9265 closeAccountWidgetModal: function () { 9266 // gkt.elements.cartPageWrapperV2.find(".gktAccountWidgetModalWrapper").css("display", "none") 9267 gkt.$(".gktAccountWidgetModalWrapper").css("display", "none") 9268 }, 9269 copyRewardCode: function () { 9270 let rewardCode = gkt.$(this).parent().find(".gktRewardCode").html() 9271 //use native javascript to copy to clipboard 9272 let rewardCodeInput = gkt.$("<input>").val(rewardCode) 9273 gkt.$("body").append(rewardCodeInput) 9274 rewardCodeInput.select() 9275 document.execCommand("copy") 9276 rewardCodeInput.remove() 9277 gkt.$(this).html("Copied") 9278 }, 9279 showRewardSection: function () { 9280 console.log("showRewardsTab"); 9281 gkt.$(".gktAccountWidgetRewardSection").css("display", "grid") 9282 //hide other sections 9283 gkt.$(".gktAccountWidgetGiftCardSection").css("display", "none") 9284 gkt.$(".gktAccountWidgetBodyTabRewards").siblings().removeClass("gktAccountWidgetBodyTabActive") 9285 gkt.$(".gktAccountWidgetBodyTabRewards").addClass("gktAccountWidgetBodyTabActive") 9286 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showRewardSection; 9287 }, 9288 showGiftCardSection: function () { 9289 console.log("showGiftCardsTab") 9290 gkt.$(".gktAccountWidgetGiftCardSection").css("display", "grid"); 9291 //hide other sections 9292 gkt.$(".gktAccountWidgetRewardSection").css("display", "none") 9293 // remove gktAccountWidgetBodyTabActive from other siblings 9294 gkt.$(".gktAccountWidgetBodyTabGiftCards").siblings().removeClass("gktAccountWidgetBodyTabActive") 9295 gkt.$(".gktAccountWidgetBodyTabGiftCards").addClass("gktAccountWidgetBodyTabActive") 9296 gkt.gktAccountWidget.state.activeTabFn = gkt.gktAccountWidget.action.showGiftCardSection; 9297 9298 }, 9299 addGiftCardToRewardCode: async function () { 9300 //read the giftcardID from the button data attribute 9301 //read the attribute data-giftcard-id from the button or its parent 9302 let giftCardId = gkt.$(this).attr("data-giftcard-id") || gkt.$(this).parent().attr("data-giftcard-id"); 9303 //get the reward code 9304 console.log("giftCardId", giftCardId); 9305 9306 //when this button is clicked, we need to change this buttons text to loading... using renderLanguageValue 9307 // and also disable this button for clicks 9308 // by attaching gktDisabled class 9309 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addingCodeToRewardsText) || "adding...1") 9310 gkt.$(this).addClass("gktDisabled") 9311 9312 //attachh the class to all other buttons in the list 9313 gkt.$(this).parent().siblings().addClass("gktDisabled") 9314 9315 const addToReward = await gkt.f.addGiftCardToRewardCodeAPI(giftCardId) 9316 9317 9318 if(addToReward){ 9319 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addedCodeToRewardText) || "Added1"); 9320 gkt.$(this).off("click") 9321 //add opacity to the button of 0.6 9322 gkt.$(this).css("opacity", "0.5") 9323 gkt.$(this).children().css("border-radius", "2px") 9324 gkt.gktAccountWidget.f.refreshRewardSection_and_RewardDetail
9324s() 9325 }else{ 9326 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.errorMessage) || "Error occured! Try again"); 9327 await new Promise(resolve => setTimeout(resolve, 1500)); 9328 9329 gkt.$(this).on("click", gkt.gktAccountWidget.action.addGiftCardToRewardCode) 9330 // setTimeout(function(){ 9331 gkt.$(this).children().text(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.giftcardSection.addToAccountButtonText) || "Add To Account1"); 9332 // }, 100) 9333 } 9334 9335 gkt.$(this).removeClass("gktDisabled") 9336 gkt.$(this).parent().siblings().removeClass("gktDisabled") 9337 9338 9339 9340 }, 9341 buyWithRewardsClicked: async function () { 9342 try{ 9343 gkt.$(this).addClass("gktDisabled") 9344 gkt.$(this).html(gkt.utility.renderLanguageValue(gkt.settings.languageData.accountWidget.generalSettings.buyWithRewardsButtonLoadingText) || "Loading Checkout...1") 9345 window.location.href = window.location.origin + "/cart/checkout?discount=" + gkt.settings.customer.rewardgiftcard.decryptCode 9346 }catch(e){ 9347 console.log("error", e) 9348 gkt.$(this).removeClass("gktDisabled") 9349 } 9350 }, 9351 9352 }, 9353 }, 9354 gktMessage:{ 9355 init: function (settings, parent) { 9356 gkt.gktMessage.initialize(settings, parent) 9357 }, 9358 initialize: function (settings, parent) { 9359 let productHandle = gkt.f.getProductPageHandle(settings) 9360 let {isEnabledOnProductPage, isEnabledOnCartPage} = gkt.gktMessage.f.checkifGiftMessageEnabled(settings.giftMessage, productHandle, parent) 9361 9362 if (parent == "PRODUCT_PAGE" && isEnabledOnProductPage){ 9363 // let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 9364 let giftMessageProductPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9365 gkt.gktMessage.f.insertIntoProductPageWrapper(settings, giftMessageProductPageHTML) 9366 gkt.utility.overWriteBuyNowBtn() 9367 gkt.state.isOverWriteBuyNowBtnTriggered = true 9368 } 9369 9370 if (parent == "CART_PAGE" && isEnabledOnCartPage && productHandle == "undefined"){ 9371 let giftMessageCartPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9372 gkt.gktMessage.f.insertIntoCartPageWrapper(settings, giftMessageCartPageHTML) 9373 } 9374 9375 9376 }, 9377 f: { 9378 checkifGiftMessageEnabled: function (giftMessage, currProductHandle, parent) { 9379 let isEnabledOnProductPage = false 9380 let isEnabledOnCartPage = false 9381 9382 if(!giftMessage.isGiftMessageEnabled){ 9383 return {isEnabledOnProductPage, isEnabledOnCartPage} 9384 } 9385 9386 if (giftMessage.isVisibleOnCart) { 9387 isEnabledOnCartPage = true 9388 } 9389 9390 if (giftMessage.isVisibleOnAllProductPages) { 9391 isEnabledOnProductPage = true 9392 } else if (giftMessage.isVisibleOnSpecificProductPages && 9393 giftMessage.visibleOnSpecificProductPages && 9394 giftMessage.visibleOnSpecificProductPages.find(x => x.handle === currProductHandle)) { 9395 9396 isEnabledOnProductPage = true 9397 } 9398 9399 return {isEnabledOnProductPage, isEnabledOnCartPage} 9400 }, 9401 prepareUI: function(settings, currProductHandle, parent){ 9402 let gktGiftMessageContainer = gkt.$("<div>").addClass('gktGiftMessageContainer') 9403 9404 let gktGiftMessageItemContainer = gkt.$("<div>").addClass('gktGiftMessageItemContainer') 9405 let gktGiftMessageTextArea = gkt.$("<textarea>").addClass('gktGiftMessageTextArea') 9406 .attr("placeholder", settings.languageData.giftMessage.giftMessagePlaceholderText) 9407 9408 9409 let gktGiftMessageItemContainerCheckboxLable = gkt.$("<label>").addClass('gktCustomCheckboxMsgContainer') 9410 let inputCheckboxEle = gkt.$("<input>").addClass('gktGiftMessageInputCheckboxEle') 9411 .attr("type", "checkbox") 9412 9413 if (gkt.utility.getNoteFromCart()) { 9414 inputCheckboxEle.attr("checked", true) 9415 let noteVal = gkt.utility.getNoteFromCart() 9416 gktGiftMessageTextArea.val(noteVal) 9417 // gktGiftMessageTextArea.css("display", "block") 9418 } 9419 9420 9421 gktGiftMessageItemContainerCheckboxLable.append(inputCheckboxEle) 9422 gktGiftMessageItemContainerCheckboxLable.append(gkt.$("<span>").addClass("gktCustomMsgCheckboxCheckmark")) 9423 9424 9425 //create a div with appendString 9426 let gktGiftMessageItemContainerLableText = gkt.$("<div>").addClass('gktGiftMessageItemContainerLabelText') 9427 .html(sett
9427ings.languageData.giftMessage.giftMessageHeadingLabel) 9428 gktGiftMessageItemContainerCheckboxLable.append(gktGiftMessageItemContainerLableText) 9429 gktGiftMessageItemContainer.append(gktGiftMessageItemContainerCheckboxLable) 9430 gktGiftMessageContainer.append(gktGiftMessageItemContainer) 9431 9432 9433 gktGiftMessageContainer.append(gktGiftMessageTextArea) 9434 9435 gkt.$(document).on("click", ".gktGiftMessageInputCheckboxEle",async (e)=>{ 9436 // window.eventCick = e 9437 // let isChecked = gkt.$(e.currentTarget).find(".gktGiftMessageInputCheckboxEle").is(":checked") 9438 // if(gkt.$(this).prop('checked') == true){ 9439 // console.log("gktCustomCheckboxMsgContainer") 9440 // } 9441 if(!e.currentTarget.checked){ 9442 let updateCartData = { } 9443 updateCartData.note = null 9444 updateCartData.attributes = {"gktGiftMessage": ""} 9445 await gkt.utility.updateCart(updateCartData) 9446 // if(gkt.$(".gktGiftMessageTextArea")){ 9447 // gkt.$(".gktGiftMessageTextArea").val("") 9448 // } 9449 9450 }else{ 9451 // if(gkt.$(".gktGiftMessageTextArea")){ 9452 // let updateCartData = { } 9453 // updateCartData.note = gkt.$(".gktGiftMessageTextArea").val() 9454 // await gkt.utility.updateCart(updateCartData) 9455 // } 9456 } 9457 gkt.$(document).find('.gktGiftMessageTextArea').css("display", "block") 9458 }) 9459 9460 gkt.$(document).on("keyup ", ".gktGiftMessageTextArea", ((event)=>{gkt.gktMessage.action.onGiftMessageTextAreakeyup(event,settings, parent)})) 9461 9462 return gktGiftMessageContainer 9463 }, 9464 insertIntoProductPageWrapper: function (settings, giftMessageHTML) { 9465 9466 gkt.elements.productPageWrapperV2.find(".gktGiftMessageWrapper").css("display", "block") 9467 9468 9469 gkt.elements.productPageWrapperV2.find(".gktGiftMessageWrapper").append(giftMessageHTML); 9470 9471 }, 9472 insertIntoCartPageWrapper: function (settings, giftMessageHTML) { 9473 9474 gkt.elements.cartPageWrapperV2.find(".gktCartGiftMessageWrapper").css("display", "block") 9475 9476 gkt.elements.cartPageWrapperV2.find(".gktCartGiftMessageWrapper").append(giftMessageHTML); 9477 9478 }, 9479 }, 9480 action: { 9481 onGiftMessageTextAreakeyup: function (event,settings, parent){ 9482 let giftMessageValue = event.target.value 9483 let updateCartData = { } 9484 updateCartData.note = giftMessageValue 9485 updateCartData.attributes = {"gktGiftMessage": giftMessageValue} 9486 if(gkt.state.timer){ 9487 clearTimeout(gkt.state.timer); 9488 gkt.state.timer = undefined 9489 } 9490 9491 gkt.state.timer = setTimeout(()=>{ 9492 gkt.utility.updateCart(updateCartData).then((data) => { 9493 console.log("gift message updated") 9494 }) 9495 },1000) 9496 9497 // gkt.utility.updateCart(updateCartData).then((data) => { 9498 // // console.log("gift message updated") 9499 // }) 9500 } 9501 } 9502 9503 }, 9504 gktVideoMsg: { 9505 init: function (settings, parent) { 9506 gkt.gktVideoMsg.initialize(settings, parent) 9507 9508 }, 9509 state: { 9510 elements: {}, 9511 uploadedVideoId: null, 9512 recordingTimeMS: 60000, 9513 recordingTime: "1:00", 9514 recordedBlob: "", 9515 mediaRecorder: null, 9516 interval: undefined 9517 }, 9518 initialize: function (settings, parent) { 9519 let productHandle = gkt.f.getProductPageHandle(settings) 9520 console.log("videoMesageInitialize"); 9521 if(gkt.settings.videoMessage.isVideoMessagingEnabled){ 9522 gkt.gktVideoMsg.f.registerEvents() 9523 gkt.gktVideoMsg.f.prepareVideoMsgPlayer() 9524 // // let oneClickUpsellProductPageHTML = gkt.gktOneClickUpsell.f.prepareUI(settings, variantListToBeShownOnProductPage, parent) 9525 // let giftMessageProductPageHTML = gkt.gktMessage.f.prepareUI(settings, productHandle, parent) 9526 // gkt.gktMessage.f.insertIntoProductPageWrapper(settings, giftMessageProductPageHTML) 9527 // gkt.utility.overWriteBuyNowBtn() 9528 // gkt.state.isOverWriteBuyNowBtnTriggered = true 9529 } 9530 9531 }, 9532 f:{ 9533 registerEvents: function () { 9534 gkt.$(document).on("click", ".gktVideoMsgButton", gkt.gktVideoMsg.actions.gktVideoMsgButton) 9535 }, 9536 prepareVideoMsgPlayer: function () { 9537 9538 let gktVideoMsgPlayerWrapper = gkt.$("<div>").addClass("gktVideoMsgPlayerWrapper"); 9539 9540 let gktRecorder = gkt.$("<div>").addClass("gktRecorder") 9541 console.log("prepareVideoMsgPlayer"); 9542 let gktRecorderCloseBtn = gkt.$("<button>").addClass("gktRecorderCloseBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickClose(e) }) 9543 let gktRecorderCloseBtnImg = gkt.$("<img>").attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/close-video.svg") 9544 gktRecorderCloseBtn.append(gktRecorderCloseBtnImg) 9545 9546 9547 let gktRecord = gkt.$("<div>").addClass("gktRecord") 9548 let gktVideoPlayer = gkt.$("<video>").addClass("gktVideoPlayer") 9549 .attr("autoplay", true) 9550 .prop("muted", true) 9551 .attr("poster", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/free-video.jpg") 9552 let gktPermissionDenied = gkt.$("<div>").addClass("gktPermissionDenied gktVideoPlayerHide").text( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.permissionDenied)) 9553 let gktVideoPlayerStatus = gkt.$("<div>").addClass("gktVideoPlayerStatus").html( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.pressToRecord)) 9554 9555 9556
9557 //let gktVideoPlayerEmptyPTag = gkt.$("<p>"); 9558 9559 let gktVideoPlayerStartBtn = gkt.$("<button>").addClass("gktVideoPlayerStartBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickStart(e) }) 9560 let gktVideoPlayerRedDot = gkt.$("<div><p></p></div>").addClass("gktVideoPlayerRedDot") 9561 //gktVideoPlayerRedDot.append(gktVideoPlayerEmptyPTag); 9562 gktVideoPlayerStartBtn.append(gktVideoPlayerRedDot) 9563 9564 let gktVideoPlayerStopBtn = gkt.$("<button>").addClass("gktVideoPlayerStopBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickStop(e) }) 9565 let gktVideoPlayerRedSquare = gkt.$("<div><p></p></div>").addClass("gktVideoPlayerRedSquare") 9566 //gktVideoPlayerRedSquare.append(gktVideoPlayerEmptyPTag); 9567 gktVideoPlayerStopBtn.append(gktVideoPlayerRedSquare) 9568 9569 9570 let gktVideoPlayerTimeLeft = gkt.$("<div>").addClass("gktVideoPlayerTimeLeft gktVideoPlayerHide") 9571 9572 gktRecord.append(gktVideoPlayer) 9573 gktRecord.append(gktPermissionDenied) 9574 gktRecord.append(gktVideoPlayerStatus) 9575 gktRecord.append(gktVideoPlayerStartBtn) 9576 gktRecord.append(gktVideoPlayerStopBtn) 9577 gktRecord.append(gktVideoPlayerTimeLeft) 9578 9579 9580 let gktRecorded = gkt.$("<div>").addClass("gktRecorded") 9581 9582 let gktVideoPlayerRecording = gkt.$("<video>").addClass("gktVideoPlayerRecording") 9583 .attr("preload", "none") 9584 .attr("poster", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/free-video.jpg") 9585 9586 let gktLoadingHeading = gkt.$("<div>").addClass("gktLoadingHeading gktVideoPlayerHide").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.loading)) 9587 let gktUploadingVideoHeading = gkt.$("<div>").addClass("gktUploadingVideoHeading gktVideoPlayerHide").html( gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploading)) 9588 9589 let gktVideoPlayerControls = gkt.$("<div>").addClass("gktVideoPlayerControls") 9590 9591 let gktVideoPlayerControlsAcceptBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsAcceptBtnDiv"); 9592 9593 let gktVideoPlayerControlsAcceptBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.startUploadText)); 9594 9595 gktVideoPlayerControlsAcceptBtnDiv.append(gktVideoPlayerControlsAcceptBtnDivInfo); 9596 9597 let gktVideoPlayerControlsAcceptBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsAcceptBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickAccept(e) }) 9598 let gktVideoPlayerControlsAcceptBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsAcceptBtnImg") 9599 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/confirm-video.png") 9600 gktVideoPlayerControlsAcceptBtn.append(gktVideoPlayerControlsAcceptBtnImg) 9601 gktVideoPlayerControlsAcceptBtnDiv.append(gktVideoPlayerControlsAcceptBtn); 9602 9603 9604 9605 let gktVideoPlayerControlsPlayBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsPlayBtnDiv"); 9606 9607 let gktVideoPlayerControlsPlayBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.playText)); 9608 9609 gktVideoPlayerControlsPlayBtnDiv.append(gktVideoPlayerControlsPlayBtnDivInfo); 9610 9611 let gktVideoPlayerControlsPlayBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsPlayBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickPlay(e) }) 9612 let gktVideoPlayerControlsPlayBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsPlayBtnImg") 9613 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/play-video.png") 9614 gktVideoPlayerControlsPlayBtn.append(gktVideoPlayerControlsPlayBtnImg) 9615 gktVideoPlayerControlsPlayBtnDiv.append(gktVideoPlayerControlsPlayBtn); 9616 9617 9618 let gktVideoPlayerControlsReStartBtnDiv = gkt.$("<div>").addClass("gktVideoPlayerControlsReStartBtnDiv"); 9619 9620 let gktVideoPlayerControlsReStartBtnDivInfo = gkt.$("<p>").addClass("gktVideoPlayerControlsBtnDivInfo").html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.reRecordVideoText)); 9621 9622 gktVideoPlayerControlsReStartBtnDiv.append(gktVideoPlayerControlsReStartBtnDivInfo); 9623 9624 let gktVideoPlayerControlsReStartBtn = gkt.$("<button>").addClass("gktVideoPlayerControlsReStartBtn").on("click", function (e) { gkt.gktVideoMsg.f.clickReStart(e) }) 9625 let gktVideoPlayerControlsReStartBtnImg = gkt.$("<img>").addClass("gktVideoPlayerControlsReStartBtnImg") 9626 .attr("src", "https://db07ji0eqime4.cloudfront.net/public/videoMessage/redo-video.png") 9627 gktVideoPlayerControlsReStartBtn.append(gktVideoPlayerControlsReStartBtnImg) 9628 gktVideoPlayerControlsReStartBtnDiv.append(gktVideoPlayerControlsReStartBtn); 9629 9630 gktVideoPlayerControls.append(gktVideoPlayerControlsReStartBtnDiv) 9631 gktVideoPlayerControls.append(gktVideoPlayerControlsPlayBtnDiv) 9632 gktVideoPlayerControls.append(gktVideoPlayerControlsAcceptBtnDiv) 9633 9634 9635 gktRecorded.append(gktVideoPlayerRecording) 9636 gktRecorded.append(gktLoadingHeading) 9637 gktRecorded.append(gktUploadingVideoHeading) 9638 gktRecorded.append(gktVideoPlayerControls) 9639 9640 9641 gktRecorder.append(gktRecorderCloseBtn) 9642 gktRecorder.append(gktRecord) 9643 gktRecorder.append(gktRecorded) 9644 9645 if(gkt.$(".gktVideoMsgPlayerWrapper").length > 0){ 9646 gkt.$(".gktVideoMsgPlayerWrapper").remove(); 9647 } 9648 if(gkt.$(".gktRecorder").length > 0){ 9649 gkt.$(".gktRecorder").remove(); 9650 } 9651 9652 9653 gkt.$(".gktGiftCardMessageContent").append(gktVideoMsgPlayerWrapper); 9654 gkt.$(".gktVideoMsgPlayerWrapper").append(gktRecorder) 9655 gkt.gktVideoMsg.state.elements.gktRecorder = gktRecorder 9656 gkt.gktVideoMsg.state.elements.gktRecord = gktRecord 9657 gkt.gktVideoMsg.state.elements.gktRecorded = gktRecorded 9658 gkt.gktVideoMsg.state.elements.gktVideoPlayer = gktVideoPlayer 9659 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn = gktVideoPlayerStartBtn 9660 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn = gktVideoPlayerStopBtn 9661 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsReStartBtn = gktVideoPlayerControlsReStartBtn 9662 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsPlayBtn = gktVideoPlayerControlsPlayBtn 9663 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording = gktVideoPlayerRecording 9664 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn = gktRecorderCloseBtn 9665 gkt.gktVideoMsg.state.elements.gktVideoPlayerControlsAcceptBtn = gktVideoPlayerControlsAcceptBtn 9666 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls = gktVideoPlayerControls 9667 gkt.gktVideoMsg.state.elements.gktLoadingHeading = gktLoadingHeading 9668 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft = gktVideoPlayerTimeLeft 9669 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus = gktVideoPlayerStatus 9670 gkt.gktVideoMsg.state.elements.gktPermissionDenied = gktPermissionDenied 9671 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading = gktUploadingVideoHeading 9672 9673 9674 }, 9675 createRecorder: function() { 9676 gkt.gktVideoMsg.state.elements.gktRecorder.removeClass("gktVideoPlayerHide"); 9677 gkt.gktVideoMsg.state.elements.gktRecord.removeClass("gktVideoPlayerHide"); 9678 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.removeClass("gktVideoPlayerHide"); 9679 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.removeClass("gktVideoPlayerHide"); 9680 gkt.gktVideoMsg.state.elements.gktPermissionDenied.addClass("gktVideoPlayerHide"); 9681 gkt.gktVideoMsg.state.elements.gktRecorded.addClass("gktVideoPlayerHide"); 9682 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn.addClass("gktVideoPlayerHide"); 9683 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9684 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.html(gkt.gktVideoMsg.state.recordingTime); 9685 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.pressToRecord)); 9686 gkt.gktVideoMsg.state.recordingTime = "1:00"; 9687 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploading)); 9688 navigator.mediaDevices 9689 .getUserMedia({ 9690 audio: true, 9691 video: true, 9692 })
9693 .then((stream) => { 9694 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject = stream; 9695 }) 9696 .catch((error) => { 9697 console.log("navigator", error) 9698 console.log(error); 9699 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.addClass("gktVideoPlayerHide"); 9700 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.addClass("gktVideoPlayerHide"); 9701 gkt.gktVideoMsg.state.elements.gktPermissionDenied.removeClass("gktVideoPlayerHide"); 9702 }); 9703 }, 9704 clickClose: function(e){ 9705 e.preventDefault(); 9706 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'none') 9707 // gkt.gktVideoMsg.state.elements.gktRecorder.addClass("gktVideoPlayerHide"); 9708 if(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject){ 9709 gkt.gktVideoMsg.f.stopRecording(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9710 } 9711 9712 gkt.gktVideoMsg.f.revokeObjectUrl(); 9713 }, 9714 stopRecording: function (stream) { 9715 if(gkt.gktVideoMsg.state.interval) { 9716 clearInterval(gkt.gktVideoMsg.state.interval); 9717 } 9718 if(gkt.gktVideoMsg.state.mediaRecorder && gkt.gktVideoMsg.state.mediaRecorder.state !== "inactive") { 9719 gkt.gktVideoMsg.state.mediaRecorder.stop(); 9720 } 9721 stream.getTracks().forEach(function (track) { 9722 if (track.readyState == "live") { 9723 console.log("hello - stop"); 9724 track.stop(); 9725 } 9726 }) 9727 }, 9728 clearTracks: function (stream) { 9729 stream.getTracks().forEach(function (track) { 9730 if (track.readyState == "live") { 9731 console.log("hello - stop"); 9732 track.stop(); 9733 } 9734 }) 9735 }, 9736 revokeObjectUrl: function () { 9737 URL.revokeObjectURL(gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.src); 9738 }, 9739 clickStart: function async (e){ 9740 e.preventDefault(); 9741 gkt.gktVideoMsg.state.elements.gktVideoPlayerStartBtn.addClass("gktVideoPlayerHide"); 9742 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn.addClass("gktVideoPlayerHide"); 9743 gkt.gktVideoMsg.state.elements.gktVideoPlayerStopBtn.removeClass("gktVideoPlayerHide"); 9744 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.removeClass("gktVideoPlayerHide"); 9745 // the below field for the text 9746 //hide the toggle 9747 //gktVideoMsgCheckboxWrapper 9748 9749 gkt.gktVideoMsg.f.clearTracks(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9750 9751 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.recording)); 9752 navigator.mediaDevices 9753 .getUserMedia({ 9754 video: true, 9755 audio: true, 9756 }) 9757 .then((stream) => { 9758 console.log("1 - navigator"); 9759 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject = stream; 9760 // gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream = gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream || gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].mozCaptureStream ; 9761 // use HTMLCanvasElement.captureStream() 9762 // gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream = gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].captureStream || gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].mozCaptureStream ; 9763 return new Promise((resolve) => ( 9764 gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].onplaying = resolve 9765 )); 9766 }) 9767 .then(() => { 9768 console.log("2 - onplaying"); 9769 return gkt.gktVideoMsg.f.startRecording(e, gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject) 9770 }) 9771 .then((recordedChunks) => { 9772 console.log("3 - startRecording"); 9773 console.log(recordedChunks); 9774 9775 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.removeClass("gktVideoPlayerHide"); 9776 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.addClass("gktVideoPlayerHide"); 9777 gkt.gktVideoMsg.state.elements.gktLoadingHeading.addClass("gktVideoPlayerHide"); 9778 gkt.gktVideoMsg.state.recordedBlob = new Blob(recordedChunks, { type: "video/mp4" }); 9779 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording.attr("src",URL.createObjectURL(gkt.gktVideoMsg.state.recordedBlob)); 9780 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 9781 }) 9782 .catch( 9783 (error) => 9784 console.log(error) 9785 ); 9786 }, 9787 startRecording: function (e, stream) { 9788 return new Promise ((resolve, reject) => { 9789 9790 let mediaRecorder = new MediaRecorder(stream); 9791 gkt.gktVideoMsg.state.mediaRecorder = mediaRecorder; 9792 let parts = []; 9793 mediaRecorder.ondataavailable = (event) => { 9794 parts.push(event.data); 9795 }; 9796 mediaRecorder.start(1000); 9797 9798 mediaRecorder.onerror = (event) => reject(event.name); 9799 9800 gkt.gktVideoMsg.f.wait(mediaRecorder); 9801 9802 mediaRecorder.onstop = function(){ 9803 console.log("mediaRecorder.onstop() func called"); 9804 resolve(parts); 9805 } 9806 }) 9807 }, 9808 clickStop: function (e) { 9809 e.preventDefault(); 9810 gkt.gktVideoMsg.state.elements.gktRecord.addClass("gktVideoPlayerHide"); 9811 gkt.gktVideoMsg.state.elements.gktRecorded.removeClass("gktVideoPlayerHide"); 9812 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9813 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.addClass("gktVideoPlayerHide"); 9814 gkt.gktVideoMsg.state.elements.gktVideoPlayerStatus.addClass("gktVideoPlayerHide"); 9815 gkt.gktVideoMsg.state.elements.gktRecorderCloseBtn.removeClass("gktVideoPlayerHide"); 9816 gkt.gktVideoMsg.state.elements.gktLoadingHeading.removeClass("gktVideoPlayerHide"); 9817 gkt.gktVideoMsg.f.stopRecording(gkt.gktVideoMsg.state.elements.gktVideoPlayer[0].srcObject); 9818 }, 9819 covertBlobToBase64: async function (recordedBlob){ 9820 9821 const reader = new FileReader();
9822 reader.readAsDataURL(recordedBlob); 9823 9824 reader.onloadend = function () { 9825 9826 var arrayBuffer = reader.result; 9827 9828 console.log(arrayBuffer); 9829 9830 var formData = new FormData(); 9831 // gkt.settings.SERVER_URL = "https://dev.api.giftkart.app" 9832 formData.append("upload_data", recordedBlob, "video.txt"); 9833 formData.append("shopName", gkt.settings.merchantInfo.shopName); 9834 9835 console.time('Video upload Time'); 9836 fetch(gkt.settings.SERVER_URL+"/api/proxy/upload/video?shopName="+gkt.settings.merchantInfo.shopName,{ 9837 method: 'POST', 9838 body: formData 9839 }).then( 9840 response => response.json() // if the response is a JSON object 9841 ).then( 9842 success => { 9843 if(success.responseCode == 200){ 9844 gkt.gktVideoMsg.state.uploadedVideoId = success.data.videoMsgId; 9845 console.log(success) // Handle the success response object 9846 console.timeEnd('Video upload Time'); 9847 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.uploadConfirmation)); 9848 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 9849 // Show feedback that it got uploaded 9850 // gkt.gktVideoMsg.state.elements.gktRecorder.addClass("gktVideoPlayerHide"); 9851 } 9852 /* 9853 * @Abhishek, the below if else condition is added to handle the 9854 * condition where the api fails in sending over responseCode 200. 9855 */ 9856 else{ 9857 console.log(success) // Handle the error response object 9858 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.errorMessage)); 9859 } 9860 9861 } 9862 ).catch( 9863 error => { 9864 console.log(error) // Handle the error response object 9865 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.html(gkt.utility.renderLanguageValue(gkt.settings.languageData.videoMessage.errorMessage)); 9866 } 9867 ); 9868 } 9869 }, 9870 clickAccept: function(e) { 9871 e.preventDefault(); 9872 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide") 9873 gkt.gktVideoMsg.state.elements.gktUploadingVideoHeading.removeClass("gktVideoPlayerHide") 9874 gkt.gktVideoMsg.f.covertBlobToBase64(gkt.gktVideoMsg.state.recordedBlob); 9875 }, 9876 wait: function(mediaRecorder){ 9877 var now = new Date().getTime(); 9878 var deadline = new Date(now + gkt.gktVideoMsg.state.recordingTimeMS).getTime(); 9879 var interval = setInterval(() => { 9880 now = new Date().getTime(); 9881 var t = deadline - now; 9882 console.log(t); 9883 var minutes = Math.floor((t % (1000 * 60 * 60)) / (1000 * 60)); 9884 var seconds = Math.floor((t % (1000 * 60)) / 1000); 9885 if (t < 0) { 9886 gkt.$('.gktVideoPlayerStopBtn').click(); 9887 } 9888 gkt.gktVideoMsg.state.elements.gktVideoPlayerTimeLeft.html(minutes + " : " + seconds) 9889 }, 1000); 9890 gkt.gktVideoMsg.state.interval = interval; 9891 }, 9892 clickReStart: function (e) { 9893 e.preventDefault(); 9894 if(gkt.utility.isMobileView()){ 9895 // gktVideoMessageFileInput.click(); 9896 // find this class in the document and trigger a click 9897 gkt.gktVideoMsg.f.revokeObjectUrl() 9898 gkt.$('.gktVideoMessageFileInput').click(); 9899 }else{ 9900 gkt.gktVideoMsg.f.revokeObjectUrl() 9901 gkt.gktVideoMsg.f.createRecorder(); 9902 } 9903 }, 9904 clickPlay: async function(e) { 9905 e.preventDefault(); 9906 try { 9907 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.addClass("gktVideoPlayerHide"); 9908 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].play(); 9909 let isEnded = new Promise((resolve, reject) => { 9910 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].onended = resolve; 9911 }); 9912 await isEnded; 9913 gkt.gktVideoMsg.state.elements.gktVideoPlayerRecording[0].load(); 9914 gkt.gktVideoMsg.state.elements.gktVideoPlayerControls.removeClass("gktVideoPlayerHide"); 9915 9916 } catch (error) { 9917 console.log(error) 9918 } 9919 }, 9920 scrollToVideoDiv: function() { 9921 // gkt.$(".gktGiftCardMessageContent").animate({scrollTop: 9999},1000); 9922 gkt.$(".gktGiftCardMessageContent").animate({scrollTop: 200},2000, 'swing'); 9923 }, 9924 }, 9925 actions: { 9926 gktVideoMsgButton: function(e){ 9927 e.preventDefault() 9928 gkt.$('.gktVideoMsgPlayerWrapper').css('display', 'grid') 9929 gkt.gktVideoMsg.f.createRecorder() 9930 gkt.gktVideoMsg.f.scrollToVideoDiv() 9931 }, 9932 }, 9933 events: { 9934 9935 }, 9936 9937 }, 9938 gktFreeGiftCardPopup:{ 9939 init:function(settings,parent){ 9940 // gkt.gktFreeGiftCardPopup.initialize(settings,parent) 9941 }, 9942 state:{ 9943 gktFreeGiftcardName:null, 9944 gktFreeGiftcardEmail:null, 9945 gktFreeGiftcardMessage:null, 9946 }, 9947 initialize: async function(settings,parent){ 9948 // let productHandle = gkt.f.getProductPageHandle(settings) 9949 // gkt.gktFreeGiftCardPopup.f.showGiftCard(settings,parent) 9950 }, 9951 f:{ 9952 addFreeGiftcardProduct: async function(){ 9953 gkt.state.freeGiftcardVariantId = undefined 9954 let currencySymbol = gkt.settings.merchantInfo?.currencyInfo?.symbol ? gkt.settings.merchantInfo.currencyInfo.symbol : "" 9955 if(gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0] && 9956 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants && 9957 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants.length > 0 && 9958 gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants[0].variantId){ 9959 gkt.state.freeGiftcardVariantId = gkt.settings.rewardCampaigns.campaignData.freeGiftcardProduct[0].variants[0].variantId 9960 } 9961 9962 if(gkt.state.freeGiftcardVariantId){ 9963 gkt.state.cartData = await gkt.utility.getCart() 9964 let item = gkt.utility.checkIfItemPresentInCart(gkt.state.freeGiftcardVariantId) 9965 let cartValue = 0 9966 if(gkt.state.cartData && gkt.state.cartData.total_price && ((gkt.state.cartData.total_price)/100)){ 9967 cartValue = (gkt.state.cartData.total_price)/100 9968 } 9969 let freeGiftcardValue = gkt.gktFreeGiftCardPopup.f.getFreeGiftcardValue(cartValue, gkt.settings.rewardCampaigns.campaignData) 9970 let isProductConditionMet = gkt.gktFreeGiftCardPopup.f.isFreeGiftcardProductConditionMet(gkt.state.cartData, gkt.settings.rewardCampaigns.campaignData); 9971 // let isCustomerTagsConditionMet = gkt.gktFreeGiftCardPopup.f.isCustomerTagsConditionMet(gkt.settings.customer, gkt.settings.rewardCampaigns.campaignData); 9972 9973 // if product conditions not met set free giftcard value to 0 9974 if(!isProductConditionMet){ 9975 freeGiftcardValue = false 9976 } 9977 9978 // remove giftcard from cart if freeGiftcardValue is zero 9979 if(freeGiftcardValue == false && item){ 9980 await gkt.utility.updateCart({ updates: { [item.id]: 0 }}) 9981 return 9982 } 9983 9984 if(cartValue && freeGiftcardValue){ 9985 9986 let itemObj = {"items": [ 9987 { 9988 "id": gkt.state.freeGiftcardVariantId, 9989 "quantity": 1, 9990 "properties": { 9991 "Reward Value": freeGiftcardValue 9992 9993 } 9994 } 9995 ]} 9996 if(gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote && gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote != ""){ 9997 itemObj.items[0].properties["Message"] = gkt.settings.rewardCampaigns.campaignData.giftcardMessageNote 9998 } 9999 if(!item){ 10000 let resAddToCart = await gkt.utility.addToCartV2(itemObj) 10001 document.documentElement.dispatchEvent( new CustomEvent("cart:refresh", {bubbles: true})); 10002 }else{ 10003 let rewardValue = freeGiftcardValue 10004 if(item && item.properties && item.properties["Reward Value"] && item.properties["Reward Value"] != rewardValue){ 10005 await gkt.utility.updateCart({ updates: { [item.id]: 0 }}) 10006 let resAddToCart = await gkt.utility.addToCartV2(itemObj) 10007 document.documentElement.dispatchEvent( new CustomEvent("cart:refresh", {bubbles: true})); 10008 } 10009 } 10010 } 10011 } 10012 10013 }, 10014 calculateFreeGiftCardValue: function(freeGiftcardValue, cartTotalPrice, freeGiftcardPopupData) { 10015 try { 10016 if(!freeGiftcardPopupData?.rewardMode || freeGiftcardPopupData.rewardMode == "FIXED") { 10017 let currencySymbol = gkt.settings.merchantInfo?.currencyInfo?.symbol ? gkt.settings.merchantInfo.currencyInfo.symbol : "" 10018 return currencySymbol + "" + freeGiftcardValue; 10019 } else { 10020 // let calculatedFreeGiftCardValue = (cartTotalPrice/100) * parseFloat(freeGiftcardValue); // % of cartTotalWithoutDiscount; 10021 // calculatedFreeGiftCardValue = parseFloat(parseFloat(calculatedFreeGiftCardValue).toFixed(2)) 10022 return freeGiftcardValue + "" + "%"; 10023 } 10024 } catch(err) { 10025 console.log(err); 10026 } 10027 }, 10028 getFreeGiftcardValue: function (cartTotalPrice, freeGiftcardPopupData){ 10029 try { 10030 let resValue = false 10031 let activeCurrencyRate = gkt.utility.getActiveCurrencyRate(
10031); 10032 if(freeGiftcardPopupData?.rules?.length && freeGiftcardPopupData?.rules?.length > 0){ 10033 for(let i = 0; i < freeGiftcardPopupData.rules.length; i++){ 10034 let rule = freeGiftcardPopupData.rules[i] 10035 let cartValue = parseFloat(rule.cartValue * activeCurrencyRate).toFixed(2) 10036 let freeGiftcardValue = rule.freeGiftcardValue 10037 if(parseFloat(cartTotalPrice) >= parseFloat(cartValue) && parseFloat(freeGiftcardValue) > 0){ 10038 resValue = gkt.gktFreeGiftCardPopup.f.calculateFreeGiftCardValue(freeGiftcardValue, cartTotalPrice, freeGiftcardPopupData) 10039 } 10040 } 10041 } 10042 return resValue 10043 } catch (error) { 10044 console.log(error); 10045 return false 10046 10047 } 10048 }, 10049 isFreeGiftcardProductConditionMet: function (orderData, freeGiftcardPopupData) { 10050 try { 10051 10052 let orderDataProducts = orderData.items.map(item => item.product_id) 10053 let validProductSet = new Set() 10054 let excludeProductSet = new Set() 10055 if(freeGiftcardPopupData?.products?.length && freeGiftcardPopupData?.products?.length > 0){ 10056 for(let i = 0; i < freeGiftcardPopupData.products.length; i++){ 10057 let product = freeGiftcardPopupData.products[i] 10058 validProductSet.add(parseInt(product.productId)) 10059 } 10060 } 10061 if(freeGiftcardPopupData?.collectionsData?.length && freeGiftcardPopupData?.collectionsData?.length > 0){ 10062 for(let i = 0; i < freeGiftcardPopupData.collectionsData.length; i++){ 10063 let collectionProducts = freeGiftcardPopupData.collectionsData[i].productList 10064 if(collectionProducts?.length && collectionProducts?.length > 0){ 10065 collectionProducts.forEach(product => { 10066 validProductSet.add(product.productId) 10067 }) 10068 } 10069 } 10070 } 10071 10072 if(freeGiftcardPopupData?.excludeProducts?.length && freeGiftcardPopupData?.excludeProducts?.length > 0){ 10073 for(let i = 0; i < freeGiftcardPopupData.excludeProducts.length; i++){ 10074 let product = freeGiftcardPopupData.excludeProducts[i] 10075 excludeProductSet.add(parseInt(product.productId)) 10076 } 10077 } 10078 10079 if(validProductSet.size == 0 && excludeProductSet.size == 0){ 10080 return true 10081 } 10082 10083 10084 for(let i = 0; i < orderDataProducts.length; i++){ 10085 let product = orderDataProducts[i] 10086 10087 if(excludeProductSet.has(product)){ 10088 return false 10089 } 10090 10091 if(validProductSet.has(product)){ 10092 return true 10093 } 10094 } 10095 10096 if(validProductSet.size == 0 ){ 10097 return true 10098 }else{ 10099 return false 10100 } 10101 10102 } catch (error) { 10103 console.log(error); 10104 return false 10105 } 10106 }, 10107 10108 registerEvents: function(){ 10109 gkt.$(document).on("click", ".gktFreeGiftcardPopupModalClose", gkt.gktFreeGiftCardPopup.action.onModalClose) 10110 }, 10111 }, 10112 action:{ 10113 onModalClose: function(){ 10114 gkt.$(".gktFreeGiftcardPopupModalWrapper").css("display", "none") 10115 }, 10116 } 10117 }, 10118 gktNotification:{ 10119 init: function(){ 10120 gkt.gktNotification.f.addNotificationWrapperToDOM() 10121 gkt.gktNotification.initialize() 10122 }, 10123 state: { 10124 gktNotification: null, 10125 gktNotificationType: null, 10126 gktNotificationMessage: null, 10127 gktNotificationDuration: null, 10128 gktNotificationPosition: null, 10129 }, 10130 initialize: function(){ 10131 10132 10133 // notification examples 10134 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-1","If your cart value is greater than 40$ you will get 10$ Free Gift Card.", 100) 10135 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-2", "mayy") 10136 // gkt.gktNotification.f.addNotificationItemType1("addNotificationItem-3") 10137 10138 }, 10139 f: { 10140 addNotificationWrapperToDOM: function(){ 10141 if(gkt.$('.gktNotificationWrapper').length == 0){ 10142 let gktNotificationWrapper = gkt.$("<div>").addClass("gktNotificationWrapper") 10143 gkt.$("body").append(gktNotificationWrapper) 10144 } 10145 }, 10146 10147 addNotificationItemType1: function(itemHeading="",itemHeadingSubText="", closeAfterSec=10){ 10148 if(itemHeading == "" && itemHeadingSubText == "" ){ 10149 return 10150 } 10151 let gktNotificationWrapper = gkt.$(".gktNotificationWrapper") 10152 let gktNotificationItem = gkt.$("<div>").addClass("gktNotificationItem") 10153 let gktNotificationItemContent2 = gkt.$("<div>").addClass("gktNotificationItemContent2").html('<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="24px" height="24px"><path d="M 16 3 C 8.832031 3 3 8.832031 3 16 C 3 23.167969 8.832031 29 16 29 C 23.167969 29 29 23.167969 29 16 C 29 8.832031 23.167969 3 16 3 Z M 16 5 C 22.085938 5 27 9.914063 27 16 C 27 22.085938 22.085938 27 16 27 C 9.914063 27 5 22.085938 5 16 C 5 9.914063 9.914063 5 16 5 Z M 15 10 L 15 12 L 17 12 L 17 10 Z M 15 14 L 15 22 L 17 22 L 17 14 Z"/></svg>') 10154 let gktNotificationItemContent3 = gkt.$("<div>").addClass("gktNotificationItemContent3") 10155 let gktNotificationItemContent3Heading = gkt.$("<div>").addClass("gktNotificationItemContent3Heading").html(itemHeading) 10156 let gktNotificationItemContent3SubText = gkt.$("<div>").addClass("gktNotificationItemContent3SubText").html(itemHeadingSubText) 10157 gktNotificationItemContent3.append(gktNotificationItemContent3Heading) 10158 gktNotificationItemContent3.append(gktNotificationItemContent3SubText) 10159 let gktNotificationItemContent4 = gkt.$("<div>").addClass("gktNotificationItemContent4").html('<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px" viewBox="0 0 122.878 122.88" enable-background="new 0 0 122.878 122.88" xml:space="preserve"><g><path fill=#575050 d="M1.426,8.313c-1.901-1.901-1.901-4.984,0-6.886c1.901-1.902,4.984-1.902,6.886,0l53.127,53.127l53.127-53.127 c1.901-1.902,4.984-1.902,6.887,0c1.901,1.901,1.901,4.985,0,6.886L68.324,61.439l53.128,53.128c1.901,1.901,1.901,4.984,0,6.886 c-1.902,1.902-4.985,1.902-6.887,0L61.438,68.326L8.312,121.453c-1.901,1.902-4.984,1.902-6.886,0 c-1.901-1.901-1.901-4.984,0-6.886l53.127-53.128L1.426,8.313L1.426,8.313z"/>
10159</g></svg>') 10160 gktNotificationItemContent4.on("click", function (event) { 10161 gktNotificationItem.css("transform","translateX(300px)") 10162 setTimeout(()=>{gktNotificationItem.remove()},1000) 10163 }) 10164 10165 setTimeout(function(){ 10166 console.log("gktNotificationItem", gktNotificationItem) 10167 if(gktNotificationItem){ 10168 gktNotificationItem.css("transform","translateX(300px)") 10169 setTimeout(()=>{gktNotificationItem.remove()},1000) 10170 } 10171 },closeAfterSec*1000) 10172 10173 gktNotificationItem.append(gktNotificationItemContent2) 10174 gktNotificationItem.append(gktNotificationItemContent3) 10175 gktNotificationItem.append(gktNotificationItemContent4) 10176 10177 gktNotificationWrapper.css("display", "block") 10178 gktNotificationWrapper.append(gktNotificationItem) 10179 10180 //slide in the notification 10181 setTimeout(()=>{ 10182 gktNotificationItem.css("transform","translateX(0px)") 10183 },100) 10184 10185 return gktNotificationItem 10186 }, 10187 removeNotificationFromDOM: function(){ 10188 setTimeout(()=>{ 10189 gkt.$(".gktNotification").remove() 10190 }, gkt.gktNotification.state.gktNotificationDuration) 10191 } 10192 } 10193 } 10194 } 10195 10196 window.gkt = gkt; 10197 /* 10198 * start the program 10199 */ 10200 gktUtils.f.loadJquery(function (jqueryRefObj) { 10201 gkt.$ = jqueryRefObj; 10202 10203 gkt.$(document).ready(function () { 10204 console.log("document ready", gkt.$); 10205 gkt.f.initialize(gkt.$); 10206 }) 10207 }) 10208 10209 10210 10211 10212 10213 10214</script>
10214 10215 10216 10217 <style> </style>
10218<script src="https://cdn.shopify.com/storefront/standard-actions.js" type="module" data-source-attribution="shopify.standard_actions"></script>
10218 10219</body> 10220</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.