From 51d8ef576b25cd4691db8767b7d0de2d53d4815a Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 3 Dec 2012 14:47:38 +0100 Subject: [PATCH] //small fix with js on product page --- themes/default/js/product.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/default/js/product.js b/themes/default/js/product.js index fd738d6da..8f787e60b 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -147,7 +147,7 @@ function findCombination(firstTime) //update display of the availability of the product AND the prices of the product function updateDisplay() { - if (!selectedCombination['unavailable'] && quantityAvailable > 0 && productAvailableForOrder === 1) + if (!selectedCombination['unavailable'] && quantityAvailable > 0 && parseInt(productAvailableForOrder) === 1) { //show the choice of quantities $('#quantity_wanted_p:hidden').show('slow'); @@ -165,6 +165,7 @@ function updateDisplay() //availability value management if (availableNowValue !== '') { + //update the availability statut of the product $('#availability_value').removeClass('warning_inline'); $('#availability_value').text(availableNowValue); @@ -689,7 +690,7 @@ function initLocationChange(time) function checkUrl() { - if (original_url !== window.location || first_url_check) + if (original_url != window.url || first_url_check) { first_url_check = false; url = window.location+'';