Here's one to scratch your head.
I wrote a function to call an external program from my shopping cart
app:
get_new_tax($state, $zip, $new_city, $amt);
This function does a calculation and returns the results.
In the main function function tep_get_tax_rate(){
the code returns $tax_multiplier. When I manually set this var to 8.25
for example, the amount is calculated and the tax is displayed into the
shopping cart app in the correct place.
When I assign the value from my new function to the $tax_multiplier var,
(8.25 because I echo it out)- the tax amount is missing from the
shopping cart in the place it should be.
The value is the same both ways. I am returning $tax_multiplier each
time back to the program. But I cannot figure out why it wont work when
assigning the value:
$tax_multiplier = $var_from_function;
echo "**" . $tax_multiplier . "**";//this echos **8.25**
$tax_multiplier = 8.25;//this echo 8.25
echo "**" . $tax_multiplier . "**";//this echos **8.25**
return $tax_multiplier;
The last one shows up in my cart application in right place. The first
doesnt show at all, but I can get it to echo on screen.
Any ideas ????
My app is behind a firewall or else I'd do a demo...
Thanks for any suggestions
Mignon
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php