Magento 1.9 – Update Price Frontend Based on Custom Option

custom-optionsmagento-1.9priceproduct

I need to change the frontend price of a product when two custom options dropdowns are selected. I have found some code in this question, but where do I put the files?
change price

UPDATE1:

added below codeto the options file and nothing happens when I adjust the quantity ?

$('#qty').keyup(function(){
alert('test');
});

UPDATE2

jQuery.noConflict();
 $('#qty').keyup(function(){
    alert('test');
    });

but now report 'Function expected'

UPDATE 3
I have the test code working now, Thanks. The real code doesnt work as expected, I want to update the price on the product page. This should equal the value of the dropdown multiplied x 4. Currently the code updates the price by adding 50 to it.

jQuery('#select_3').removeAttr('onchange').change(function(){
price=50;
optionsPrice.chagePrice('opConfig',price);
optionsPrice.reload();

Best Answer

About your code, I sppose you meant

jQuery('#select_3').removeAttr('onchange').change(function(){
    var price=50; //add var declaration
    optionsPrice.changePrice('opConfig',price);
    optionsPrice.reload();
}); //close the change binding

But where does optionsPrice come from? Pay a closer attention to the answers, I won't explain them here: your topic would be marked as 'duplicate' and you should ask for explanations on the original topic.

Related Topic