Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% when 'product' %}
- {%- assign product = all_products[block.settings.product] -%}
- <body class="product-slim">
- <div id="product-slim" class="shopify-section">
- <div class="product-slim">
- <form method="post" action="/cart/add" id="atc" novalidate-class="cart">
- <table class="cart">
- <thead class="cart__row cart__header">
- <tr><th colspan="3">Product</th>
- <th>Price</th>
- </tr>
- </thead>
- <tbody>
- <tr class="cart__row border-bottom line1 cart-flex border-top">
- <td class="cart__image-wrapper cart-flex-item">
- <a href="{{ product.url }}">
- <img class="cart__image" src="{{ product | img_url }} " alt="{{ product.title }} - {{ product.selected_variant }}">
- </a>
- </td>
- {% comment %}
- Product Section
- {% endcomment %}
- <td class="cart__meta small--text-left cart-flex-item" style="width:30%;">
- <div class="list-view-item__title" style="float:left;">
- <a href="{{ product.url }}">
- {{ product.title }}
- </a>
- {% comment %}
- Variant Part
- {% endcomment %}
- {% if product.has_only_default_variant %}
- <input name="id" value="{{ variant.id }}" type="hidden">
- {% else %}
- {% for product_option in product.options_with_values %}
- <label>
- <i>{{ product_option.name }}:</i>
- <select>
- {% for value in product_option.values %}
- <option>
- {{ value }}
- </option>
- {% endfor %}
- </select>
- </label>
- {% endfor %}
- {% endif %}<br>
- </div>
- </td>
- {% comment %}
- Specifications Section
- {% endcomment %}
- <td class="cart__price-wrapper cart-flex-item">
- <div style="width:60%;margin-right:0px!;"><i>{{ block.settings.specifications }}</i></div>
- </td>
- {% comment %}
- Price Section
- {% endcomment %}
- <td class="cart__price-wrapper cart-flex-item">
- <div style="Width:10%;margin-right:80px!;">
- <p>{{ product.price | money }}</p>
- <script>document.write(total);</script>
- </div>
- <div class="cart__edit medium-up--hide">
- <button type="button" class="btn btn--secondary btn--small js-edit-toggle cart__edit--active" data-target="line1">
- <span class="cart__edit-text--edit">Edit</span>
- <span class="cart__edit-text--cancel">Cancel</span>
- </button>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <p style="display:inline-block;width:75%;"><i>Recommended: {{ block.settings.recommended }}</i></p>
- <div style="display:inline-block;">
- <input type="hidden" name="id" value="{{ product.variants.first.id }}" />
- <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();">
- <input type="submit" value="Add to cart" class="btn" />
- </div>
- </form>
- <script>
- function quantity() {
- var quantity = document.getElementById("quantity").value;
- }
- var price = {{ product.price | money }};
- var total = price * quantity;
- </script>
- {% else %}
- {% comment %}
- No product yet. Show onboarding one.
- {% endcomment %}
- <div class="grid-view-item">
- <a class="grid-view-item__link" href="#">
- <div class="grid-view-item__image">
- {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
- {{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
- </div>
- <div class="h4 grid-view-item__title">{{ 'homepage.onboarding.product_title' | t }}
- </div>
- <div class="grid-view-item__meta">
- {{ 1999 | money }}
- </div>
- </a>
- </div>
- </div>
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement