<% let clipLength = 30 %> <% let oroshoppinglist = _.macros('oroshoppinglist') %>
<%= oroshoppinglist.renderProductItemImage({ src: obj.image, placeholder: _metadata.image_placeholder, productId: variantId ? variantId : productId, title: sku, alt: name, isConfigurable: obj.isConfigurable, _cid: _cid }) %>
<% let inventoryStatusLabel = function (inventoryStatus) { %> <% return _metadata.inventory_statuses[inventoryStatus] ? _metadata.inventory_statuses[inventoryStatus] : inventoryStatus %> <% } %> <% if (!obj._isVariant) { %> <% let productUrl = function (productId, variantId) { %> <% return oroshoppinglist.routing.generate('oro_product_frontend_product_view', variantId ? {id: productId, variantProductId: variantId} : {id: productId} ) %> <% } %>
<% if (name.length <= clipLength) { %> <%= oroshoppinglist.renderProductItemName({link: productUrl(productId, variantId), name: name}) %> <% } else { %>
<%= oroshoppinglist.renderProductItemName({clip: true, link: productUrl(productId, variantId), name: name}) %>
<% } %>
<% if (obj.sku || obj.inventoryStatus) { %>
<% if (obj.sku) { %> <%- sku %> <% } %> <% if (!isConfigurable) { %> <%= oroshoppinglist.renderInventoryStatus({name: inventoryStatus, label: inventoryStatusLabel(inventoryStatus), isLowInventory: isLowInventory}) %> <% } %>
<% } %> <% if (productConfiguration) { %>
<% _.each(productConfiguration, function(field) { %>
<%- field.label %>: <%- field.value %>
<% }) %>
<% } %> <% if (notes) { %>
<%= oroshoppinglist.renderNotes({notes: notes}) %>
<% } %> <% } else { %>
<%- sku %> <%= oroshoppinglist.renderInventoryStatus({name: inventoryStatus, label: inventoryStatusLabel(inventoryStatus), isLowInventory: isLowInventory}) %>
<% _.each(productConfiguration, function(field) { %>
<%- field.label %>: <%- field.value %>
<% }) %>
<% if (notes) { %>
<%= oroshoppinglist.renderNotes({notes: notes}) %>
<% } %> <% } %>
<% if (isUpcoming || obj.errors && obj.errors.length || (obj.success && obj.message)) { %>
<%= oroshoppinglist.renderUpcoming({isUpcoming: isUpcoming, availabilityDate: obj.availabilityDate}) %> <%= oroshoppinglist.renderErrors({errors: obj.errors}) %> <% if (obj.success && obj.message) { %> <% } %>
<% } %> <% if (obj.filteredOutData) { %> <%= oroshoppinglist.renderMoreVariantsButton(filteredOutData) %> <% } %>