Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id = 'product-component-f8ae9831f1d' > < /div> <
  2.     script type = "text/javascript" >
  3.     /*<![CDATA[*/
  4.  
  5.     (function() {
  6.         var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
  7.         if (window.ShopifyBuy) {
  8.             if (window.ShopifyBuy.UI) {
  9.                 ShopifyBuyInit();
  10.             } else {
  11.                 loadScript();
  12.             }
  13.         } else {
  14.             loadScript();
  15.         }
  16.  
  17.         function loadScript() {
  18.             var script = document.createElement('script');
  19.             script.async = true;
  20.             script.src = scriptURL;
  21.             (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
  22.             script.onload = ShopifyBuyInit;
  23.         }
  24.  
  25.         function ShopifyBuyInit() {
  26.             var client = ShopifyBuy.buildClient({
  27.                 domain: 'shop.swiish.com',
  28.                 storefrontAccessToken: 'b9bcd77eea223a9ac3df9c0117588ac0',
  29.             });
  30.  
  31.             ShopifyBuy.UI.onReady(client).then(function(ui) {
  32.                 ui.createComponent('product', {
  33.                     id: [2421586755644],
  34.                     node: document.getElementById('product-component-f8ae9831f1d'),
  35.                     moneyFormat: '%24%7B%7Bamount%7D%7D',
  36.                     options: {
  37.                         "product": {
  38.                             "variantId": "all",
  39.                             "width": "220px",
  40.                             "contents": {
  41.                                 "img": false,
  42.                                 "imgWithCarousel": false,
  43.                                 "title": false,
  44.                                 "variantTitle": false,
  45.                                 "price": false,
  46.                                 "description": false,
  47.                                 "buttonWithQuantity": true,
  48.                                 "button": false,
  49.                                 "quantity": false
  50.                             },
  51.                             "text": {
  52.                                 "button": "SHOP NOW"
  53.                             },
  54.                             "styles": {
  55.                                 "product": {
  56.                                     "text-align": "left",
  57.                                     "@media (min-width: 601px)": {
  58.                                         "max-width": "100%",
  59.                                         "margin-left": "0",
  60.                                         "margin-bottom": "50px"
  61.                                     }
  62.                                 },
  63.                                 "title": {
  64.                                     "font-size": "26px"
  65.                                 },
  66.                                 "price": {
  67.                                     "font-size": "18px"
  68.                                 },
  69.                                 "compareAt": {
  70.                                     "font-size": "15px"
  71.                                 }
  72.                             }
  73.                         },
  74.                         "cart": {
  75.                             "contents": {
  76.                                 "button": true
  77.                             },
  78.                             "styles": {
  79.                                 "footer": {
  80.                                     "background-color": "#ffffff"
  81.                                 }
  82.                             }
  83.                         },
  84.                         "modalProduct": {
  85.                             "contents": {
  86.                                 "img": false,
  87.                                 "imgWithCarousel": true,
  88.                                 "variantTitle": false,
  89.                                 "buttonWithQuantity": true,
  90.                                 "button": false,
  91.                                 "quantity": false
  92.                             },
  93.                             "styles": {
  94.                                 "product": {
  95.                                     "@media (min-width: 601px)": {
  96.                                         "max-width": "100%",
  97.                                         "margin-left": "0px",
  98.                                         "margin-bottom": "0px"
  99.                                     }
  100.                                 }
  101.                             }
  102.                         },
  103.                         "productSet": {
  104.                             "styles": {
  105.                                 "products": {
  106.                                     "@media (min-width: 601px)": {
  107.                                         "margin-left": "-20px"
  108.                                     }
  109.                                 }
  110.                             }
  111.                         }
  112.                     }
  113.                 });
  114.             });
  115.         }
  116.     })();
  117. /*]]>*/
  118. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement