Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/vex-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/products/single.html')
-rw-r--r--layouts/products/single.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/products/single.html b/layouts/products/single.html
index 201ccd7..1b42c74 100644
--- a/layouts/products/single.html
+++ b/layouts/products/single.html
@@ -20,6 +20,7 @@
<p class="price py-4">{{if .Params.discount_price}}{{site.Params.currency}}{{.Params.discount_price}}{{else}}{{site.Params.currency}}{{.Params.price}}{{end}}
{{if .Params.discount_price}}<s class="price">{{site.Params.currency}}{{ .Params.price }}</s>{{end}}
</p>
+ {{ if site.Params.snipcart.enable }}
<button class="snipcart-add-item btn btn-main mb-5"
data-item-id="{{.Title | urlize}}__{{if .Params.discount_price}}{{.Params.discount_price}}{{else}}{{.Params.price}}{{end}}"
data-item-name="{{.Title}}"
@@ -34,6 +35,12 @@
data-item-custom2-options="{{range $index, $element:= .Params.sizes}}{{if eq $index 0}}{{. | title}}{{else}}|{{. | title}}{{end}}{{end}}"
{{end}}>{{i18n "add_to_cart"}}
</button>
+ {{ else }}
+ {{ with .Params.button_link}}
+ <a class="btn btn-main mb-5" href="{{ . | absURL }}">{{i18n "add_to_cart"}}</a>
+ {{ end }}
+ {{ end }}
+
<div class="content">{{.Content}}</div>
</div>
</div>