Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.59 KB | None | 0 0
  1. <div itemscope itemtype="http://schema.org/Product">
  2.  
  3.   <meta itemprop="url" content="{{ shop.url }}{{ product.url }}" />
  4.   <meta itemprop="image" content="{{ product.featured_image.src | product_img_url: 'grande' }}" />
  5.    
  6.     <div class="row" id="product" data-id="{{product.id}}" data-handle="{{product.handle}}">
  7.     <div class="large-6 medium-6 small-12 columns">
  8.    
  9.     <!-- No Javascript Fallback for Image -->
  10.         <noscript><img src="{{ product.featured_image.src | product_img_url: 'large' }}" alt="{{ link.object.title | escape  }}" class="product-image"></noscript>
  11.  
  12.     <!-- Product Image Slider -->
  13.     <div id="product-slider" class="flexslider clearfix">
  14.         <ul class="slides">
  15.           {% for image in product.images %}
  16.             <li>
  17.                 <div class="image-wrapper ratio_16-9">
  18.                   <img class="b-lazy product-image"
  19.                     src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  20.                     data-src="{{ image | product_img_url: 'grande' }}"
  21.                     alt="{{ product.title | escape  }}"  
  22.                   />
  23.                 </div>
  24.             </li>
  25.           {% endfor %}
  26.         </ul>
  27.     </div>
  28.  
  29.     <!-- Product Thumbnails -->
  30.     <div id="product-thumbs" class="flexslider clearfix">
  31.         <ul class="clearfix">
  32.             {% for image in product.images %}
  33.                 {% if product.images.size > 1 %}
  34.                     <li class="clearfix">
  35.                         <img class="b-lazy product-image"
  36.                         src="{{ 'placeholder.png' | asset_url }}"
  37.                         data-src="{{ image | product_img_url: 'medium' }}"
  38.                         alt="{{ product.title | escape  }}"  
  39.                         />
  40.                     </li>
  41.                 {% endif %}
  42.             {% endfor %}
  43.         </ul>
  44.     </div>
  45.  
  46.     </div><!-- large-7 -->
  47.  
  48.       <div class="large-6 medium-6 small-12 columns product-info">
  49.           <form action="/cart/add" method="post" enctype="multipart/form-data">
  50.                
  51.             <div id="product-details">
  52.              
  53.               <p class="sku">{{ product.variants.first.sku }}</p>
  54.  
  55.               <h1 itemprop="name">{{ product.title }}</h1>
  56.              
  57.              
  58.               <div class="row clearfix">
  59.                 <div class="large-6 medium-6 small-12 columns left">
  60.                     {% if product.tags contains 'Fall14' %}
  61.                     <span class="new-icon">{{ 'new.gif' | asset_url | img_tag: 'New' }}</span>
  62.                     {% endif %}
  63.  
  64.                     <!-- Product Color -->
  65.                     <p class="product-color">{% include 'product-color' %}</p>
  66.                 </div>
  67.                 <div class="large-6 medium-6 small-12 columns right">
  68.                 <!-- Price -->
  69.                     <div id="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  70.                         <meta itemprop="priceCurrency" content="{{ shop.currency }}" />
  71.                   {% if product.available %}
  72.                               <link itemprop="availability" href="http://schema.org/InStock" />
  73.                               {% else %}
  74.                               <link itemprop="availability" href="http://schema.org/OutOfStock" />
  75.                           {% endif %}
  76.                               {% if product.compare_at_price > product.price %}
  77.                           <span class="product-price on-sale" itemprop="price">{{ product.price | money }}</span>&nbsp;<del class="product-compare-price">{{ product.compare_at_price_max | money }}</del>
  78.                           {% else %}
  79.                           <span class="product-price" itemprop="price">{{ product.price | money }}</span>
  80.                       {% endif %}
  81.                     </div>
  82.                                    
  83.                   {% assign hide_default_title = false %}
  84.                   {% if product.variants.size == 1 and product.variants.first.title contains 'Default' %}
  85.                     {% assign hide_default_title = true %}
  86.                   {% endif %}      
  87.                
  88.                   <div id="product-variants" class="{% if hide_default_title %} hidden{% endif %}">
  89.                        <select id="product-select" name="id" class="hidden">
  90.                        {% for variant in product.variants %}
  91.                          <option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
  92.                        {% endfor %}
  93.                        </select>
  94.                   </div>
  95.                 </div>
  96.               </div>
  97.  
  98.             <div class="row clearfix">
  99.                 <div class="large-6 medium-5 small-12 columns left">
  100.                     <!-- Add to Cart -->
  101.                     <div id="product-add">
  102.                         <input class="submit-add-to-cart large button" type="submit" value="Add To Cart" />
  103.                     </div>
  104.                 </div>
  105.  
  106.                 <div class="large-6 medium-7 small-12 columns right">
  107.                     <!-- Social Media Icons -->
  108.                     {% include 'social-media' %}
  109.                 </div>
  110.                
  111.               </div>
  112.  
  113.             <section class="product-description detail clearfix">
  114.                 <a class="title">Detail</a>
  115.                 <div class="content" data-section-content>
  116.                       {{ product.description }}
  117.                 </div>
  118.             </section>
  119.  
  120.             <section class="product-description detail clearfix hide-for-small">
  121.                 <a class="title" href="#product-features-anchor">View Features</a>
  122.             </section>
  123.  
  124.             <dl class="product-description accordion" data-accordion>
  125.  
  126.                   <dd class="accordion-navigation">
  127.                     <a class="title" href="#similar-styles">Similar Styles</a>
  128.                     <div id="similar-styles" class="content {% unless shop.name contains 'staging' %}active{% endunless %}">
  129.                         <ul class="color">
  130.                           {% if collection %}
  131.                             {% capture currentCol %}{{ collection.handle }}{% endcapture %}
  132.                                 {% for collection in product.collections %}              
  133.                                   {% if product.title == collection.title %}
  134.                                     {% for p in collection.products %}
  135.                                      <li style="display:inline;"><a href="/collections/{{ currentCol }}{{ p.url }}" title="{{ p.featured_image.alt | escape }}"><img src="{{ p.images[0] | product_img_url: 'small' }}" /></a></li>
  136.                                     {% endfor %}
  137.                                   {% endif %}
  138.                                 {% endfor %}
  139.                           {% else %}
  140.                             {% for collection in product.collections %}              
  141.                               {% if product.title == collection.title %}
  142.                               {% for p in collection.products %}
  143.                                 <li style="display:inline;"><a href="{{ p.url | within: collection }}" title="{{ p.featured_image.alt | escape }}"><img src="{{ p.images[0] | product_img_url: 'thumb' }}" /></a></li>
  144.                                 {% endfor %}       
  145.                               {% endif %}
  146.                               {% endfor %}
  147.                           {% endif %}
  148.                         </ul>  
  149.                     </div>
  150.                   </dd>
  151.                   <dd class="accordion-navigation">
  152.                     <a class="title" href="#warranty-info">Warranty</a>
  153.                     <div id="warranty-info" class="content">
  154.                       <p>The Herschel Supply Co offers a limited one-year warranty that guarantees all products to be free of manufacturer defects in material and workmanship starting on the date of purchase from an authorized retailer. Herschel Supply will replace any products found to be defective within the range of common and everyday use. Our warranty does not apply to damage caused by accidents and/or wear and tear.</p>
  155.  
  156.                        <!-- <a class="read-more" target="_blank" href="http://www.herschelsupply.com/contact/#warranty">Read More</a> -->
  157.                     </div>
  158.                   </dd>
  159.                   <dd class="accordion-navigation">
  160.                     <a class="title" href="#shipping-info">Shipping</a>
  161.                     <div id="shipping-info" class="content">
  162.                       <p>Estimated shipping times throughout North America:</p>
  163.                     <table style="width:100%;">
  164.                         <thead>
  165.                             <tr>
  166.                             <th width="200">Order Value</th>
  167.                             <th>Standard<br />
  168.                             (4-10 Business Days)</th>
  169.                             <th width="150">Express<br />
  170.                             (2-3 Business Days)</th>
  171.                             </tr>
  172.                         </thead>
  173.                         <tbody>
  174.                             <tr>
  175.                             <td>Up to $100</td>
  176.                             <td>$9.95</td>
  177.                             <td>$25.00</td>
  178.                             </tr>
  179.                             <tr>
  180.                             <td>$100 and Over</td>
  181.                             <td>Free</td>
  182.                             <td>$25.00</td>
  183.                             </tr>
  184.                         </tbody>
  185.                     </table>
  186.  
  187.                       <!-- <a class="read-more" target="_blank" href="http://www.herschelsupply.com/contact/#shipping">Read More</a> -->
  188.                     </div>
  189.                   </dd>
  190.             </dl>
  191.  
  192.             <!-- Insert Breadcrumbs Snippet -->
  193.             {% include 'breadcrumbs' %}
  194.                    
  195.             </div><!-- #product-details -->
  196.        
  197.           </form>
  198.       </div><!-- .product-info -->
  199.   </div><!-- #product -->
  200.  
  201. </div>
  202.  
  203. <!-- Product Features -->
  204. <div class="product-features hide-for-small">      
  205.     <ul class="product-icons clearfix">
  206.       {% include 'product-icons' %}
  207.     </ul>
  208. </div>
  209.  
  210. {% comment %}
  211. <!-- Related Products don't work with Backbone.js because of a document.ready call -->
  212. <div class="row related">
  213.     <div class="large-12 columns">
  214.       <h5 class="text-center">You May Also Like</h5>
  215.       <div recomatic="product" shop="{{shop.permanent_domain}}" product_id="{{product.id}}"></div>
  216.     </div>
  217. </div>
  218. {% endcomment %}
  219.  
  220. {% if product.available %}{% if product.variants.size > 1 %}
  221. <script type="text/javascript">
  222.  
  223.     // <![CDATA[
  224.    var selectCallback = function(variant, selector) {
  225.        if (variant && variant.available == true) {
  226.            $("input#add").removeClass("disabled").removeAttr("disabled");
  227.            $("h2#price span").html(Shopify.formatMoney(variant.price, "{{ shop.money_format }}"));
  228.            if ($("h2#price del").length > 0) {
  229.                $("h2#price del").html(Shopify.formatMoney(variant.compare_at_price, "{{ shop.money_format }}"));
  230.            };
  231.        } else {
  232.            $("input#add").addClass("disabled").attr("disabled", "disabled");
  233.            var message = variant ? "Sold Out" : "Unavailable";
  234.            $("h2#price span").text(message);
  235.            if ($("h2#price del").length > 0) { $("h2#price del").text(""); };
  236.        }
  237.    };
  238.    $(function() {
  239.        new Shopify.OptionSelectors("id", { product: {{ product | json }}, onVariantSelected: selectCallback });
  240.    });
  241.    // ]]>
  242. </script>
  243. {% endif %}{% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement