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?
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?
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:
... would be appropriate, where the define for that constant is in the language file checkout_payment.php, and would look like this:PHP Code:<div><?php echo TEXT_PAYPAL_PREFERRED;?></div>
PHP Code:define('TEXT_PAYPAL_PREFERRED','We Prefer PayPal');
20 years a Zencart User
Thanks. I will give this a try. This is a big help for a non-programmer like myself.
You may also want to give that DIV a unique style ID so you can later apply some styling in stylesheet.css
Then, in your stylesheet.css file you can create a declaration and apply whatever styling you need/want for that element:PHP Code:<div id="paypalPreferred"><?php echo TEXT_PAYPAL_PREFERRED;?></div>
EG:
Code:#paypalPreferred { color: #cc0000; padding: 10px 0px 10px 0px; }
20 years a Zencart User
Just put the edited copy into your custom template folder...
20 years a Zencart User
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?
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