Magento Forum

   
“Shopping Cart Price Rules” causes error in “Price Unit”! 
 
Bazz78
Sr. Member
 
Avatar
Total Posts:  156
Joined:  2008-06-16
Italy
 

"Shopping Cart Price Rules” causes error in “Price Unit” of all the products affetced by this rules
This happens in CART, in MY CART, and in “Recently added item(s)”

only the GRAND TOTAL is correct !!!

for example i create a rules of 15% discount on all chairs

i choose 4 chairs (1 chair € 100)

Unit price = 97,50 ----> WRONG
Grand subtotal = 390 ---> WRONG
Discount = 50 ---> WRONG

GRAND TOTAL = 340 ---> CORRECT

i make some screenshots… please help me!

byez

Image Attachments
error1.jpgerror2.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Bazz78
Sr. Member
 
Avatar
Total Posts:  156
Joined:  2008-06-16
Italy
 

nobody has this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dharakos
Jr. Member
 
Total Posts:  7
Joined:  2009-02-06
 

Me too - Either we’re doing something wrong or nobody particularly cares about anything but the total?!?!?

 
Magento Community Magento Community
Magento Community
Magento Community
 
botc
Member
 
Total Posts:  43
Joined:  2009-05-16
 

I have the same problem.

Did you find a solution for this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bazz78
Sr. Member
 
Avatar
Total Posts:  156
Joined:  2008-06-16
Italy
 

now I use magento without taxes included… in this way the problem does not occur.

I do not know if the issue is resolved

 
Magento Community Magento Community
Magento Community
Magento Community
 
aronchi
Member
 
Avatar
Total Posts:  49
Joined:  2009-05-20
Reggio Emilia - Italy
 

Hi,
we are experiencing the same problems with Unit Price with v 1.3.2.3 when you specify prices including taxes and apply some cart rules.
Which version are you using right now?

We tried the v 1.4.0.0 and such problems seems to disappear but it’s still an alpha release not suitable for production.

We are pretty new to Magento and still not able to face such coding issues.
Magento code structure is very complex and it’s not easy to dig into and monkey patch it.

Regards, Alessandro

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bazz78
Sr. Member
 
Avatar
Total Posts:  156
Joined:  2008-06-16
Italy
 

OK!

i’m online with 1.3.2.1

i will try this new version!

thks very much !!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Manuele Menozzi
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2009-05-04
Arceto (RE), Italy
 

Hi to all,
we found a solution to solve the unit price issue and mantain prices including tax. The solution consists in modifying Magento source code in the file app/code/core/Mage/Checkout/Helper/Data.php. Take a look at the method getPriceInclTax in this file it shoud contain a line like the following one:

$price Mage::app()->getStore()->roundPrice(($item->getRowTotal()+$item->getTaxAmount())/$qty);

Modify the line above to replace the getTaxAmount with the getTaxBeforeDiscount. You should get something like this:

$price Mage::app()->getStore()->roundPrice(($item->getRowTotal()+$item->getTaxBeforeDiscount())/$qty);

Now in the getSubtotalInclTax method of the same file, before the return instruction insert this line:

$tax $item->getTaxBeforeDiscount();

That’s all!
This patch works for me. I’m using Magento ver. 1.3.2.3.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stefr
Jr. Member
 
Total Posts:  21
Joined:  2009-07-05
 

That did the trick!!! Thank you!

However..... When I print the PDF invoice the problem still exist.
The total, subtotal, discount and tax amount are correct, but the single price on the product line is not.

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tr909
Member
 
Total Posts:  31
Joined:  2008-11-25
 

Thanx a lot...It worked for me too!!!

How about the wrong price in the PDF Invoice?

Sincerly,
Michael

 
Magento Community Magento Community
Magento Community
Magento Community
 
coolio
Jr. Member
 
Total Posts:  18
Joined:  2010-02-10
 
Manuele Menozzi - 09 September 2009 12:47 AM

Hi to all,
we found a solution to solve the unit price issue and mantain prices including tax. The solution consists in modifying Magento source code in the file app/code/core/Mage/Checkout/Helper/Data.php. Take a look at the method getPriceInclTax in this file it shoud contain a line like the following one:

$price Mage::app()->getStore()->roundPrice(($item->getRowTotal()+$item->getTaxAmount())/$qty);

Modify the line above to replace the getTaxAmount with the getTaxBeforeDiscount. You should get something like this:

$price Mage::app()->getStore()->roundPrice(($item->getRowTotal()+$item->getTaxBeforeDiscount())/$qty);


Now in the getSubtotalInclTax method of the same file, before the return instruction insert this line:

$tax $item->getTaxBeforeDiscount();

That’s all!
This patch works for me. I’m using Magento ver. 1.3.2.3.

I was looking for this solution, thanks for posting this.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top