Skip to content
This repository was archived by the owner on Aug 30, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions assets/timber.scss.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -2170,14 +2170,6 @@ label.error {
/*============================================================================
#Product and Collection Grids
==============================================================================*/
.sold-out {

}

.on-sale {

}

.grid__image {
display: block;
margin: 0 auto ($gutter / 2);
Expand Down
5 changes: 1 addition & 4 deletions snippets/product-grid-item.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
{% assign sold_out = false %}
{% endif %}

{% comment %}
Set a class for sold-out and on-sale items
{% endcomment %}
<div class="grid__item {{ grid_item_width }}{% if sold_out %} sold-out{% endif %}{% if on_sale %} on-sale{% endif %}">
<div class="grid__item {{ grid_item_width }}">

{% comment %}
Link to your product with the 'within: collection' filter for the link to be aware of the collection.
Expand Down
5 changes: 1 addition & 4 deletions templates/collection.list.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@
{% assign sold_out = false %}
{% endif %}

{% comment %}
Set a class for sold-out and on-sale items
{% endcomment %}
<div class="grid__item{% if sold_out %} sold-out{% endif %}{% if on_sale %} on-sale{% endif %}">
<div class="grid__item">

{% comment %}
Link to your product with the 'within: collection' filter for the link to be aware of the collection.
Expand Down
24 changes: 10 additions & 14 deletions templates/product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}">
<meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}">

{% comment %}
Get first variant, or deep linked one
{% endcomment %}
{% assign current_variant = product.selected_or_first_available_variant %}

{% include 'breadcrumb' %}

<div class="grid product-single">
<div class="grid__item large--one-half text-center">
<div class="product-single__photos" id="ProductPhoto">
{% assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
{% assign featured_image = current_variant.featured_image | default: product.featured_image %}
<img src="{{ featured_image | img_url: 'large' }}" alt="{{ featured_image.alt | escape }}" id="ProductPhotoImg">
</div>

Expand All @@ -46,12 +51,6 @@
<h1 itemprop="name">{{ product.title }}</h1>

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

{% comment %}
Get first variant, or deep linked one
{% endcomment %}
{% assign variant = product.selected_or_first_available_variant %}

<meta itemprop="priceCurrency" content="{{ shop.currency }}">

<link itemprop="availability" href="http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}">
Expand Down Expand Up @@ -91,16 +90,13 @@
{% endfor %}
</select>

{% comment %}
Optionally show the 'compare at' or original price of the product.
{% endcomment %}
<span id="ProductPrice" class="h2{% if product.compare_at_price > product.price %} on-sale{% endif %}" itemprop="price">
{{ product.price | money }}
<span id="ProductPrice" class="h2" itemprop="price">
{{ current_variant.price | money }}
</span>

{% if product.compare_at_price > product.price %}
{% if product.compare_at_price_max > product.price %}
<p id="ComparePrice">
{{ 'products.product.compare_at' | t }} {{ product.compare_at_price_max | money }}
{{ 'products.product.compare_at' | t }} {{ current_variant.compare_at_price | money }}
</p>
{% endif %}

Expand Down