cancel
Showing results for 
Search instead for 
Did you mean: 

Product price doesnt show on product page

SOLVED

Product price doesnt show on product page

I had a custom template done but the didn't put the price on the product page for some reason.   How can i edit the template to show the price.

 

I have looked at the addtocart.phtml file but I cant figure out how to add the price variable for the product.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Product price doesnt show on product page

It cannot show just from itself. You need to print in to the screen. In the last example, use:

 Price: <?php echo Mage::helper('core')->currency($_product->getFinalPrice(),true,false); ?>
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

View solution in original post

7 REPLIES 7

Re: Product price doesnt show on product page

Template used for rendering prices can be located on few places, and it depends a lot on configured fallback scheme. This is one example how it could look:

 - app/design/frontend/{package}/{theme}/template/catalog/product/price.phtml

 - app/design/frontend/{package}/default/template/catalog/product/price.phtml

 - app/design/frontend/rwd/default/template/catalog/product/price.phtml

 - app/design/frontend/base/default/template/catalog/product/price.phtml

 

{package} - represents your active package where theme belongs

{theme} - represents your active theme

 

You'll probably easily figure out this once you enter app/design/frontend directory.

Also, those price templates are usually included from:

 - app/design/frontend/{package}/{theme}/template/catalog/product/view/type/default.phtml

or

 - app/design/frontend/{package}/{theme}/template/catalog/product/view/type/grouped.phtml

(for grouped product only).

 

The same rule exists here, too: If template file is not found, it goes further down the fallback scheme.

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

Re: Product price doesnt show on product page

// Get product ID
$_productId = 52;
$_product = Mage::getModel('catalog/product')->load($_productId);

 

Get Actual Price

// without currency sign
$_actualPrice = $_product->getPrice();

// with currency sign
$_formattedActualPrice = Mage::helper('core')->currency($_product->getPrice(),true,false);

 

Get Special Price

// without currency sign
$_specialPrice = $_product->getFinalPrice();

// with currency sign
$_formattedSpecialPrice = Mage::helper('core')->currency($_product->getFinalPrice(),true,false);

Re: Product price doesnt show on product page

Thanks , I have tried this

When i use actual price it works but doesnt show as currency. it shows as 20.000

When i try to use the one you showed as currency

$_formattedActualPrice = Mage::helper('core')->currency($_product->getPrice(),true,false);

e);

 

it doesnt work.  

Re: Product price doesnt show on product page

HI

 

Did you tried following code

 

$_formattedSpecialPrice = Mage::helper('core')->currency($_product->getFinalPrice(),true,false);

Re: Product price doesnt show on product page

When I do that nothing shows up in the page. 

 

I have

 

 Price: <?php $_formattedSpecialPrice = Mage::helper('core')->currency($_product->getFinalPrice(),true,false); ?>

And all you can see is Price:

Re: Product price doesnt show on product page

It cannot show just from itself. You need to print in to the screen. In the last example, use:

 Price: <?php echo Mage::helper('core')->currency($_product->getFinalPrice(),true,false); ?>
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue

Re: Product price doesnt show on product page

Yes, that solved the problem.  Sorry, I forgot that this is on a html page and needed an echo to output the code.  (not a programmer)