Forums / Templates, Stylesheets, Page Layout / adding text to checkout_payment.php

adding text to checkout_payment.php

Locked
Results 1 to 16 of 16
This thread is locked. New replies are disabled.
20 May 2009, 05:54
#1
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

adding text to checkout_payment.php

I want to add some text to the checkout_payment.php page. Stage 2 of 3 of the payments process where they select the payment method.

I would like to add text explaining that they should select paypal if they want to pay by credit/debit card. Currently this isn't there.

my client has assured me that the site used to have a radio button to select credit/debit card payment which sent you to paypal, however it seems that since I installed big royal mail this option has disappeared, and we're left with just check/postal order and paypal radio buttons.

i've done a dummy run through myself and after selecting paypal as you would expect you're taken to the paypal site where you can pay with a card even if you haven't got an account, however my client doesn't like it that vivtore to her site will be "in the dark" as to how to pay... in her words.. "they may not know who or what paypal is"... so i've just suggested to her to add some text to inform people that if they want to pay by card they need to select paypal as the payment option.

hence this post....

Andy
20 May 2009, 10:02
#2
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Having re-looked at the page in question. i need to add text to the bit where it says Select payment method. This probably isn't on the checkout_payment.php file but an html include or something... help 'm stabbing in the dark here.

Help please

Andy
20 May 2009, 15:16
#3
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Any takers?
21 May 2009, 12:02
#4
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: adding text to checkout_payment.php

I'm looking for this answer too...
21 May 2009, 12:07
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Give me a few minutes and I'll post the solution...
21 May 2009, 12:25
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

OKAY... there are a variety of option available, and the one below can be used as a "quickfix" for bettsaj, but ONLY IF PayPal is being provided as a payment option. This is because we are about to alter a GENERAL DEFINE that will appear on the page irrespective of whether paypal is active or not, so only use this method if paypal is active...

Via FTP, port a COPY of: includes/languages/english/checkout_payment.php to your local drive.

Open it for editing and find:
[PHP]
define('TEXT_SELECT_PAYMENT_METHOD', 'Please select a payment method for this order.'); [/PHP]

You could add something like:

[PHP]
define('TEXT_SELECT_PAYMENT_METHOD', 'Please select a payment method for this order.<br /><br />PayPal must be used for all credit card or debit card payments and you do not need a PayPal account to do this.<br /><br />PayPal will invite you to open a PayPal account, but this is at your discretion. You can still pay us using a payment card as described.<br /<br />If you do have a PayPal account, you can either choose to pay using your account, or use another credit/debit card.'); [/PHP]

Then SAVE the file on your local drive.

Then FTP it to:

includes/languages/english/YOUR_TEMPLATE/checkout_payment.php
21 May 2009, 12:30
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

With respect to my earlier post...

If you are using zencart 1.3.8, then this is an option that will display exclusively to PayPal.

In:
/includes/languages/english/modules/payment/paypal.php

There is a define, as follows:


[PHP] define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT', 'Save time. Check out securely. <br />Pay without sharing your financial information.');[/PHP]

Using my example (above), you can edit/add additional text to this define in the same way.
21 May 2009, 12:34
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Other solutions for other text inserts on the checkout_payment page are different, and the methodology used depends on what text you want to add, and where you want it to appear.

For example, if you want a block of text to appear ONLY WHEN payment options are offered, or when a CERTAIN option is offered, then we need to use CONDITIONALS in the code (if x is true, then display y).

If the statement you require is GENERAL, it's easier, becuase there will not be a conditional...

So, WHAT do you want to display, and under WHAT CIRCUMSTANCES (conditions) ?
21 May 2009, 12:40
#9
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Many thanks for you help and it has solved some of my query. The other problem I have is that the Paypal IPN text is small than the other text I have for my other payment methods. I'd like it the same size. when I look at the source for this page I see <span class="smallText">Checkout securely with PayPal.</ Which file is this code in so I can change it to class="radioButtonLabel">

Thank you
Suekay
21 May 2009, 12:51
#10
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: adding text to checkout_payment.php

Thanks very much .... Did exactly what I wanted it to do. My clients just informed me that she's going to apply for PayPal Pro so it's seamless.... Oh well :frusty:
21 May 2009, 12:54
#11
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

It's probably this one:

includes/languages/english/modules/payment/paypal.php

(Around line 22)

[PHP]define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" />  ' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');[/PHP]
21 May 2009, 13:05
#12
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: adding text to checkout_payment.php

I don't want to change the text, just the size now... any ideas where the code is?

Thanks
Suekay
21 May 2009, 13:10
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Posts:
10,324
Plugin Contributions:
0

Re: adding text to checkout_payment.php

suekay:

I don't want to change the text, just the size now... any ideas where the code is?

Thanks
Suekay


I just showed you the file, and the line:

define('MODULE_PAYMENT_PAYPAL_TEXT_CATALOG_LOGO', '<img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" title="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT . '" />  ' . '<span class="smallText">' . MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT . '</span>');

What you may prefer to do is change:

<span class="smallText">

to

<span class="myPayPalText">

... then in your stylesheet, create a new style declaration for:

.myPayPalText

Then you can configure the styles for this as you please, without influencing styles relative to radioButtonLabel

(if you want the styles of .myPayPalText to be the same as radioButtonLabel, then nest the declarations.)
21 May 2009, 13:23
#14
suekay avatar

suekay

New Zenner

Join Date:
Jul 2008
Posts:
90
Plugin Contributions:
0

Re: adding text to checkout_payment.php

brilliant - thanks and apologies for misreading earlier post

Suekay
14 Mar 2010, 23:32
#15
ncflanagan avatar

ncflanagan

New Zenner

Join Date:
Nov 2009
Posts:
14
Plugin Contributions:
0

Re: adding text to checkout_payment.php

thank you! thank you! thank you! :clap:
15 Mar 2010, 17:00
#16
ncflanagan avatar

ncflanagan

New Zenner

Join Date:
Nov 2009
Posts:
14
Plugin Contributions:
0

Re: adding text to checkout_payment.php

I found an easier way to do this... in the code itself in the file includes/languages/english/modules/payment/paypal.php, there is an option listed to use a different icon than the default. I found it here:

[PHP]// to show the PayPal logo as the payment option name, use this: https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif
// to show CC icons with PayPal, use this instead: https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif
define[/PHP]
just swap the image file in this line:

[PHP]('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG', 'https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif');[/PHP]

and you get an icon that indicates that PayPal is used to process credit cards! woo hoo!