I am able to do it as specified. But in javascript still $ is appending as shown below in demo site:-
Code: Select all
function updatePriceDisplay() {
var productOptions = getProductOptionData();
var selectedProductOptions = [];
for (var i = 0; i < productOptions.length; i++) {
selectedProductOptions.push(productOptions[i].selectedValue); // add selected value to array
}
var productOptionPricing = getPricingData();
var price;
for (var i = 0; i < productOptionPricing.length; i++) {
var pricing = productOptionPricing[i];
if ($(pricing.selectedOptions).not(selectedProductOptions).length == 0 && $(selectedProductOptions).not(pricing.selectedOptions).length == 0) {
[b]price = '$' + pricing.price;[/b]
break;
}
So if in future someone wants to use demo site as a customization starting point above method should also be updated thanks