Update price automatically when quantity changed on product page Magento

前端 未结 4 2086
眼角桃花
眼角桃花 2020-12-20 05:21

I am looking to have the product price automatically updated based on the quantity the customer has chosen.

Currently when you choose a custom option in magento the

4条回答
  •  眼角桃花
    2020-12-20 06:07

    Use jquery::

    HTML CODE::

    
    
    

    Jquery Code::

    var price=100;
    $("#quantity").on("change",function(){
        quantity=$(this).val();
        total_price=price*quantity;
        $("#total_price").html(total_price);
    
    })
    

提交回复
热议问题