1requirejs(['algoliaBundle', 'mage/utils/wrapper'], function (algoliaBundle, wrapper) { 2 algoliaBundle.$(function ($) { 3 var formatFor = ['configurable','bundle','grouped']; 4 5 window.transformHit = wrapper.wrap(transformHit, function (originalAction, hit, price_key, helper) { 6 var hit = originalAction(hit, price_key, helper); 7 8 if (formatFor.indexOf(hit.type_id) != -1) { 9 if (hit['price'] !== undefined) { 10 var priceDiff = false; 11 if (typeof hit['min_price'] !== "undefined" && typeof hit['max_price'] !== "undefined") { 12 priceDiff = hit['min_price'] != hit['max_price']; 13 } 14 15 if (priceDiff) { 16 hit['price'][algoliaConfig.currencyCode]['default_formated'] = algoliaConfig.translations.priceFormat.From + ' ' + hit['price'][algoliaConfig.currencyCode]['default_formated']; 17 } 18 } 19 } 20 return hit; 21 }); 22 }); 23});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.