Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default 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!

  2. #2
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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

  3. #3
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

  4. #4
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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???

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

  6. #6
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Total Amount is always zero, subtotals are correct.

    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.p...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.

  8. #8
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

  9. #9
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

  10. #10
    Join Date
    Nov 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: Total Amount is always zero, subtotals are correct.

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 17
    Last Post: 14 Apr 2015, 05:55 PM
  2. v151 Zen Cart v151 not sending the correct total amount over to Paypal
    By cjcoward in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 5 Jan 2014, 07:15 PM
  3. Tax amount excluded from total amount transferred to Paypal
    By Rykmann in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 1 Dec 2007, 11:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg