Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento, what is the difference between getPrice and getFinalPrice

Tags:

magento

Just exactly as the title explains, in Magento, what is the difference between these two:

$product->getPrice();

v

$product->getFinalPrice();
like image 434
Marty Wallace Avatar asked Nov 27 '12 15:11

Marty Wallace


2 Answers

Get final price is with discount included.

like image 142
erwin_smit Avatar answered Nov 05 '22 00:11

erwin_smit


getFinalPrice check if have some discount on product and if this discount is active, the method apply the discount and return the literal "Final Price", if you check for getPrice() you'll have just he simple price from this product.

like image 31
Guerra Avatar answered Nov 04 '22 22:11

Guerra