Advertisement
Guest User

ZYDECO CHOP CHOP

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