2018-05-12 08:44:45 +02:00
|
|
|
<a class="col-6 col-lg-3" href="{{ .RelPermalink }}" style="color: inherit;">
|
2018-11-10 22:24:15 +01:00
|
|
|
<img class="b-lazy img-fluid text-center" data-src="{{ .Params.thumbnailImage | absURL }}" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
|
2018-05-12 08:44:45 +02:00
|
|
|
<p class="text-left">
|
|
|
|
<span style="font-size: 13px">{{ .Params.title }}</span>
|
|
|
|
<br/>
|
|
|
|
<span style="font-size: 16px">
|
2018-06-02 15:01:16 +02:00
|
|
|
{{ if .Params.actualPrice }}
|
|
|
|
{{ $.Scratch.Set "minimumPrice" (.Params.actualPrice | string) }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $.Scratch.Set "minimumPrice" "999999999999999"}}
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Params.inStock }}
|
|
|
|
{{ $.Scratch.Set "inStock" (.Params.inStock | string) }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $.Scratch.Set "inStock" "false" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ range .Params.variants }}
|
|
|
|
{{ $variantActualPrice := (.actualPrice | replaceRE "[^0-9.]+" "" | float ) }}
|
|
|
|
{{ $actualPrice := ($.Scratch.Get "minimumPrice" | replaceRE "[^0-9.]+" "" | float) }}
|
|
|
|
{{ if lt $variantActualPrice $actualPrice }}
|
|
|
|
{{ $.Scratch.Set "minimumPrice" (.actualPrice | string)}}
|
|
|
|
{{ $.Scratch.Set "isMinimumVariantPrice" "true"}}
|
|
|
|
{{ end }}
|
|
|
|
{{ if .inStock }}
|
|
|
|
{{ $.Scratch.Set "inStock" "true" }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ if eq ($.Scratch.Get "isMinimumVariantPrice") "true" }} From {{ end }}
|
|
|
|
{{ $.Scratch.Get "minimumPrice" }}
|
|
|
|
{{ if not (eq ($.Scratch.Get "inStock") "true")}} <span class="font-weight-bold">— Sold Out</span> {{ end }}
|
2018-05-12 08:44:45 +02:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
</a>
|