I am working on magento2 customization calculation functionality. In this i have width and gather two field is there in text field I have to calculation with product price eg. pricewidthgather like that. That i did successfully but problem is in magento 1 we use to update price use reloadPrice() function is use but in magento 2 which function are require for update a final price

1 Answer 1


before you call the new updated price html block make sure you reload the price block or price info by calling below code


that is

$product->setSpecialPrice(40); //you modified ant price  
$product->reloadPriceInfo(); //reload the price info
$this->getProductPrice($product); //display the price block 

How to reload the price programmatically in Magento 2

if it works accept the answer i helps others

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.