Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id='product-component-801a8b97cde'></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: 'logick-workshop.myshopify.com',
  28.           storefrontAccessToken: 'd80bbd6ba33ffc7d4c207b7b7a29fc49',
  29.         });
  30.  
  31.         ShopifyBuy.UI.onReady(client).then(function (ui) {
  32.           ui.createComponent('product', {
  33.             id: [1502991679550],
  34.             node: document.getElementById('product-component-801a8b97cde'),
  35.             moneyFormat: '%24%7B%7Bamount%7D%7D',
  36.             options: {
  37.   "product": {
  38.     "buttonDestination": "checkout",
  39.     "variantId": "all",
  40.     "width": "240px",
  41.     "contents": {
  42.       "img": false,
  43.       "imgWithCarousel": false,
  44.       "title": false,
  45.       "variantTitle": false,
  46.       "price": false,
  47.       "description": false,
  48.       "buttonWithQuantity": false,
  49.       "quantity": false
  50.     },
  51.     "text": {
  52.       "button": "BUY 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.       "button": {
  64.         "background-color": "#000000",
  65.         ":hover": {
  66.           "background-color": "#000000"
  67.         },
  68.         ":focus": {
  69.           "background-color": "#000000"
  70.         },
  71.         "font-weight": "normal"
  72.       },
  73.       "compareAt": {
  74.         "font-size": "12px"
  75.       }
  76.     }
  77.   },
  78.   "cart": {
  79.     "contents": {
  80.       "button": true
  81.     },
  82.     "styles": {
  83.       "button": {
  84.         "background-color": "#000000",
  85.         ":hover": {
  86.           "background-color": "#000000"
  87.         },
  88.         ":focus": {
  89.           "background-color": "#000000"
  90.         },
  91.         "font-weight": "normal"
  92.       },
  93.       "footer": {
  94.         "background-color": "#ffffff"
  95.       }
  96.     }
  97.   },
  98.   "modalProduct": {
  99.     "contents": {
  100.       "img": false,
  101.       "imgWithCarousel": true,
  102.       "variantTitle": false,
  103.       "buttonWithQuantity": true,
  104.       "button": false,
  105.       "quantity": false
  106.     },
  107.     "styles": {
  108.       "product": {
  109.         "@media (min-width: 601px)": {
  110.           "max-width": "100%",
  111.           "margin-left": "0px",
  112.           "margin-bottom": "0px"
  113.         }
  114.       },
  115.       "button": {
  116.         "background-color": "#000000",
  117.         ":hover": {
  118.           "background-color": "#000000"
  119.         },
  120.         ":focus": {
  121.           "background-color": "#000000"
  122.         },
  123.         "font-weight": "normal"
  124.       }
  125.     }
  126.   },
  127.   "toggle": {
  128.     "styles": {
  129.       "toggle": {
  130.         "background-color": "#000000",
  131.         ":hover": {
  132.           "background-color": "#000000"
  133.         },
  134.         ":focus": {
  135.           "background-color": "#000000"
  136.         },
  137.         "font-weight": "normal"
  138.       }
  139.     }
  140.   },
  141.   "productSet": {
  142.     "styles": {
  143.       "products": {
  144.         "@media (min-width: 601px)": {
  145.           "margin-left": "-20px"
  146.         }
  147.       }
  148.     }
  149.   }
  150. }
  151.           });
  152.         });
  153.       }
  154.     })();
  155.     /*]]>*/
  156.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement