habross Posted May 23, 2016 Share Posted May 23, 2016 Ahoj, mám prestashop 1.6.1.5 a použil jsem kód pro zobrazení ceny s DPH a zároveň bez DPH na stránce produktu. Problém nastal, když jsem použil specific price (slevu) u produktu. Všechny ceny se mění i v různých kombinacích, ale cenu bez daně to počítá stále ze základní ceny a ne ze zlevněné. Máte někdo nápad jak to vyřešit? díky Link to comment Share on other sites More sharing options...
tuk66 Posted May 23, 2016 Share Posted May 23, 2016 To záleží na tom, co je to za kód. Pro dvojí ceny je potřeba vždy upravit více souborů, vč. product.js. Link to comment Share on other sites More sharing options...
Luigo05 Posted July 13, 2016 Share Posted July 13, 2016 Mám ten samý problém. muj product.js. Nevíte mi poradit? if (priceWithDiscountsDisplay > 0) { if(findSpecificPrice()){ $('#our_price_display').text(findSpecificPrice()).trigger('change'); } else{ $('#our_price_display').text(formatCurrency(priceWithDiscountsDisplay, currencyFormat, currencySign, currencyBlank)).trigger('change'); $('#our_price_displaybezdane').text(formatCurrency(basePriceWithoutTax * currencyRate, currencyFormat, currencySign, currencyBlank)); } } else { $('#our_price_display').text(formatCurrency(0, currencyFormat, currencySign, currencyBlank)).trigger('change'); } // If the calculated price (after all discounts) is different than the base price // we show the old price striked through if (priceWithDiscountsDisplay.toFixed(2) != basePriceDisplay.toFixed(2)) { $('#old_price_display span.price').text(formatCurrency(basePriceDisplay, currencyFormat, currencySign, currencyBlank)); $('#old_price, #old_price_display, #old_price_display_taxes').removeClass('hidden').show(); // Then if it's not only a group reduction we display the discount in red box if (priceWithDiscountsWithoutTax != priceWithGroupReductionWithoutTax) { if (combination.specific_price.reduction_type == 'amount') { $('#reduction_amount_display').html('-' + formatCurrency(discountValue, currencyFormat, currencySign, currencyBlank)); $('#reduction_amount').show(); } else { var toFix = 2; if ((parseFloat(discountPercentage).toFixed(2) - parseFloat(discountPercentage).toFixed(0)) == 0) toFix = 0; $('#reduction_percent_display').html('-' + parseFloat(discountPercentage).toFixed(toFix) + '%'); $('#reduction_percent').show(); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now