We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4df0b4d + ee090d9 commit bd759e9Copy full SHA for bd759e9
template/pages/@/sections/product-block.ejs
@@ -143,8 +143,13 @@
143
<i class="i-shopping-bag mr-1"></i>
144
<% if (_.state.kit_composition && _.state.kit_composition.length) { %>
145
<%= _.dictionary('buyKit') %>
146
- <% } else { %>
147
- <%= _.dictionary('buy') %>
+ <% } else { %>
+ <% 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') %>
153
<% } %>
154
</div>
155
</button>
0 commit comments