Forums / All Other Contributions/Addons / Total Amount is always zero, subtotals are correct. [wordpress issue]

Total Amount is always zero, subtotals are correct. [wordpress issue]

Locked

Views: 2,919

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
17 Jun 2008, 7:49 PM
#1
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Total Amount is always zero, subtotals are correct. [wordpress issue]

Hi,

I am running into this issue when I go to checkout

  1. Shopping Page Contents Page. Displays and subtotals correctly.
  2. Choose Shipping (doesn't matter which option I choose).
  3. Step 2 of 3 - payment information: always shows as subtotal: $0.00, : $0.00, Total: $0.00

I don't understand why it is having problems. The items are not marked as free and I selected a shipping method with a cost associated with but this page always shows all zeros.

I have spent a lot of time (3 hours now) digging through these forums and google trying to find someone with a similar situation. Maybe I am not searching on the right things...?

Please if you have any ideas as to what may be the cause please let me know.

Zen Cart v1.3.8a/v1.3.8

Thanks!

17 Jun 2008, 8:47 PM
#2
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

I have also found this in my log files:

[client 24.123.255.94] PHP Warning: reset(): Passed variable is not an array or object in /var/www/httpdocs/shop/includes/modules/order_total/ot_tax.php on line 26, referer: shop/index.php?main_page=shopping_cart
[client 24.123.255.94] PHP Warning: Variable passed to each() is not an array or object in /var/www/httpdocs/shop/includes/modules/order_total/ot_tax.php on line 27, referer: shop/index.php?main_page=shopping_cart

17 Jun 2008, 9:02 PM
#3
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

ok, I removed the ot_tax module in admin, and now I am not getting any errors in the error_log but still all my values are zero's.

17 Jun 2008, 9:16 PM
#4
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

last update for tonight.
I completed the transaction. The results in the invoice in admin section properly shows the totals and adds in the tax, though all the prices (ex) and (inc) all show the same amount without tax, but the final total shows the amount with tax. Also, the e-mail order confirmation has the proper totals but never lists how much tax there was. So why isn't step 2 of 3 displaying anything but zero's???

17 Jun 2008, 9:32 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Hard to guess what's causing that, since as you noticed that's not normal behavior. Additional information is needed, such as:
What addons/contributions do you have installed?
What languages are enabled?
What currencies are enabled? Which was in use at the time of your test?
What country/state is your business in?
What taxes have you configured? What are the rates?
What is your URL?
What payment modules are installed and enabled?
What shipping modules are you using?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2008, 1:03 PM
#6
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Hi, Thanks for the response.

  1. No Addons/Contributions are installed
  2. Languages - English (Default)
  3. Currencies (Australian Dollar, Canadian Dollar, Euro, GB Pound, US Dollar (Default)) - I believe site is using US Dollar - where do I check this?
  4. Business is in United States - Pennsylvania
  5. Taxable Goods - Configured as Zone Pennsylvania Rate 6%
  6. I am not allowed to post this (i'm sorry)
  7. Check/Money Order is the only payment method enabled
  8. Flat/Per Item/Store Pickup/Free Shipping are the shipping methods enabled.

Please let me know if you need any other info, thanks again for the help.

24 Jun 2008, 4:55 PM
#7
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

I still am unable to fix this issue, I have really dug into things but can't find a solution...

anyone else having this problem or fixed it in the past?

Thanks!

25 Jun 2008, 3:52 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

What taxes do you have configured in Admin->Locations/Taxes->Tax Rates?
Do they all have descriptions filled in?

Your currencies are set up in Admin->Localization->Currencies

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jun 2008, 1:30 PM
#9
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

I have 1 tax rate created

Priority: 1
Tax Class: Taxable Goods
Zone: Pennsylvania
Tax Rate: 6%
Description: PA Tax 6.0%

Currencies are set up as noted before with US Dollar as default.

Thanks for your help DrByte

25 Jun 2008, 7:08 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Bizarre.

When did this start happening? How does that relate to other things happening in your store, your business, your webserver?
What version of PHP is your server running?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jun 2008, 5:57 PM
#11
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Hi,

The store is not live, it is in development, but I can't put it live when it is acting this way. So that is the plus side. It has been happening since I installed the cart software (or at least since I tried to do my first checkout after getting things set up). The rest of the cart seems to be working fine, like I said the invoice in admin and the one that gets e-mailed has the correct amounts, it is just the order confirmation page that is messing up.

PHP Version is 4.4.4

30 Jun 2008, 6:35 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

I'm guessing maybe you've got a damaged file somewhere.
The best way to find out what's inconsistent on the server is to download all the files from your site and compare them against the master set. Here's a document explaining the concept: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Jul 2008, 1:31 PM
#13
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Hi,

I ran the comparison, the only files that come up different are ones that I changed on purpose for the look of the web site. such as tpl_header.php, tpl_footer.php, display_index_product.php etc...

I dug more into tracing the issue, and I found this:

ot_subtotal.php, in the process function, if I echo out $order it displays DESC on the screen. So i don't think it can then determine what $order->info['subtotal'] is.

So that basically means that somewhere along the way global $order is getting screwed up?

From my experience it looks like $order has the end of a SQL statement in it like ORDER BY Title DESC or something like that... instead of the result of the SQL statement.

1 Jul 2008, 3:22 PM
#14
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

Hi again,

I believe I have resolved the issue. I couldn't figure out why this error was happening so I loaded another copy of Zen Cart using the same database but without any of my modifications.

So heres the thing, I have integrated Zen Cart into Wordpress. I wanted the cart to have the same look and feel as the rest of the site so,

In index.php I made modifications to use the wordpress headers as such

under under line 43
require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE,
$current_page_base,'common'). '/html_header.php');

I added:
require('../wp-blog-header.php');
get_header();

Apparently wp-blog-header.php calls a function wp(), I am not sure what this function does but it breaks your checkout process when it is called, it doesn't seem to affect anything else in the system.

So I made a new version of wp-blog-header.php that is the same file, but without the call to wp();

The problem is resolved. I hope this is useful to someone else in the future.

Thanks for all your help.

1 Jul 2008, 3:25 PM
#15
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

sorry, I just realized what must be happening.

The call to wp() must be setting a variable called $order to 'DESC" for displaying wordpress posts. Makes sense to me.

1 Jul 2008, 8:52 PM
#16
drbyte avatar

drbyte

Sensei

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

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

DrByte:

Hard to guess what's causing that, since as you noticed that's not normal behavior. Additional information is needed, such as:
What addons/contributions do you have installed?
...

jrm213:

Hi, Thanks for the response.

  1. No Addons/Contributions are installed
    ...

jrm213:

So heres the thing, I have integrated Zen Cart into Wordpress.
That would have been useful information earlier on ...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jul 2008, 6:13 PM
#17
jrm213 avatar

jrm213

New Zenner

Join Date:
Nov 2007
Posts:
18
Plugin Contributions:
0

Re: Total Amount is always zero, subtotals are correct. [wordpress issue]

yeah, sorry, since the wordpress site existed prior to adding the cart, I just wasn't thinking of it as a mod or contribution.