Skip to content

Commit

Permalink
fix: properly checking promotional prices
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Aug 29, 2023
1 parent ca74a5d commit 45ede38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions views/promo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<%= ecomUtils.name(product) %>
</span>
</h1>
<% if (product.base_price) { %>
<% if (ecomUtils.onPromotion(product)) { %>
<div>
<span style="color:#333333;">
<p>de <%= ecomUtils.formatMoney(product.base_price) %> </p>
Expand All @@ -102,7 +102,7 @@
<%= ecomUtils.formatMoney(product.price) %>
</span>
</h2>
<% } else{ %>
<% } else { %>
<h2>
<span style="color:#333333;">
<%= ecomUtils.formatMoney(ecomUtils.price(product)) %>
Expand Down Expand Up @@ -193,4 +193,4 @@
</body>
</html>
</html>
6 changes: 3 additions & 3 deletions views/stock.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
height="100%" bgcolor="">
<h1 style="padding-bottom: 10px;"><span style="color:#333333;">
<%= ecomUtils.name(product) %></span></h1>
<% if (product.base_price) { %>
<% if (ecomUtils.onPromotion(product)) { %>
<div><span style="color:#333333;">
<p>de <%= ecomUtils.formatMoney(product.base_price) %> </p>
</span>
</div>
<h2><span style="color:#333333;">por
<%= ecomUtils.formatMoney(product.price) %></span></h2>
<% } else{ %>
<% } else { %>
<h2><span style="color:#333333;">
<%= ecomUtils.formatMoney(ecomUtils.price(product)) %></span></h2>
<% } %>
Expand Down Expand Up @@ -181,4 +181,4 @@
</body>
</html>
</html>

0 comments on commit 45ede38

Please sign in to comment.