Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default What file to add message on Payment page ?

    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?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: What file to add message on Payment page ?

    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:

    PHP Code:
    <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 Code:
    define('TEXT_PAYPAL_PREFERRED','We Prefer PayPal'); 
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default Re: What file to add message on Payment page ?

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

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: What file to add message on Payment page ?

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

    PHP Code:
    <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:
    Code:
    #paypalPreferred {
     color: #cc0000;
     padding: 10px 0px 10px 0px;
     }
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default Re: What file to add message on Payment page ?

    Quote Originally Posted by schoolboy View Post
    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:

    PHP Code:
    <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 Code:
    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?

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: What file to add message on Payment page ?

    Just put the edited copy into your custom template folder...
    20 years a Zencart User

  7. #7
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default Re: What file to add message on Payment page ?

    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?

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: What file to add message on Payment page ?

    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

 

 

Similar Threads

  1. What file do I edit if I would like to add a css link?
    By petergy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Apr 2013, 05:39 AM
  2. What do I need to know about Linux file structure for add on installation?
    By wiles in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Sep 2008, 08:52 PM
  3. Exactly what file do I edit for the Sales Message?
    By MichelleVan in forum Templates, Stylesheets, Page Layout
    Replies: 19
    Last Post: 18 Sep 2008, 05:48 AM
  4. Sidebox - what file to add my info?
    By hautemarket in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Jun 2007, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg