Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. <div id='product-component-950ff337e17'></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: 'brightspecs.myshopify.com',
  28. apiKey: '555738ac9ecc1fa3382d566e5592f865',
  29. appId: '6',
  30. });
  31.  
  32. ShopifyBuy.UI.onReady(client).then(function (ui) {
  33. ui.createComponent('product', {
  34. id: [345319047195],
  35. node: document.getElementById('product-component-950ff337e17'),
  36. moneyFormat: '%24%7B%7Bamount%7D%7D',
  37. options: {
  38. "product": {
  39. "variantId": "all",
  40. "contents": {
  41. "imgWithCarousel": false,
  42. "variantTitle": false,
  43. "description": false,
  44. "buttonWithQuantity": false,
  45. "quantity": false
  46. },
  47. "styles": {
  48. "product": {
  49. "@media (min-width: 601px)": {
  50. "max-width": "calc(25% - 20px)",
  51. "margin-left": "20px",
  52. "margin-bottom": "50px"
  53. }
  54. }
  55. }
  56. },
  57. "cart": {
  58. "contents": {
  59. "button": true
  60. },
  61. "styles": {
  62. "footer": {
  63. "background-color": "#ffffff"
  64. }
  65. }
  66. },
  67. "modalProduct": {
  68. "contents": {
  69. "img": false,
  70. "imgWithCarousel": true,
  71. "variantTitle": false,
  72. "buttonWithQuantity": true,
  73. "button": false,
  74. "quantity": false
  75. },
  76. "styles": {
  77. "product": {
  78. "@media (min-width: 601px)": {
  79. "max-width": "100%",
  80. "margin-left": "0px",
  81. "margin-bottom": "0px"
  82. }
  83. }
  84. }
  85. },
  86. "productSet": {
  87. "styles": {
  88. "products": {
  89. "@media (min-width: 601px)": {
  90. "margin-left": "-20px"
  91. }
  92. }
  93. }
  94. }
  95. }
  96. });
  97. });
  98. }
  99. })();
  100. /*]]>*/
  101. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement