DiffuSer Posted May 7, 2012 Share Posted May 7, 2012 Does anyone faced with the realization of this task? I tried to update to finalize product.js prices, as well as the choice of combinations, but i am too bad versed in the code Prestashop. Someone help me plz. Link to comment Share on other sites More sharing options...
DiffuSer Posted May 10, 2012 Author Share Posted May 10, 2012 How it is implemented for the combinations? Link to comment Share on other sites More sharing options...
DiffuSer Posted May 16, 2012 Author Share Posted May 16, 2012 Can somebody help me? I make this by using updateDisplay(); from product.js for my multiply var, but... It works onto product page with combinations, like this: http://demo.blackzone.cc/prestashop/product.php?id_product=2 And do not work without combinations: http://demo.blackzone.cc/prestashop/product.php?id_product=1 Anybody, help me pls! Link to comment Share on other sites More sharing options...
pirlgon Posted September 6, 2012 Share Posted September 6, 2012 I just modify the updateDisplay function this way : $('#our_price_display').text(formatCurrency(productPrice * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)); and $('#old_price_display').text(formatCurrency(productPriceWithoutReduction * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)); and added this test on the function's top if(!isInt($('#quantity_wanted').val()) || $('#quantity_wanted').val()<=0){ $('#quantity_wanted').val(1)} isInt look like this : function isInt(x) { var y=parseInt(x); if (isNaN(y)) return false; return x==y && x.toString()==y.toString();} it work great for me. Link to comment Share on other sites More sharing options...
DiffuSer Posted September 6, 2012 Author Share Posted September 6, 2012 (edited) http://demo.blackzon...hp?id_product=8, not working for me. =( Products without combinations set price to zero. Edited September 6, 2012 by DiffuSer (see edit history) Link to comment Share on other sites More sharing options...
tobbecokta Posted April 4, 2013 Share Posted April 4, 2013 I just modify the updateDisplay function this way : $('#our_price_display').text(formatCurrency(productPrice * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)); and $('#old_price_display').text(formatCurrency(productPriceWithoutReduction * $('#quantity_wanted').val(), currencyFormat, currencySign, currencyBlank)); and added this test on the function's top if(!isInt($('#quantity_wanted').val()) || $('#quantity_wanted').val()<=0) { $('#quantity_wanted').val(1) } isInt look like this : function isInt(x) { var y=parseInt(x); if (isNaN(y)) return false; return x==y && x.toString()==y.toString(); } it work great for me. Hi! In which file / folder can i find updateDisplay? Br, Tobias 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