Shopping Cart showing order total incorrectly as $0.00

edited March 2013 in Shopping Cart plugin
When you add something to the shopping cart its not updating the total value until you go to the checkout. For example the header shows the total value and so does the shopping cart. These both show total as $0.00 when something is in the cart until you press checkout on cart page. As soon as you do this the header reference to the total and the one in the shopping cart become updated.


  • 5 Comments sorted by
  • Vote Up0Vote Down
    Hi katmac,

    Thanks for contacting us.

    From what I've noticed after taking a look at your site I suspect one of the following might be true, and please correct me if I'm way off:
    1. You are using a rather old version of the Shopping Cart plugin. Our plugins are continually updated and new fixes applied all the time, so it's wise to keep them up to date.
    2. You are using a custom Shopping Cat plugin theme ("purple") and there might be an error in the theme somewhere following modification.
    3. You are using a custom theme ("purple") that has been carried over unchanged from an older version of the plugin to a newer (or the latest) version of the Shopping Cart plugin. Unfortunately themes also change from time to time, so custom themes could also become outdated.

    Please let us know which of the above (if I'm correct in my assumption) is the case, so I could advise you the best solution to the issue.

    I look forward to your reply!

    Kind regards,


  • Vote Up0Vote Down
    Thanks Phil. I am using Version It doesn't show the option to update so I am assuming its the latest version.

    Yes, I am using a custom theme that I created. The header cart total is displayed by using the Checkout widget in a set of widgets in the header of the custom wordpress theme.

    The order amount in the checkout is added with the following code which came with the template files when I created the theme:

                        <th><?php _e('Total', $this -> plugin_name); ?> <!-- test --></th>
                        <td><?php echo $wpcoHtml -> currency_price($total_price); ?></td>

    Note: I put that test comment in just now so I could check it was the actual code being used. Here is what it outputs with the incorrect total as $0.00:

    <table id="carttotal">
                        <th>Total <!-- test --></th>
                        <td>$<span class="priceinside pricecurrency">0.00</span></td>
  • Vote Up0Vote Down
    Thanks for your reply katmac!

    Was your custom theme created under an older version of the shopping cart plugin and then copied back in or just not overwritten when you updated the plugin? If so you might have to use your default or simpleblue theme of the current version to re-create your custom theme. Theme files also get updated from time to time, and if the custom theme is not updated accordingly it can produce serious errors.

    My suggestion is to not create a custom theme under the /views/ folder, but to see how far you can get only using custom CSS code under Checkout > Configuration > General > Theme, Scripts & Custom CSS. If absolutely necessary, you could create a child theme as explained in that section, but even then I would advise using only the style.css file.

    As for the shopping cart code: Would you mind checking the hard coding guidelines at the bottom of this page, and see if it might not work to amend your code accordingly?

    Please let me know if it helps, will you? I look forward to your reply.

    Kind regards,

  • Vote Up0Vote Down
    Hi Phil. I needed to create a new theme as css alone would not accommodate the changes I wanted to make. There were several text changes and layout changes required.

    Thanks for the link. I had a look and will have to try and figure out what it could be. Can you please tell me where I can find documentation on what the parameters of this function are:

    total($order_id, true, true);

    I can see it used in several places where the price is being displayed and want to check it out and have a play with its usage.
  • Vote Up0Vote Down
    Hi katmac,

    Thanks for your reply.

    May I suggest you consider creating a child theme using up to date theme files, and make sure to document your edits carefully. Also keep backup copies of the original files you created the child theme from. Then, when the plugin is updated, compare the old files with the new, and update both the backup files and the child theme theme if necessary.

    As for the following string:

    total($order_id, true, true);

    The parameters used here are order ID, shipping used (yes or no) and discount applied (yes or no). There are other parameters that can be used as well. The full function would look like this:

    function total($co_id = null, $shipping = true, $applydiscount = true, $styles = true, $fields = true, $tax_calculate = true)

    I hope this helps?

    Best regards,

Sign In or Register to comment.