Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Place Credit Card Images on Checkout Action Page

    Hi All,

    Does anyone know how to add credit card images to the right of this text? This is the text generated by my /includes/languages/english/modules/payment/nochex_apc.php



    I'd like to place credit card images there as I think customers find it hard to see as it is. Any help much appreciated :-)

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Adding an Image inside PHP code?

    Hi,

    At present my PHP file is this:

    (a)
    PHP Code:
      define('MODULE_PAYMENT_NOCHEX_TEXT_CATALOG_TITLE''Credit or Debit Card (SSL Secure)'); 
    I'd really it to be this:

    (b)
    PHP Code:
      define('MODULE_PAYMENT_NOCHEX_TEXT_CATALOG_TITLE''Credit or Debit Card (SSL Secure)'); echo '<img src="/images/payment_methods.jpg" width="10" height="10">'
    However, I'm not so good with PHP and when I insert this here it just messes up the whole page formatting.

    Can anyone tell me how to insert an image after the text generated in the PHP (a)

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Adding an Image inside PHP code

    I still haven't managed to figure this out, it's really difficult with my limited knowledge of PHP.

    I see that the Paypal module puts a Paypal image on the checkout page using this code:

    PHP Code:
      define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG''https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
      
    define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT''Checkout with PayPal');
      
    define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT''Save time. Check out securely. <br />Pay without sharing your financial information.');

      
    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 '" /> &nbsp;' .  '<span class="smallText">' MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT '</span>'); 
    However, when I try to alter this and add it to the nochex php file it doens't work.

    Can anyone tell me how I could modify this code to generate credit card images next to the nochex radio button in a similar way that the Paypal image appears next to the Paypal redio button?

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

    Default Re: Adding an Image inside PHP code

    Have you tried something like;

    PHP Code:
    define('MODULE_PAYMENT_NOCHEX_TEXT_CATALOG_TITLE''Credit or Debit Card (SSL Secure) <img src="/images/payment_methods.jpg" width="10" height="10">'); 
    ~Steve~

  5. #5
    Join Date
    Jan 2009
    Location
    Montreal, Canada
    Posts
    228
    Plugin Contributions
    0

    Default Re: Adding an Image inside PHP code

    I've been trying to figure this out for the past 40 minutes and just saw your reply.

    It almost works for me- I get the image with some code around it-
    <img src=" title="" /> (the image is in between " and title)

    My code:

    PHP Code:
      define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT''This option ONLY for American Express. Processed by PayPal. <img src="/images/amex_sm.jpg" width="38" height="22">'); 
    I actually want the image first, but that was causing a worse look.

    (If you're wondering, I'm using PayPal Standard just to process American Express. I blanked the regular image define because it mixes with the PayPal Express option.)

    Cheers,

    R

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

    Default Re: Adding an Image inside PHP code

    You are changing the define for the ALT tag... MODULE_PAYMENT_PAYPALWPPMARK_BUTTON_ALT... this will be used as the ALT part of the html image tag... so needs to be text.
    ~Steve~

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Place Credit Card Images on Checkout Action Page

    I still haven't managed to figure this out, it's really difficult with my limited knowledge of PHP.

    I see that the Paypal module puts a Paypal image on the checkout page using this code:

    PHP Code:
      define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG''https://www.paypal.com/en_US/i/logo/PayPal_mark_37x23.gif');
      
    define('MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_ALT''Checkout with PayPal');
      
    define('MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT''Save time. Check out securely. <br />Pay without sharing your financial information.');

      
    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 '" /> &nbsp;' .  '<span class="smallText">' MODULE_PAYMENT_PAYPAL_ACCEPTANCE_MARK_TEXT '</span>'); 
    However, when I try to alter this and add it to the nochex php file it doens't work.

    Can anyone tell me how I could modify this code to generate credit card images next to the nochex radio button in a similar way that the Paypal image appears next to the Paypal redio button?

 

 

Similar Threads

  1. PHP code inside of an EZ page
    By tcarden in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Dec 2012, 05:19 PM
  2. Adding Php code to homepage
    By tracstev in forum General Questions
    Replies: 2
    Last Post: 8 Nov 2011, 01:01 PM
  3. New products on home page - where's the php code inside tpl_header?
    By Thannaree in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 10 Jun 2011, 11:16 AM
  4. adding a sidebox with image inside
    By steve1965 in forum Addon Sideboxes
    Replies: 4
    Last Post: 21 Aug 2008, 03:56 PM
  5. Entering HTM Code into PHP Files - Adding Live Search to search_header.php
    By Jump Network in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2007, 02:47 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