Results 1 to 4 of 4
  1. #1

    help question Add an Image to Payment Method

    Hi everyone,

    I located this code in tpl_checkout_payment_default.php found in includes/templates/barebones/templates/

    It controls the display of the credit card images on the payment information section of the check out page.

    I want to add an image immediately to the right of the last credit card image in the row. Its the same size and will hopefully line up nicely with the others.

    What additions do I have to make to the code below to make that happen?

    <?php
    if (SHOW_ACCEPTED_CREDIT_CARDS != '0') {
    ?>

    <?php
    if (SHOW_ACCEPTED_CREDIT_CARDS == '1') {
    echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled();
    }
    if (SHOW_ACCEPTED_CREDIT_CARDS == '2') {
    echo TEXT_ACCEPTED_CREDIT_CARDS . zen_get_cc_enabled('IMAGE_');
    }
    ?>
    Thanks in advance for the help!
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  2. #2

    help question Re: Add an Image to Payment Method

    :::bump:::

    Any advice from the ZC gurus?

    I believe my problem is that I don't know how to add an image in a php file, or what I need to know to do so.

    Is it as simple as learning the proper syntax, or is there something additional I need to know?

    Can I use html code, or do I need to use a combination of html & css, or do I need to use php syntax?

    Having the actual code I can just plug in would be nice, but I'd much rather learn how to do this for myself so that going forward, I'll be able to do so independently.

    Can someone please point me in the right direction on where/how to begin?

    Thanks in advance
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

  3. #3
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Add an Image to Payment Method

    as long as you keep a backup, you can try modifying the template files. You can use html within these templates... If you look through a few of them, you should be able to see how the php and html is coded...

    adding an image would a simple html IMG tag... but with a little php to make sure the correct folder is used...

    for example,

    <img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>image.jpg" alt="alt text" />

    This will display an image that you can upload into your includes -> templates -> YourTemplateFolder -> images folder.

    Now you just have to consider whereabouts you wish to put the above line...
    ~Steve~

  4. #4

    help question Re: Add an Image to Payment Method

    That's awesome, thanks Steve!

    I'll play around with that tonight and see what I can accomplish :)

    I see this a lot in the files:

    <?php echo DIR_WS_"SOME_ZC_FOLDER_HERE"; ?> some html stuff here />

    and I have a couple questions about it.

    Understanding the code I'm modifying will go a long way in being able to answer my own questions.

    Does the DIR=Directory?

    What does the WS reference?

    What is "?php echo DIR_WS" telling me about the folder and/or html stuff that follows it?

    I see a lot of talk about PHP 'calling' stuff from files. Is that what the php echo string does - calls stuff?
    Go that extra mile, you never know what's at the end of the road

    Empowerment Sanctuary

 

 

Similar Threads

  1. Add Icons To Payment Method
    By dbjsi83474 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Nov 2011, 10:33 AM
  2. Add Tax form payment Method
    By flirt4 in forum General Questions
    Replies: 1
    Last Post: 23 Apr 2009, 06:58 PM
  3. Add a Payment Method
    By seadig in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 27 Jun 2008, 08:49 AM
  4. Add text under Payment Method ?
    By ghs215 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 11 Sep 2007, 05:31 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