I have created a system on my store to allow customers to either checkout quickly, using PayPal or GoogleCheckout, or checkout using the default Zen Cart checkout, for those people wanting to use cheques and postal orders.
I have just about completed this but have come unstuck completely on the payment information page because, whilst I can turn the cards off in admin, I cannot get rid of the PayPal checkout link and button because of this:
If you don't know what you are looking at you probably cannot help me with this, but, in a nutshell, it is a piece of code that pulls all the available payment modules together and displays them. - Great, you might think, but what happens when you want to have Check/Money Order only as a payment option?PHP Code:
<?php
foreach($payment_modules->modules as $pm_code => $pm) {
if(substr($pm, 0, strrpos($pm, '.')) == 'googlecheckout') {
unset($payment_modules->modules[$pm_code]);
}
}
$selection = $payment_modules->selection();
if (sizeof($selection) > 1) {
?>
So, if anyone can redefine this for me so it only pulls up the Check/Money Order module I would be really grateful.
Bookmarks