<% let clipLength = 30 %> <% let oroshoppinglist = _.macros('oroshoppinglist') %>
<% 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: productId ? productUrl(productId, variantId) : null, name: name, popover_image_src: obj.image}) %> <% } else { %>
<%= oroshoppinglist.renderProductItemName({clip: true, link: productId ? productUrl(productId, variantId) : null, name: name, popover_image_src: obj.image}) %>
<% } %>
<% 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 (obj.warnings && obj.warnings.length || obj.errors && obj.errors.length || (obj.success && obj.message)) { %>
<%= oroshoppinglist.renderWarnings({warnings: obj.warnings}) %> <%= oroshoppinglist.renderErrors({errors: obj.errors}) %> <% if (obj.success && obj.message) { %> <% } %>
<% } %> <% if (obj.filteredOutData) { %> <%= oroshoppinglist.renderMoreVariantsButton(filteredOutData) %> <% } %>