Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Difference in prices between store front and admin

Difference in prices between store front and admin

Views: 3,818

Results 1 to 15 of 15
6 Jun 2011, 7:21 AM
#1
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Difference in prices between store front and admin

I have recently noticed that the prices appear 1 penny more expensive in the admin area to the store front.

Obviously i would not like the customers to get charged more than
what the is advertised, but orders appear to reflect those in the
store admin area.

Is there any way to resolve this?

6 Jun 2011, 8:26 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Difference in prices between store front and admin

Which version of Zen Cart are you using.

6 Jun 2011, 10:02 AM
#3
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

Zen Cart 1.3.9h
and
Database Patch Level: 1.3.9e

6 Jun 2011, 10:06 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Difference in prices between store front and admin

Could you give an example with the net product price and details of any taxes being applied to it.

6 Jun 2011, 10:28 AM
#5
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

Heres 1 example:

Tax = 20.00%
Price (ex) = 116.52
Price (inc) = 139.82
Total (ex) = 116.52
Total (inc) = 139.82
Sub-Total: 139.83
Shipping: 0.00
Vat: 23.30
Total: 139.83
Price as advertised in store front: 139.83

A Second example which is different:

Tax = 20.00%
Price (ex) = 52.94
Price (inc) = 63.53
Total (ex) = 52.94
Total (inc) = 63.53
Price as advertised in store front: 63.52

I believe it must have something to do with rounding the decimals up or down.

6 Jun 2011, 10:34 AM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Difference in prices between store front and admin

Do all your products attract 20% tax?

How do you enter your prices? (e.g. upload via spreadsheet, enter net prices via Admin, enter gross prices via Admin)

Are the prices you're showing us those that are on your screens or the actual prices held in the database (which are held to 4 decimal places)?

6 Jun 2011, 11:13 AM
#7
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

Yes all products would attract 20%
Indivdual products I would through the admin and add prices as gross.
If I am adding thousands of products I would add products direct into the database using sql, as net prices then let the system work out the
gross tax from the vat rate.

These are what I actually see through the admin side then the product price the customer sees.

Below is what is actuall stored in the datase base for the 2 example prices above.
Example 1 price in database: 116.5248
Example 2 price in database: 52.9364

6 Jun 2011, 12:08 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Difference in prices between store front and admin

OK, you're using the latest version of Zen Cart (the database patch level being "e" makes no difference here), which gives your the best shot at getting these calculations right.

The calculations sound like they should be simple - just add a bit of tax to a net price to get a gross price, right? Alas, not. They're inordinately complex, as they have to take into account discounts applied across multiple order lines, coupons applied across multiple order lines, taxes applied additively, taxes applied multiplicatively and scaling for quantities, and probably other complexities that I've missed.

Overlay that with there being more than one "right" answer in many cases, and the best that we can hope for is that Zen Cart will give consistent answers. And I think that's all your asking for here.

But it doesn't even do that. :( Despite valiant efforts by the developers, the way that Zen Cart has grown means that these calculation are performed in different ways in different parts of the code. I hear a whisper that consolidating them all into a single, consistent approach is part of the objectives for 2.0. Which is a way of saying that there's no magic code change that's going to fix this easily for you.

But there are things you can do. :smile:

The net prices that you have currently don't map to nicely rounded gross prices, so you're encouraging inconsistencies. I could reproduce your problem using your net prices, but it went away when I used net prices generated by entering 139.83 and 63.52 as the gross prices.

Well almost. The 139 price still wasn't quite right in the admin category listing, but it was the same on the admin product page as was used throughout for the customer, which is the main thing.

6 Jun 2011, 1:42 PM
#9
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

So if I set it to only 2 decimals places for the net prices in
table Products and column products_price there would be no rounding up or down
it would just be whatever price is stored in the database, to decimcal places for all areas of the code.

Would this be correct?

Also do this with products_price_sorter

6 Jun 2011, 1:46 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Difference in prices between store front and admin

Most likely the opposite alas. If you only work to two decimal place with net prices you will generate gross prices that need to be rounded for all except prices whose pence are divisible by 5.

The problem was actually that your gross prices weren't to 2 decimal places and so needed to be rounded.

6 Jun 2011, 2:20 PM
#11
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

I just checked with one of the examples, it would still needed round.
The majority of the 20,000 items would have been entered directly to the database so these would be net prices.
The two examples above where both entered directly into the database and not through the admin interface, as a result I would expect
zencart to create the gross prices based on the vat rate.

Do you know in how many places the vat calculation takes, so I could possibly take a look at the code to see it, especially in the front end,
I am not bothered if I have to round prices up or down, I just would like to make sure everythings the same.

I have checked items I have added through the admin interface and prices where still different, I would have added these as gross prices.
It appears that the store front rounds prices down and the admin side rounds prices up but it appears the customer gets charged the rounded up figure.

I would'nt mind so much if the customer was getting the rounded down figure.

6 Jun 2011, 2:28 PM
#12
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

Would it work if I pulled the net prices out, rounded them up or down and then entered back into the database as two decimal places
so that it would come as net 116.5200 in the database

6 Jun 2011, 2:44 PM
#13
neit avatar

neit

Zen Follower

Join Date:
Feb 2010
Posts:
140
Plugin Contributions:
0

Re: Difference in prices between store front and admin

After further checking I have found that the prices in the admin catalogue match the prices in the store front.
Issue only appears to be when a customer buys a product then shows in the order screen.

I have checked payment confirmation details and the customer does appear to get charged the price on the store its just the admin section that is a penny more expensive,
so this appears to round up.

As long as the customer is actually getting charged the price on the website is all that matters.

Thanks for the help.

28 Sep 2012, 9:54 PM
#14
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Difference in prices between store front and admin

For ZC 1.5.1 this still appears to be unresolved.

With a tax rate of 21% and a product price entered gross of 38, on the admin product page this gives
net: 31.4050
gross: 38.0001

and the admin listing shows it as 38.01.

The store product page shows 38.

Is this an example of the store front being "fixed" for the long-standing rounding issues and the admin not yet?

21 Nov 2013, 4:24 AM
#15
erharshal avatar

erharshal

New Zenner

Join Date:
Jan 2013
Posts:
2
Plugin Contributions:
0

Re: Difference in prices between store front and admin

I am getting a strange issue using the zencart, when i add a product, i keep the price $10, when i submit the information and it goes on the preview page, it automatically revised to $11.79,

Any help on this regard would appreciated.

Thank You
Harshal