Jump to content

Total price


Recommended Posts

Hi,

 

please can you tell me, how to edit this script? (theme/default/bootstrap/js/product.js)

 

line 251

if (!isNaN(currentVal) && currentVal < quantityAvailableT) {
$('input[name=+fieldName+]').val(currentVal + 1).trigger('keyup');
var total = (productPrice * (currentVal + 1));
var total = total.toFixed(2);
$('p.our_price_display').fadeOut();    
$
('span#our_price_display').text(total + ' ' + currencySign)
$('p.our_price_display').fadeIn();
} else {
$('input[name=+fieldName+]').val(quantityAvailableT);
}

line 269
replace
if (!isNaN(currentVal) && currentVal > 1) {
$('input[name=+fieldName+]').val(currentVal - 1).trigger('keyup');
var total = (productPrice * (currentVal - 1));
var total = total.toFixed(2);
$('p.our_price_display').fadeOut();    
$
('span#our_price_display').text(total + ' ' + currencySign)
$('p.our_price_display').fadeIn();
} else {
$('input[name=+fieldName+]').val(1);
}
 

To show total price, which works. That skrit works only in case when I don´t use "unit price". As you can see in attachement, there should be price "190,0 Kč" but there is a price which is set up as default. When you add it into shopping card and check it, there is right price, so I hope that there is value which can display correct price. Please can you help me to solve that? Thank you very much. http://eshop.bohemiahair.cz/index.php?id_product=47&controller=product#/delka_pramenu-56_60_cm/struktura_vlasu-rovne

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...