Skip to content

Commit

Permalink
Don’t attempt to show prices for products without price
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshadura committed Nov 6, 2022
1 parent bbedf83 commit cec3e44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/products/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<div class="card-body">
<a href="{{ .Permalink }}" class="h4">{{ .Title }}</a>
<p>{{ .Params.Description }}</p>
{{ if .Params.Price }}
<div class="mb-4">
{{ if .Params.PriceBefore }}
<s>{{ site.Params.currencySymbol }}{{ .Params.PriceBefore }}</s>
Expand All @@ -36,6 +37,7 @@
data-item-price="{{ .Params.Price }}" data-item-url="{{ .Permalink }}" data-item-description="{{ .Description }}">
Add to cart
</button>
{{ end }}
</div>
</div>
</div>
Expand Down

0 comments on commit cec3e44

Please sign in to comment.