Abs-Pumpe Mercedes C A2054313112 A2059012800 Ate 1538
Teilenummern: 10.0220-0402.4, 10.0622-36Price230565() { const regularPriceInclTaxKey = 'oldPrice', regularPriceExclTaxKey = 'baseOldPrice', finalPriceInclTaxKey = 'finalPrice', finalPriceExclTaxKey = 'basePrice'; function calculateCustomOptionPrices(activeCustomOptions, customOptionPrices) { return activeCustomOptions.reduce((priceAccumulator, activeCustomOptionId) => { const customOptionPrice = customOptionPrices[activeCustomOptionId]; if (customOptionPrice) { return Number.parseFloat(priceAccumulator) + Number.parseFloat(customOptionPrice); } return priceAccumulator; }, 0); } return { regularPriceKey: regularPriceInclTaxKey, finalPriceKey: finalPriceInclTaxKey, activeProductsPriceData: false, initialFinalPrice: 102.57723577236, showNetPrice: sessionStorage.getItem('showNetPrice') === 'true', taxRate: 0, initialNetPrice: 102.57723577236, calculatedFinalPrice: false, calculatedFinalPriceWithCustomOptions: false, initialTierPrices: [], showRegularPriceLabel: false, customOptionPrices: [], initialBasePrice: 102.57723577236, calculatedBasePrice: false, customOptionBasePrices: [], calculatedBasePriceWithCustomOptions: false, activeCustomOptions: [], qty: 1, hasDiscount: false, updateCustomOptionActive(data) { let activeCustomOptions = this.activeCustomOptions; const customOptionId = data.customOptionId; if (data.active) { if (!activeCustomOptions.includes(customOptionId)) { activeCustomOptions.push(data.customOptionId); } } else { if (customOptionId && activeCustomOptions.includes(customOptionId)) { let index = activeCustomOptions.indexOf(customOptionId); activeCustomOptions.splice(index, 1); } } this.calculateFinalPriceWithCustomOptions() }, updateCustomOptionPrices(prices, basePrices) { if (prices) { this.customOptionPrices = prices; } if (basePrices) { this.customOptionBasePrices = basePrices; } this.calculateFinalPriceWithCustomOptions(); }, calculateFinalPrice() { const findApplicableTierPrice = (initialPrice, withTax) => { if (this.activeProductsPriceData && this.activeProductsPriceData.tierPrices) { const key = withTax ? 'price' : 'basePrice' return this.activeProductsPriceData.tierPrices.reduce((acc, tierPrice) => { if (this.qty >= tierPrice.qty && tierPrice[key] < acc) { return tierPrice[key]; } return acc; }, this.activeProductsPriceData[withTax ? finalPriceInclTaxKey : finalPriceExclTaxKey].amount); } else { const key = withTax ? 'price_incl_tax' : 'price_excl_tax'; return Object.values(this.initialTierPrices).reduce((acc, tierPrice) => { if (this.qty >= tierPrice.price_qty && tierPrice[key] < acc) { return tierPrice[key]; } return acc; }, initialPrice); } } this.calculatedFinalPrice = findApplicableTierPrice(this.initialFinalPrice, true); window.dispatchEvent(new CustomEvent("update-product-final-price", {detail: this.calculatedFinalPrice})); this.calculatedBasePrice = findApplicableTierPrice(102.57723577236, false); window.dispatchEvent(new CustomEvent("update-product-base-price", {detail: {basePrice: this.calculatedBasePrice}})); }, calculatePriceLabelVisibility() { this.showRegularPriceLabel = (this.calculatedFinalPrice === this.activeProductsPriceData[this.regularPriceKey].amount) && this.activeProductsPriceData.isMinimalPrice; }, calculateFinalPriceWithCustomOptions() { const finalPrice = this.calculatedFinalPrice || this.initialFinalPrice; this.calculatedFinalPriceWithCustomOptions = finalPrice + this.getCustomOptionPrice(); const basePrice = this.calculatedBasePrice || this.initialBasePrice; this.calculatedBasePriceWithCustomOptions = basePrice + this.getCustomOptionBasePrice(); }, getCustomOptionPrice() { return calculateCustomOptionPrices(this.activeCustomOptions, this.customOptionPrices); }, getCustomOptionBasePrice() { return calculateCustomOptionPrices(this.activeCustomOptions, this.customOptionBasePrices); }, getFormattedFinalPrice() { return hyva.formatPrice( this.calculatedFinalPriceWithCustomOptions || this.calculatedFinalPrice || this.initialFinalPrice ) }, getFormattedBasePrice() { return hyva.formatPrice( this.calculatedBasePriceWithCustomOptions || this.calculatedBasePrice || this.initialBasePrice ) }, getFormattedNetPrice() { return hyva.formatPrice( this.calculatedBasePriceWithCustomOptions || this.calculatedBasePrice || this.initialNetPrice ) }, getFormattedDisplayPrice() { return this.showNetPrice ? this.getFormattedNetPrice() : this.getFormattedFinalPrice(); }, toggleNetPrice() { this.showNetPrice = !this.showNetPrice; sessionStorage.setItem('showNetPrice', this.showNetPrice.toString()); window.dispatchEvent(new CustomEvent('toggle-net-price', { detail: this.showNetPrice })); }, isPriceHidden() { const finalPrice = this.calculatedFinalPriceWithCustomOptions || this.calculatedFinalPrice || this.initialFinalPrice; return false && finalPrice === 0; }, eventListeners: { ['@update-prices-230565.window'](event) { this.activeProductsPriceData = event.detail; this.hasDiscount = this.activeProductsPriceData[finalPriceKey].amount < this.activeProductsPriceData[regularPriceKey].amount; this.calculateFinalPrice(); this.calculateFinalPriceWithCustomOptions(); this.calculatePriceLabelVisibility(); }, ['@update-qty-230565.window'](event) { this.qty = event.detail; this.calculateFinalPrice(); this.calculateFinalPriceWithCustomOptions(); }, ['@update-custom-option-active.window'](event) { this.updateCustomOptionActive(event.detail); }, ['@update-custom-option-prices.window'](event) { this.updateCustomOptionPrices(event.detail); }, ['@update-custom-option-base-prices.window'](event) { this.updateCustomOptionPrices(null, event.detail); }, ['@toggle-net-price.window'](event) { this.showNetPrice = event.detail; } } } }
Bestelle innerhalb von , !
Standard
Express
0% Verwechslungsrisiko
Gib bei der Bestellung deine FIN (VIN) an – unsere Spezialisten prüfen vor dem Versand, ob das Teil zu deinem Fahrzeug passt.
Problemloser Rückversand
30 Tage für Rückgabe oder Umtausch Ihres Einkaufs
Verlängerte Garantie
Bis zu 2 Jahre Garantie auf ausgewählte Produkte
Flexible Zahlungs‑ und Versandoptionen
Bequeme Zahlungsmethoden passend zu Ihren Bedürfnissen