Deciphering MyDEBUG error
I throw myself upon the mercy of the court.
I am trying to find the source of the error below - -it is being generated dozens of times a day -- it doesn't seem to affect the function of the cart, but I think it would be good to resolve it, since its spitting out myDEBUG files by the thousands
Here's the error from the MyDEBUG file:
[25-Mar-2012 17:24:01] PHP Warning: Missing argument 2 for currencies::display_price(), called in /nfs/c06/h05/mnt/92537/domains/quinceandco.com/html/store/includes/templates/quince/templates/tpl_checkout_confirmation_default.php on line 139 and defined in /nfs/c06/h05/mnt/92537/domains/quinceandco.com/html/store/includes/classes/currencies.php on line 112
Line 139 in tpl_checkout_confirmation_default.php is:
Code:
<?php echo $currencies->display_price($order->products[$i]['price'], $order->products[$i]['tax']); ?>
And line 112 in /classes/currencies.php is:
Code:
function display_price($products_price, $products_tax, $quantity = 1)
My question is -- what is the missing "argument 2" -- is it the tax value or the quantity value (I don't know if PHP numbers arguments 1,2,3 or 0,1,2)
Thank you for your help.
Re: Deciphering MyDEBUG error
Function arguments are numbered from 1. So it's talking about the tax amount.
Looks like you must have some addons that are mangling the normal way tax is handled.
http://www.zen-cart.com/wiki/index.p...Obscure_Issues
Re: Deciphering MyDEBUG error
That's what I thought, but I'm confused by this:
The line of code that's throwing an error is:
Code:
<?php echo $currencies->display_price($order->products[$i]['price'], $order->products[$i]['tax']); ?>
This line, by the way, is not part of the stock template -- it is a modification of some sort.
However, down slightly further, is a similar line (part of the stock template)
Code:
<?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
This does not generate an error, even though it is still calling for the same tax value as the line above (I think).