Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / What file to add message on Payment page ?

What file to add message on Payment page ?

Locked

Started by kevinmc3 on 8 Apr 2010, 6:52 PM · Views: 3,131

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
8 Apr 2010, 6:52 PM
#1
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Post #1 by kevinmc3

ver 1.3.8a

I want to add a message "We Perfer PayPal" on the actual payment page where the customer selects what form of payment to use. What file do I edit to include this message?

8 Apr 2010, 7:15 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

Hopefully you'll get the spelling correct (or fix the typo) :

We Perfer PayPal

The file you need to look at is

tpl_checkout_payment_default.php

and I trust you know that it's a good idea to create an override for this after editing.

The best way to include your message would be via a proper DEFINE, so something like:

<div><?php echo TEXT_PAYPAL_PREFERRED;?></div>

... would be appropriate, where the define for that constant is in the language file checkout_payment.php, and would look like this:

define('TEXT_PAYPAL_PREFERRED','We Prefer PayPal');

20 years a Zencart User

9 Apr 2010, 9:20 PM
#3
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Post #3 by kevinmc3

Thanks. I will give this a try. This is a big help for a non-programmer like myself.

10 Apr 2010, 10:28 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #4 by schoolboy

You may also want to give that DIV a unique style ID so you can later apply some styling in stylesheet.css

<div id="paypalPreferred"><?php echo TEXT_PAYPAL_PREFERRED;?></div>

Then, in your stylesheet.css file you can create a declaration and apply whatever styling you need/want for that element:

EG:

#paypalPreferred {
 color: #cc0000;
 padding: 10px 0px 10px 0px;
 }

20 years a Zencart User

12 Apr 2010, 8:23 PM
#5
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Post #5 by kevinmc3

schoolboy:

Hopefully you'll get the spelling correct (or fix the typo) :

We Perfer PayPal

The file you need to look at is

tpl_checkout_payment_default.php

and I trust you know that it's a good idea to create an override for this after editing.

The best way to include your message would be via a proper DEFINE, so something like:

<div><?php echo TEXT_PAYPAL_PREFERRED;?></div> ``` > > ... would be appropriate, where the define for that constant is in the language file **checkout_payment.php**, and would look like this: > > ```php define('TEXT_PAYPAL_PREFERRED','We Prefer PayPal'); ```

I know this may sound like a dumb question, but when you say "creat ean override for this after editing", not sure what you mean. I already have an override folder for template and cart files. Are you suggesting I should create a backup this file?

12 Apr 2010, 8:43 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #6 by schoolboy

Just put the edited copy into your custom template folder...

20 years a Zencart User

12 Apr 2010, 9:20 PM
#7
kevinmc3 avatar

kevinmc3

Totally Zenned

Join Date:
Jun 2006
Posts:
786
Plugin Contributions:
0

Post #7 by kevinmc3

Thanks much. I have two more questions and then I will stop buggin you (for a week...;}) .
I made the changes to my checkout_payment.php file and added the notation I needed. My question(s) is I notice if I go beyond a certain # of characters, the file will not load and I get a "not found" error. Where can I edit the limitation on characters?

And, how can I make the text for the Payment information message slightly larger and bold?

13 Apr 2010, 9:02 AM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #8 by schoolboy

There is technically no limit. What you might be doing is putting in UN-ESCAPED SPECIAL CHARACTERS.

In PHP, you need to be careful about what characters you insert.

For example, if you put - it's a lovely day

You will have problems, because the APOSTROPHE in it's is UN-ESCAPED.

You need to ESCAPE the apostrophe with a backslash:

it's a lovely day

20 years a Zencart User