No Paypal Express Checkout Button
Hi there
I have enabled Paypal Express checkout on my site, but the checkout button doesn't show. It doesn't show on the shopping cart page or on the login page.
I have checked and double checked all my paypal and zencart settings, but nothing seems to make any difference. Actually I think it did work a few weeks ago, but now I am not confident about that.
I recently changed templates, but when I change back to the old template, or to the classic template, the button still does not show.
I tried disabling and removing the Paypal express checkout payment module, but this did not make any difference.
Just to be certain on my workstation copy of the site, I installed the new template and set the settings as they are for the public site, and the button shows beautifully.
The zencart version is 1.3.8a and the site is http://www.kanebo-from-japan.com
It is hosted on Host Monster. But Paypal Express Checkout works on Host Monster for my other zen cart install ok.
I am stumped. Can anyone help?
Re: No Paypal Express Checkout Button
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