Advertisement
alexmiller17

Untitled

Jul 5th, 2019
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. {% when 'product' %} {%- assign product = all_products[block.settings.product] -%}
  2.  
  3. <body class="product-slim">
  4. <div id="product-slim" class="shopify-section">
  5. <div class="product-slim">
  6. <form method="post" action="/cart/add" id="atc" novalidate-class="cart">
  7. <table class="cart">
  8. <thead class="cart__row cart__header">
  9. <tr>
  10. <th colspan="3">Product</th>
  11. <th>Price</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <tr class="cart__row border-bottom line1 cart-flex border-top">
  16. <td class="cart__image-wrapper cart-flex-item">
  17. <a href="{{ product.url }}">
  18. <img class="cart__image" src="{{ product | img_url }} " alt="{{ product.title }} - {{ product.selected_variant }}">
  19. </a>
  20. </td>
  21.  
  22. {% comment %} Product Section {% endcomment %}
  23.  
  24. <td class="cart__meta small--text-left cart-flex-item" style="width:30%;">
  25. <div class="list-view-item__title" style="float:left;">
  26. <a href="{{ product.url }}">
  27. {{ product.title }}
  28. </a> {% comment %} Variant Part {% endcomment %} {% if product.has_only_default_variant %}
  29. <input name="id" value="{{ variant.id }}" type="hidden"> {% else %} {% for product_option in product.options_with_values %}
  30. <label>
  31. <i>{{ product_option.name }}:</i>
  32. <select>
  33. {% for value in product_option.values %}
  34. <option>
  35. {{ value }}
  36. </option>
  37. {% endfor %}
  38. </select>
  39. </label>
  40. {% endfor %} {% endif %}
  41. <br>
  42. </div>
  43. </td>
  44.  
  45. {% comment %} Specifications Section {% endcomment %}
  46.  
  47. <td class="cart__price-wrapper cart-flex-item">
  48. <div style="width:60%;margin-right:0px!;"><i>{{ block.settings.specifications }}</i></div>
  49. </td>
  50.  
  51. {% comment %} Price Section {% endcomment %}
  52.  
  53. <td class="cart__price-wrapper cart-flex-item">
  54. <div style="Width:10%;margin-right:80px!;">
  55. <p>{{ product.price | money }}</p>
  56. <script>
  57. document.write(total);
  58. </script>
  59. </div>
  60.  
  61. <div class="cart__edit medium-up--hide">
  62. <button type="button" class="btn btn--secondary btn--small js-edit-toggle cart__edit--active" data-target="line1">
  63. <span class="cart__edit-text--edit">Edit</span>
  64. <span class="cart__edit-text--cancel">Cancel</span>
  65. </button>
  66. </div>
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71.  
  72. <p style="display:inline-block;width:75%;"><i>Recommended: {{ block.settings.recommended }}</i></p>
  73. <div style="display:inline-block;margin-right:0px;">
  74. <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
  75. <p style="margin-right:15px;display:inline-block;">Quantity</p>
  76. <input min="1" type="number" id="quantity" name="quantity" value="1" style="width:80px;display:inline-block;" onchange="quantity();">
  77. <input type="submit" value="Add to cart" class="btn" />
  78. </div>
  79. </form>
  80. <script>
  81. function quantity() {
  82. var quantity = document.getElementById("quantity").value;
  83. }
  84.  
  85. var price = {
  86. {
  87. product.price | money
  88. }
  89. };
  90. var total = price * quantity;
  91. </script>
  92. {% else %} {% comment %} No product yet. Show onboarding one. {% endcomment %}
  93. <div class="grid-view-item">
  94. <a class="grid-view-item__link" href="#">
  95. <div class="grid-view-item__image">
  96. {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %} {{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
  97. </div>
  98. <div class="h4 grid-view-item__title">{{ 'homepage.onboarding.product_title' | t }}
  99. </div>
  100. <div class="grid-view-item__meta">
  101. {{ 1999 | money }}
  102. </div>
  103. </a>
  104. </div>
  105.  
  106. </div>
  107. </div>
  108.  
  109. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement