Well, I feel like I am talking myself, again.
Um, I solved my problem, that is I know why the paypal button is not showing.
I work in Japanese Yen, so my currency rates are the cost of one Japanese yen in the target currency. But I don't expect people to pay in yen. So my default currency is set to US dollars. So the urrency rate of the default currency is not 1.0 but 0.011.
The currencies->value function is called from tpl_ec_button.php when choosing whether to display the paypal expres button, because there is an upwards limit on payment amounts with paypal. But because of the following code on the currencies->value function, even a US$20 item will appear to go over the maximim limit:
Code:
if ($currency_type == DEFAULT_CURRENCY) {
$rate = (zen_not_null($currency_value)) ? $currency_value : 1/$this->currencies[$_SESSION['currency']]['value'];
} else {
$rate = (zen_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value'];
}
Since the rate for US$ is about .011, and the default currency is $US, the above code ends up dividing 1 by .011 to get a monstrous exchange rate.
I changed the code in my cart to this.
Code:
$rate = (zen_not_null($currency_value)) ? $currency_value : $this->currencies[DEFAULT_CURRENCY]['value']/$this->currencies[$_SESSION['currency']]['value'];
Wouldn't this be better all around? Dr Byte?
Justin
Bookmarks