Advertisement
Guest User

Untitled

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