From 45ede389cd97477acf2a1b8fd5ce2427fefe5fd0 Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Tue, 29 Aug 2023 18:12:56 -0300 Subject: [PATCH] fix: properly checking promotional prices --- views/promo.ejs | 6 +++--- views/stock.ejs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/views/promo.ejs b/views/promo.ejs index 069c6bd..944e73f 100644 --- a/views/promo.ejs +++ b/views/promo.ejs @@ -90,7 +90,7 @@ <%= ecomUtils.name(product) %> - <% if (product.base_price) { %> + <% if (ecomUtils.onPromotion(product)) { %>

de <%= ecomUtils.formatMoney(product.base_price) %>

@@ -102,7 +102,7 @@ <%= ecomUtils.formatMoney(product.price) %>
- <% } else{ %> + <% } else { %>

<%= ecomUtils.formatMoney(ecomUtils.price(product)) %> @@ -193,4 +193,4 @@ - \ No newline at end of file + diff --git a/views/stock.ejs b/views/stock.ejs index 5f6d213..b5f9c6b 100644 --- a/views/stock.ejs +++ b/views/stock.ejs @@ -86,14 +86,14 @@ height="100%" bgcolor="">

<%= ecomUtils.name(product) %>

- <% if (product.base_price) { %> + <% if (ecomUtils.onPromotion(product)) { %>

de <%= ecomUtils.formatMoney(product.base_price) %>

por <%= ecomUtils.formatMoney(product.price) %>

- <% } else{ %> + <% } else { %>

<%= ecomUtils.formatMoney(ecomUtils.price(product)) %>

<% } %> @@ -181,4 +181,4 @@ - \ No newline at end of file +