2

I'm using Magento CE 1.9.0.1. I have a series of products that are entered into the admin (inclusive of tax) and the system configuration is also set so that prices entered include tax.

However, on the frontend the configurable and simple products are showing either 1p above or below what they should be.

I don't understand why Magento is changing the price - in theory it should be just showing exactly as it is in the admin as there is no tax calculation to perform.

I wondered if anyone else has experienced this issue?

  • Can you provide an example item, all of it's price and tax settings, and the amount that is displaying on product page, cart, and on orders? – Tim Cieplowski Apr 3 '18 at 17:52
  • 1
    Have ypu tried performing reindexing? – Vivek Kumar Apr 4 '18 at 5:48
  • Just noticed that you had actually created a very similar question a few years ago, which seems you had been able to resolve: magento.stackexchange.com/questions/79863/… Any chance that may be the resolution again? – df2k2 Apr 4 '18 at 19:48
  • Please indicate any price or catalog rules that may be affecting the product. I am aware of some situations where four significant figures after the decimal and subtraction from or to a two digit significance after decimal, would yield the penny problem. So, please indicate any rules that have changed pricing. – df2k2 Apr 4 '18 at 19:55
5
+25

With limited information about the theme customization, settings, and pricing details, this is almost impossible to solve. As more information is given, I'll continue to append updates. Here's where I would start:

What do inserted prices look like? Do you insert prices with 4 significant digits after decimal in backend? Are you seeing only two in frontend?

Do you know if there is custom code applied to prices in the frontend templates that use rounding functionality directly from PHP instead of magento wrappers?

Create a temporary script in root directory with this, but change the ID to a product that is showing the improper price:

<?php
error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
umask(0);
Mage::app();
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));

$id = 1234;
$_product = Mage::getModel('catalog/product')->load($id);

Zend_Debug::dump($_product->getData());   Zend_Debug::dump($_product->getPrice());
Zend_Debug::dump(Mage::helper('core')->formatPrice($_product->getPrice(),false));
Zend_Debug::dump(Mage::helper('core')->formatCurrency($_product->getPrice(),false));

Post the relevant output data. This could help identify the next direction to take. We want to determine if the correct data is returned and what it looks like. We can then start to target overriding functions, perhaps getPrice() or getFinalPrice(), or if there are custom rounding crap being done prior to function calls to obtain pricing data.

  • I have prices set to be entered into the admin including tax. So one example, a product is entered as £3.05 including tax - but on the frontend it displays as £3.04. The strange thing is that when you add it to the cart, it does correctly add at £3.05. Tested with your script above and it reports the prices correctly as £3.05 for my test product. On the frontend I have also tried changing my theme to the default magento theme and it has the same issue of showing as 1p difference. – doubleplusgood Apr 4 '18 at 16:34
  • Switching to the default theme may be useless if the template file that is being rendered doesn't exist in your current theme and has always been pulled from the fall-backs. What I think you may be experiencing is related to custom extensions rewriting a block, helper, or model used for that particular pages price rendering. Typically the models contain zero html, but functionality to display a price is found here if a parameter for the "container" is set to true (which is default). – df2k2 Apr 4 '18 at 17:55
  • I will have to update my answer with another set of tests now that I know more about what is going on. Which page is the price showing incorrectly? Product listing page? Product details page? – df2k2 Apr 4 '18 at 17:57
3

Please check your configuration setting and match your settings like this, just few days ago i was facing the same issue. I fixed it from my admin in the config settings.

enter image description here

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.