Jump to content
peterdlv

Adding Credit card image

Recommended Posts

I have been trying to modify how the display page looks at check out by adding a credit card image to the page.

 

I have modified the file \includes\languages\english\modules\payment\authorizenet_cc_aim.php

 

Found line

define('MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_PUBLIC_TITLE', 'Credit Card ');

 

Changed it to

define('MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_PUBLIC_TITLE', 'Credit Card <img src="/images/credit_cards.gif" border="0"> ');

 

and I cant get the image to dispaly at all. I have chnaged it several ways, include the full url path, modified it under define('MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_DESCRIPTION

 

I must be missing something or updating the wrong file

 

Can someone direct me where to update this at please?

 

 

Thank You

Share this post


Link to post
Share on other sites

Hi Strangely enough was just looking at a file today a guy posted

 

http://forums.oscommerce.com/topic/213019-contribution-discount-coupon-codes/page__st__3320#entry1690686

 

post number #3332 baddison02

 

Where he had a credit card image on checkout_payment.php (about half way down)

 

<div><img alt="Credit Card Types" width="230px" src="images/creditcard_logos.png" style="border:1px solid #000000;padding:2px;margin-bottom:10px;"></div>

 

should work for you also but never tested was helping with something else so maybe you have to experiment with the placement

 

Regards

Joli

Edited by joli1811

To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

From the osC home page we can click through to

 

Products > Online Demo > View > Source

 

to view the source, and specifically to view line 6 which reads

 

<base href="http://demo.oscommerce.com/" />

 

The domain-name, as here given, ends with a forward-slash character. So your

 

<img src="/images/credit_cards.gif"

 

can be changed to

 

<img src="images/credit_cards.gif"

 

like in joli's code. Or it might need to be

 

<img src="catalog/images/credit_cards.gif"

 

depending on your directory structure. Just don't start the pathname with a forward-slash.

Share this post


Link to post
Share on other sites

Easy enough to check. When you have the page up that should display the credit card image, do a View > Page source in your browser and look to see if the code even shows up, and is it within some place that is suppressing the image? You can see if the full path to the image is valid (no missing / and no // within the path). Is it even specifying the right place (e.g., do you need /catalog in there)? Add alt="credit card picture" so you have alt text if the image can't be displayed for some reason (and to help the blind). You might need to add width and height attributes. Ideally you would use the tep_image() call, which would mean modifying the PHP source rather than just the define as you did.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×