diff --git a/assets/js/theme/common/product-details.js b/assets/js/theme/common/product-details.js index f9d71addc5..224444d11a 100644 --- a/assets/js/theme/common/product-details.js +++ b/assets/js/theme/common/product-details.js @@ -70,6 +70,7 @@ export default class ProductDetails { $input: $('[data-product-stock]', $scope), }, $sku: $('[data-product-sku]'), + $upc: $('[data-product-upc]'), quantity: { $text: $('.incrementTotal', $scope), $input: $('[name=qty\\[\\]]', $scope), @@ -370,6 +371,11 @@ export default class ProductDetails { viewModel.$sku.text(data.sku); } + // If UPC is available + if (data.upc) { + viewModel.$upc.text(data.upc); + } + // if stock view is on (CP settings) if (viewModel.stock.$container.length && _.isNumber(data.stock)) { // if the stock container is hidden, show