Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Cart discounts #29

Merged
merged 4 commits into from
Oct 24, 2016
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
7 changes: 5 additions & 2 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Zur Kasse",
"empty": "Ihr Einkaufswagen ist im Moment leer.",
"continue_browsing_html": "Mit der Suche <a href=\"/collections/all\">hier</a> fortfahren.",
"item_quantity": "Produktmenge"
"item_quantity": "Produktmenge",
"savings": "Sie sparen"
},
"label": {
"product": "Artikel",
"price": "Preis",
"quantity": "Menge",
"total": "Gesamt"
"total": "Gesamt",
"discounted_price": "ermäßigter Preis",
"original_price": "Originalpreis"
}
},
"collections": {
Expand Down
7 changes: 5 additions & 2 deletions src/locales/en.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Check Out",
"empty": "Your cart is currently empty.",
"continue_browsing_html": "Continue browsing <a href=\"/collections/all\">here</a>.",
"item_quantity": "Item quantity"
"item_quantity": "Item quantity",
"savings": "You're saving"
},
"label": {
"product": "Product",
"price": "Price",
"quantity": "Quantity",
"total": "Total"
"total": "Total",
"discounted_price": "Discounted price",
"original_price": "Original price"
}
},
"collections": {
Expand Down
7 changes: 5 additions & 2 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Finalizar pedido",
"empty": "Su carrito actualmente está vacío.",
"continue_browsing_html": "Continúe explorando <a href=\"/collections/all\">aquí</a>.",
"item_quantity": "Cantidad de artículo"
"item_quantity": "Cantidad de artículo",
"savings": "Está ahorrando"
},
"label": {
"product": "Producto",
"price": "Precio",
"quantity": "Cantidad",
"total": "Total"
"total": "Total",
"discounted_price": "Discounted price",
"original_price": "Original price"
}
},
"collections": {
Expand Down
7 changes: 5 additions & 2 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Procéder au paiement",
"empty": "Votre panier est vide.",
"continue_browsing_html": "<a href=\"/collections/all\">Retourner au magasinage</a>.",
"item_quantity": "Quantité de l'article"
"item_quantity": "Quantité de l'article",
"savings": "Vous économisez"
},
"label": {
"product": "Produit",
"price": "Prix",
"quantity": "Quantité",
"total": "Total"
"total": "Total",
"discounted_price": "Discounted price",
"original_price": "Original price"
}
},
"collections": {
Expand Down
7 changes: 5 additions & 2 deletions src/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Fechar pedido",
"empty": "Seu carrinho está vazio no momento.",
"continue_browsing_html": "Continue navegando <a href=\"/collections/all\">aqui</a>.",
"item_quantity": "Quantidade de itens"
"item_quantity": "Quantidade de itens",
"savings": "Você está economizando"
},
"label": {
"product": "Produto",
"price": "Preço",
"quantity": "Quantidade",
"total": "Total"
"total": "Total",
"discounted_price": "Preço com desconto",
"original_price": "Preço original"
}
},
"collections": {
Expand Down
7 changes: 5 additions & 2 deletions src/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
"checkout": "Check-Out",
"empty": "O seu carrinho de compras está neste momento vazio.",
"continue_browsing_html": "Continue a ver <a href=\"/collections/all\">aqui</a>.",
"item_quantity": "Quantidade de itens"
"item_quantity": "Quantidade de itens",
"savings": "Está a poupar"
},
"label": {
"product": "Produto",
"price": "Preço",
"quantity": "Quantidade",
"total": "Total"
"total": "Total",
"discounted_price": "Preço com desconto",
"original_price": "Preço original"
}
},
"collections": {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tools/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
clear: both;
}

// sass-lint:disable no-misspelled-properties
// sass-lint:disable
*zoom: 1;
}

Expand Down
12 changes: 11 additions & 1 deletion src/templates/cart.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@
</a>
</td>
<td data-label="{{ 'cart.label.price' | t }}">
{{ item.price | money }}
{% if item.original_line_price != item.line_price %}
<span class="visually-hidden">{{ 'cart.label.discounted_price' | t }}</span>
{{ item.price | money }}
<span class="visually-hidden">{{ 'cart.label.original_price' | t }}</span>
<s>{{ item.original_price | money }}</s>
{% else %}
{{ item.price | money }}
{% endif %}
</td>
<td data-label="{{ 'cart.label.quantity' | t }}">
<input type="number"
Expand All @@ -86,6 +93,9 @@

<p>{{ 'cart.general.subtotal' | t }}</p>
<p>{{ cart.total_price | money }}</p>
{% if cart.total_discounts > 0 %}
<p>{{ 'cart.general.savings' | t }} {{ cart.total_discounts | money }}</p>
{% endif %}
<p>{{ 'cart.general.shipping_at_checkout' | t }}</p>
<input type="submit" name="update" value="{{ 'cart.general.update' | t }}">
<input type="submit" name="checkout" class="btn" value="{{ 'cart.general.checkout' | t }}">
Expand Down