2

I checked my problem on google and also on stackexchange but could not find any solutions.

Basically this magento function is what I am using to get Price in Cart and also in Checkout from the quote Item.

     <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>

This always returns me the original price. In Catalog view in Product Page and in all other places special price is shown properly but not in cart and checkout.

Also totals are calculated based on original price, special price is not taken at there too.

How can I solve this issue with Magento?

Cheers

closed as off-topic by sv3n, Amit Bera, liyakat, Keyul Shah, benmarks Jul 4 '17 at 8:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced OR seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – sv3n, Amit Bera, liyakat, Keyul Shah, benmarks
If this question can be reworded to fit the rules in the help center, please edit the question.

1

Use $_product->getFinalPrice() which returns the price including any reductions etc.

If you want the special price as entered in the backend special price field use $_product->getSpecialPrice()

To see if the product has a special price use the following code.

$specialPrice = $_product->getFinalPrice();
$normalPrice = $_product->getPrice();
if ($normalPrice != $specialPrice)
{
   // has special price
}
  • I did that already and it is ok but when I do it like that I have to change every price related part with that . In system it is used as getCalculationPrice always. I traced getCalculationPrice function and it goes to hasCustomPrice at the end. But in no where there is a check for SpecialPrice value. On ITEM object in checkout there is no finalPrice or SpecialPrice both are empty. I did that via getting the real product from item id and then checked for special and final prices. How can I make it work via editing maybe the getCalculationPrice function instead of changing all? – CrazyPanda Jun 2 '16 at 11:26
0

For getting normal price

$productPrice = $_item->getPrice();

For getting Special Price

$specialPrice = $_item->getFinalPrice();
0

Can you please try like that.

discount: $item->getDiscountAmount();

original price: $item->getCalculationPrice();

Hope it will work

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