function customerPricing()
{
var productForm = document.orderForm;
var productDimensions = productForm.selectSize.value;
var productColors = productForm.selectColors.value;
var productStockId = productForm.productStock.value;
var productQuantity = productForm.selectQuantity.value;
for(i=0; i<=pl_pPrice.length; i++)
{
if(pl_pSizeId[i] == productDimensions && pl_colorsId[i] == productColors && pl_pStockId[i] == productStockId && pl_pQuantity[i] == productQuantity)
{
document.getElementById("displayPrice").innerHTML = formatCurrency(pl_pPrice[i]);
}
}
}
function customerPricing()
{
var productForm = document.orderForm;
var productDimensions = $('#selectSize').val();
var productColors = $('#selectColors').val();
var productStockId = $('#productStock').val();
var productQuantity = $('#selectQuantity').val();
for(i=0; i<=pl_pPrice.length; i++)
{
if(pl_pSizeId[i] == productDimensions && pl_colorsId[i] == productColors && pl_pStockId[i] == productStockId && pl_pQuantity[i] == productQuantity)
{
document.getElementById("displayPrice").html( formatCurrency(pl_pPrice[i]) );
}
}
}
<div class="content_product_price round_corners_5px">
<h2 class="float_left"><div id="displayPrice" class="displayPrice"><? echo $productBasePrice; ?></div></h2> <h2 class="float_left cad">CAD</h2>
<input name="productPrice" type="hidden" id="productPrice" value="<? //echo $myProductPrice; ?>" />
<input name="totalProductPrice" type="hidden" id="totalProductPrice" value="<? //echo $myProductPrice; ?>" />
<div class="clear_all"></div>
</div>
Javascript:function customerPricing()
{
var productForm = document.orderForm;
var productDimensions = productForm.selectSize.value;
var productColors = productForm.selectColors.value;
var productStockId = productForm.productStock.value;
var productQuantity = productForm.selectQuantity.value;
for(i=0; i<=pl_pPrice.length; i++)
{
if(pl_pSizeId[i] == productDimensions && pl_colorsId[i] == productColors && pl_pStockId[i] == productStockId && pl_pQuantity[i] == productQuantity)
{
$("#displayPrice").html("<span class='displayPriceInDiv'>" + formatCurrency(pl_pPrice[i]) + "</span>");
}
}
document.getElementById("displayPrice").className = "displayPrice";
}
CSS:.content_product_price {display:block; margin:15px 15px 0 0; border:solid 1px #ccc; width:174px; padding:25px 25px 20px 60px; text-align:center;}
.content_product_price h2 {font-size:30px; color:#F00; text-align:center; margin:6px 0 0 0;}
.content_product_price h2.cad {font-size:20px; color:#F00; text-align:center; margin:4px 0 0 7px;}
.content_product_price #displayPrice {font-family:Tahoma, Geneva, sans-serif; font-size:30px; color:#F00; text-align:center; margin:6px 0 0 0;}
.content_product_price .displayPriceInDiv {font-family:Tahoma, Geneva, sans-serif; font-size:30px; color:#F00; text-align:center; margin:6px 0 0 0;}
.content_product_price #currency {font-size:30px; color:#F00; text-align:center; margin:6px 0 0 0;}