Skip to content

Commit

Permalink
Merge branch 'release/1.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Jul 14, 2016
2 parents 135e6bb + 315f033 commit 37d2ae2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.7.0
## 07/14/2016

1. [](#improved)
* Added a `data-item-image` attribute, to put a product thumb in the cart

# v1.6.0
## 05/03/2016

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Snipcart
version: 1.6.0
version: 1.7.0
description: "This plugin wraps the very good [Snipcart](https://snipcart.com/) application and let's you turn your Grav site into a shopping cart very easily."
icon: shopping-cart
author:
Expand Down
6 changes: 6 additions & 0 deletions templates/partials/snipcart_detail_item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
data-item-name="{{ page.header.title }}"
data-item-price="{{ page.header.price }}"
data-item-url="{{ page.url }}"
{% spaceless %}
{% if snipcart_image %}
data-item-image="{{ snipcart_image.cropResize(50,50).url }}"
{% endif %}
{% endspaceless %}

>
<i class="fa fa-shopping-cart"></i> Add to Cart
</a>
Expand Down
6 changes: 6 additions & 0 deletions templates/partials/snipcart_product_item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
data-item-name="{{ page.header.title }}"
data-item-price="{{ page.header.price }}"
data-item-url="{{ page.url }}"
{% spaceless %}
{% if snipcart_image %}
data-item-image="{{ snipcart_image.cropResize(50,50).url }}"
{% endif %}
{% endspaceless %}

>
<i class="fa fa-shopping-cart"></i> Add
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/snipcart.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% extends 'partials/snipcart_base.html.twig' %}

{% block content %}
Expand All @@ -19,3 +18,4 @@
</div>
</div>
{% endblock %}

0 comments on commit 37d2ae2

Please sign in to comment.