Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Wrong total in bank module

Wrong total in bank module

Locked

Views: 4,876

Results 1 to 20 of 30
This thread is locked. New replies are disabled.
4 Sep 2006, 12:10 PM
#1
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Wrong total in bank module

Hi,

we have a problem that a total sum of the order calculated properly in checkout process ends up in the bank thousand times bigger sum! So, if we pay 52,90 euro, we get in the bank a payment for 52.897,00 euro! That would be nice for the shopkeeper but the customers may not like... :(

I think this is something do with the fact that in Europe we use commas instead of dots and other way round compared to USA and ZC has always some "hidden" settings for US shops... ;) So, we are using the proper set_local in finnish.php that the system understands for example to put the dates in our language but the commas and dots may have other settings somewhere...

I was trying to search for the solution being sure somebody would have asked about commas and dots but could not get any real results.

Elli

4 Sep 2006, 7:33 PM
#2
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

Hi again,

I found a working shop that is also using the newest ZC (or actually 1.3.0.2) and it has been upgraded to use that version, not fresh install. So, it has got the settings of the earlier versions as well and it works perfectly for the bank modules! But in the same version the fresh install (I have tried 2 of them) won't work!

I've been comparing all the settings like Localization, there Currencies and Languages both, no changes there affects on anything in this issue. Neither the setlocal value ISO8859-1 should affect this since it is working for the dates etc.

I would just need to find out what it makes this thing to make the prices 1000 times bigger, moving commas or dots and making 52.897,00 euro out of 52,90 euro!

Please, help, I should have gone online with my new versions of ZC already.

Elli

5 Sep 2006, 10:41 AM
#3
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

Nobody knows anything about this total sum problem?

6 Sep 2006, 8:11 AM
#5
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

DrByte:

No idea.
If you've already compared every database-setting, then check your files
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

Could I somehow cleverly compare the database settings? I've been trying to compare with admin settings by going one by one in all navigation links through. Some settings were of course differently but by changing them didn't make any difference. If I make a SQL dump then I have lots of different things due to different products there.

I compared the folders and files of ZC in all three installations and they were identical. Only some translation package had different sentences but not different settings in setlocal or so on.

I guess I should just find where are the places that somehow guide the commas and dots, since that may give the answer... quite in panic over this matter anyway.

Elli

6 Sep 2006, 9:41 AM
#6
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

ellivir:

Could I somehow cleverly compare the database settings? I've been trying to compare with admin settings by going one by one in all navigation links through. Some settings were of course differently but by changing them didn't make any difference. If I make a SQL dump then I have lots of different things due to different products there.

I compared the folders and files of ZC in all three installations and they were identical. Only some translation package had different sentences but not different settings in setlocal or so on.

I guess I should just find where are the places that somehow guide the commas and dots, since that may give the answer... quite in panic over this matter anyway.

Elli

Hi, more information:
it is strange but if I choose Store Pickup for shipment the bank module gets the right total sum, for example 49 euro to be paid.
If I choose Post Office delivery, and it adds some sum for the total and shows in checkout page for example 52 euro, it will be in bank module 52000 euro! So it is something to do with the shipping module calculations then. Now we have to just find out what it could be... anybody has any idea?

Elli

6 Sep 2006, 3:26 PM
#7
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

ellivir:

Hi, more information:
it is strange but if I choose Store Pickup for shipment the bank module gets the right total sum, for example 49 euro to be paid.
If I choose Post Office delivery, and it adds some sum for the total and shows in checkout page for example 52 euro, it will be in bank module 52000 euro! So it is something to do with the shipping module calculations then. Now we have to just find out what it could be... anybody has any idea?

Elli

So, even if I put in my tests the original Table Rate module as shipping module the failure in bank module makes the sum thousand times bigger.
In case the shipping is free or chosen Store Pick Up (0 euro) the sum in the bank comes correct.
I still think that the shipping module may add the shipping price in English settings like 1,000.00 euro style, so in that case for example price written 5,00 euro of shipping will be understood as thousands. On the other hand it is strange it indeed doesn't happen on the web site part yet but only is visible in the bank. The checkout success page looks fine.

6 Sep 2006, 3:30 PM
#8
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

I forgot to tell I also tried to change the default language for English but the problem still occured. I even removed other languages and kept only the English but still I had the same problem.

7 Sep 2006, 8:43 AM
#9
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

ellivir:

I forgot to tell I also tried to change the default language for English but the problem still occured. I even removed other languages and kept only the English but still I had the same problem.

Am I really alone here with my problems?
I tried to upgrade the webshop for this latest 1.3.5. version but the problem just persists.
I kept the shop as naked as possible to test the bank module functioning but no result. Of course I have the settings imported from the previous shop since I indeed made a proper upgrade process for it.

But my panic is deepening really... :(

Elli

7 Sep 2006, 9:02 AM
#10
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

ellivir:

Am I really alone here with my problems?
I tried to upgrade the webshop for this latest 1.3.5. version but the problem just persists.
I kept the shop as naked as possible to test the bank module functioning but no result. Of course I have the settings imported from the previous shop since I indeed made a proper upgrade process for it.

But my panic is deepening really... :(

Elli

I noticed that all my "ä" and "ö" letters (Scandinavian characters) gets kind of corrupted when I make the SQL dump for the upgrade. Can this be a problem for the Wrong Sums in bank module as well? I corrected all the ä and ö by hand from the admin for the products. What kind of settings I should have for the SQL dump and what kind of ä and ö the system understands in database, for example ‰ or html code ä or pure ä?

Elli - in despair trying to find a solution

7 Sep 2006, 9:38 AM
#11
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

I also noticed just now that if I have a sum of 39 euro, I will have the problem in bank side. If I have the sum over 100 euro, like I just tried 165,10 euro, it comes ok in the bank module side.

Can this clear anything for anybody?

7 Sep 2006, 11:40 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Wrong total in bank module

ellivir:

Could I somehow cleverly compare the database settings?
You could compare the settings in the "currencies" table. Easiest way would be to do an export of the table and then use a diff tool like WinMerge to compare the output.

7 Sep 2006, 12:55 PM
#13
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

DrByte:

You could compare the settings in the "currencies" table. Easiest way would be to do an export of the table and then use a diff tool like WinMerge to compare the output.

Ok, I compared and BBEdit highlighted these all the lines of "Dumping data for table...".
I guess, these are not very private info, so I can put here.

FIRST ONE IS:

CREATE TABLE ws130currencies (
currencies_id int(11) NOT NULL auto_increment,
title varchar(32) NOT NULL default '',
code char(3) NOT NULL default '',
symbol_left varchar(24) default NULL,
symbol_right varchar(24) default NULL,
decimal_point char(1) default NULL,
thousands_point char(1) default NULL,
decimal_places char(1) default NULL,
value float(13,8) default NULL,
last_updated datetime default NULL,
PRIMARY KEY (currencies_id)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table ws130currencies

INSERT INTO ws130currencies VALUES (1, 'US Dollar', 'USD', '$', '', '.', ',', '2', 1.28410006, '2006-09-04 22:24:10');
INSERT INTO ws130currencies VALUES (2, 'Euro', 'EUR', '', 'EUR', ',', '', '2', 1.00000000, '2006-09-04 22:24:11');

THE SECOND ONE IS:
-- Dumping data for table oxf_currencies

INSERT INTO oxf_currencies VALUES (1, 'US Dollar', 'USD', '$', '', '.', ',', '2', 1.19166994, '2006-03-09 08:13:24');
INSERT INTO oxf_currencies VALUES (2, 'Euro', 'EUR', '', ' EUR', ',', '', '2', 1.00000000, '2006-03-09 08:13:26');

The first one is from the "working ok" webshop.

I don't know if these reveals anything. I have also tried to change these settings and it makes no effect on either way.

7 Sep 2006, 4:14 PM
#14
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

Hi,

is there any list that would tell what changes are needed for self-made Bank payment modules when transferring from previous versions to the newest one?

How it is possible that under 100 euro orders are not fine in the payment site of the bank but the over 100 euro ones go without problems? All the time the checkout success page shows all correctly.

If chosen shipping of 0 euro (Store Pickup) also the payment under 100 euro goes fine. With table rate shipping or any other comes a problem even if the price added for the sum would be small. What can be the link between these problems?

I already lost huge amount of money. Everything in my shop looked fine (tested the bank as well but with higher amounts), so I reserved one week more time to finetune in peace and should have had the Grand Opening today. It was advertised widely and I have got lot of contacts why I'm not online. So complete disaster!

Elli
-trying to work 24h for the issue (without proper knowledge)

7 Sep 2006, 5:32 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Wrong total in bank module

Judging by the silence, I think the answer is ... your guess is as good as anybody else's.

Without studying the code at length and comparing it with some other module that is known to work properly and which uses similar methods ... I can't answer your questions.

But that's what will have to be done for you to get to the bottom of the issue.

7 Sep 2006, 6:17 PM
#17
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

DrByte:

But, as you mention there is another site using it without problems, this is another option:
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues
(using a copy of their "working" files as a base)

That's what I did already ones and I got the result that the files were identical (just small translation related differences that I also went through in case there would be something). There must be something in the database differently but I was trying to compare that info as well without finding the reason.

Would you like to test if the payment module (it has ready test passwords, no restrictions to use) would work in your installation, DrByte? You could easily look if the problem comes to you for example with the table rate combined with under 100 euro/dollar/whatever currency. If it occurs even to you, we can know more about the issue. The payment module can be configured to use English in the bank as language and the problem happens also when using that so it may be easier for you. Send me a PM where I can send to you the bank module in case you manage to look it quickly.

Many thanks in advance any case!

Elli

7 Sep 2006, 7:50 PM
#18
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

Hi,

I think I found something interesting. In my non-working test and shop-to-be webshops I have this kind of settings in database:

orders_total_id orders_id	title	text		value	class	sort_order
1 	1 	Välisumma: 	88,00 EUR 	88.0000 	ot_subtotal 	100
2 	1 	Postipaketti (1 x 2.00kg): 7,10 EUR 	7.1000 	ot_shipping 	200
3 	1 	VAT tax: 		17,15 EUR 	17.1488 	ot_tax 	300
4 	1 	Yhteensä: 	95,10 EUR 	95.1000 	ot_total 	999
5 	2 	Välisumma: 	59.00 EUR 	59.0000 	ot_subtotal 	100
6 	2 	Postipaketti (1 x 2.00kg): 7.10 EUR 7.1000 	ot_shipping 	200
7 	2 	ALV/VAT 22%: 	11.92 EUR 	11.9193 	ot_tax 	300
8 	2 	Yhteensä: 	66.10 EUR 	66.1000 	ot_total 	999
9 	3 	Välisumma: 	29,00 EUR 	29.0000 	ot_subtotal 	100
10 	3 	Table Rate (1 x 0.00kg) (Best Way): 	1,40 EUR 	1.3980 	ot_shipping 	200
11 	3 	ALV/VAT 22%: 	5,48 EUR 	5.4795 	ot_tax 	300
12 	3 	Yhteensä: 	30,40 EUR 	30.3980 	ot_total 	999

As you can see, some of the sums have "a comma", some have "a dot" as decimal pointer. This may create the problem we have seen. I asked what they have in the working one in this same database table and they have only dots, although they have the same settings in admin to use "commas" as decimal pointers and "nothing" as thousand pointer.

How could I correct this thing and try if this is the real problem?

Elli

7 Sep 2006, 7:57 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Wrong total in bank module

the list of order_total details you supplied appears fine.
The "text" field is for display purposes. The "value" field is used for calculations.

Unless there's a locale difference between servers, this shouldn't be a problem.

7 Sep 2006, 8:03 PM
#20
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Re: Wrong total in bank module

DrByte:

the list of order_total details you supplied appears fine.
The "text" field is for display purposes. The "value" field is used for calculations.

Unless there's a locale difference between servers, this shouldn't be a problem.

Ok, indeed, I got the answer from the other webshop people and they said commas appear when orders are made in Finnish (they use also English in their shop unlike these two other shops).

This is what I got from them:
31.00EUR 31.0000 ot_subtotal 100
5.59EUR 5.5902 ot_tax 300
4.27EUR 4.2700 ot_shipping 200
35.27EUR 35.2700 ot_total 999
Sub-Total: 57,00EUR 57.0000 ot_subtotal 100
Flat Rate (Best Way): 5,00EUR 5.0000 ot_shipping 200
10,28EUR 10.2787 ot_tax 300
62,00EUR 62.0000 ot_total 999

Would you be ready for my zipped bank module? I know, you have helped a lot already and you are busy with other things, so I'm really blushing here asking these things but I'm kind of locked and in bad situation with this problem.

Elli