Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

Locked

Views: 2,617

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
4 Nov 2008, 9:50 PM
#1
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

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:

<?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) {
?>

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?

So, if anyone can redefine this for me so it only pulls up the Check/Money Order module I would be really grateful.

4 Nov 2008, 10:32 PM
#2
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

It would actually be quite acceptable, if not better, if I could change the code so there were no options at all for the customer - just an assumption by the checkout process that payment by check/money order would be used.

Alternatively, it would be even better still if I could bypass that page altogether - going from the shipping selection page to the order confirmation page, only I cannot find the link on the shipping page to enable me to test this.

4 Nov 2008, 10:55 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

coffee granules:

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.
Um ... I don't know why you think you need to "create a system" to do what Zen Cart already does by default.

Maybe you only needed to change the wording on the default "checkout" button displayed on your shopping cart page to say "pay by cheque"?

4 Nov 2008, 11:13 PM
#4
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

I'm simply creating two distinct and clear paths for my customers: those who have a PayPal or GC account click on the relevant buttons at the checkout, whilst those who don't use the default Zen Cart checkout process.

It is very simple and not causing an problems... until I hit this issue...

I am currently looking at modifying the paypalwpp.php - some interesting FILENAME_CHECKOUT_PAYMENT hrefs in there, and PPEC does not rely on Zen Cart's default checkout pages, if I am not mistaken, so maybe I can do something with this...

4 Nov 2008, 11:28 PM
#5
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

Also, making the button say "Pay by Cheque" doesn't really fix anything - I would still have that darned PayPal selection on the shipping payment page...

4 Nov 2008, 11:47 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

coffee granules:

Also, making the button say "Pay by Cheque" doesn't really fix anything - I would still have that darned PayPal selection on the shipping payment page...

"shipping payment page"?

If you're referring to the checkout_payment page, I would check whether it's required there according to PayPal's TOS ...

5 Nov 2008, 12:04 AM
#7
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

No, you misunderstand, - the page I am trying to modify is the FILENAME_CHECKOUT_PAYMENT page.

I am using the default checkout purely for people paying by cheque, so I do not want that PayPal radio button on the FILENAME_CHECKOUT_PAYMENT page. In fact it would be easier if that page could be skipped altogether because there is no point having a "confirm your payment" page if the customer is only going to be paying by cheque.

5 Nov 2008, 12:22 AM
#8
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

I have 'fixed' it now. - Find the words and image link in

languages/english/modules/payment/paypalwpp.php

...and remove them. - It's a cludge, and leaves an active radio button on the page.

Silly, I know, but it seems to be about the only way of removing PayPal from the FILENAME_CHECKOUT_PAYMENT page if you are trying to create a purely offline payment path for people wanting to use cheques and postal orders to pay for their orders ...and yes, it is important because a big reason for cart abandonment is clutter and confusing layout.

Thanks for the help, though, Doc! - Guess this is something else that needs to be addressed in the next release - clearer, cleaner paths for offline payments (including BACS!).

5 Nov 2008, 3:10 AM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

I think you missed the point - You need to check with PayPal about the requirements for Payment Selections.

5 Nov 2008, 8:13 PM
#10
coffee_granules avatar

coffee_granules

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

I don't see why. - I have an option on my site for people wanting to use PayPal (the PayPal Express Checkout) and I use the default Zen Cart checkout for people wanting to pay by cheque/postal order.

PayPal have no say in this. - It is my store, my checkout, and if want to have PayPal as an option for one set of customers, but not another I should not be forced to display a PayPal checkout option for that other set of customers, especially when that other set of customers want to use offline payment options.

These options are made very clear on my website and are there to make things easier for the customer, but now I find the "easily customisable" software, once again, cannot be customised to make this possible and again needs to be hacked but why, when all I need is a simple redefine of the code to pull up the check/money order module instead of "all available modules"?

I really like the Zen Cart software, but things like this do nothing to encourage people to use it because you spend weeks getting everything just right and then end up at a total dead end with things like this.

5 Nov 2008, 8:27 PM
#11
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: How Do I Redefine This? - Removing PayPal From Default Checkout Page ONLY

We love Open Source - it is about having the freedom to do what you need to do with the shopping cart to suit your particular circumstances, but freedom doesn't mean you can do anything you want. You have "signed" an agreement with a payment processor and they have rules. Rules we have nothing to do with. We will not help you to skirt them.