Skip to content

Commit bd759e9

Browse files
committed
Merge views subtree
2 parents 4df0b4d + ee090d9 commit bd759e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

template/pages/@/sections/product-block.ejs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,13 @@
143143
<i class="i-shopping-bag mr-1"></i>
144144
<% if (_.state.kit_composition && _.state.kit_composition.length) { %>
145145
<%= _.dictionary('buyKit') %>
146-
<% } else { %>
147-
<%= _.dictionary('buy') %>
146+
<% } else { %>
147+
<% let buyText %>
148+
<% if (Array.isArray(_.widgets)) { %>
149+
<% const productWidget = _.widgets.find(item => item.pkg === '@ecomplus/widget-product') %>
150+
<% buyText = productWidget && productWidget.options.buyText %>
151+
<% } %>
152+
<%= buyText || _.dictionary('buy') %>
148153
<% } %>
149154
</div>
150155
</button>

0 commit comments

Comments
 (0)