How to change price according to option on product in opencart 3.x

Login into opencart admin, select theme editor from design sidebar menu. Then
1. choose your store -> Default
2. choose template -> Product
3. open file product.twig
and write this below code:

modify line number 186

and add javascript/jquery code below file

 var orgprice=$(".fprice").html().substring(1);
function CalcOption()
  {
  var symb=$(".fprice").html().substring(0,1);

   var value=0;
   $("input[type=radio]:checked").each(function() {
       value += parseFloat($(this).attr("id").substring(1).replace(",", ""));
   });
  value=parseFloat(orgprice)+parseFloat(value);
 $(".fprice").html(symb+value.toFixed(2));
  }


Leave a Reply