1window.gtm_ecommerce_pro = { 2 items: { 3 cart: [], 4 byId: {}, 5 byProductId: {}, 6 byAttributeId: [], 7 }, 8 extensions: {}, 9 getItemsFromCart() { 10 return this.items.cart; 11 }, 12 getItemByProductId(productId) { 13 if (undefined === this.items.byProductId[productId]) { 14 console.warn('gtm_ecommerce_pro.getItemByProductId('+productId+') - undefined'); 15 16 return {}; 17 } 18 19 return this.items.byProductId[productId]; 20 }, 21 getItemByItemId(itemId) { 22 if (undefined === this.items.byId[itemId]) { 23 console.warn('gtm_ecommerce_pro.getItemByItemId('+itemId+') - undefined'); 24 25 return {}; 26 } 27 28 return this.items.byId[itemId]; 29 }, 30 getItemsByAttributes() { 31 return this.items.byAttributeId; 32 } 33}
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.