Post by Nile » Tue Jan 31, 2012 5:18 am

Hi

I'm currently running Opencart 1.5.1.3 and using the PayPal Standand payment option.

Idealy as the PayPal option I'm using accepts payments through PayPal accounts and Debit/Credit card payments, I'd like the Paypal payment option in the checkout to be split into two.

1: for credit card payments (showing the current accepted card logos) followed by additional text 'Via the PayPal website - Not account required'

2:The other for PayPay Account holders.

Both would lead to the PayPal website but would be less confusing for the customer than having just the one PayPal payment option.

If the above is not possible, is there a way to add the accepted payment card logo images under the PayPal payment option in the checkout?

Can anyone help???

Newbie

Posts

Joined
Wed Jan 11, 2012 12:41 am

Post by MarketInSG » Tue Jan 31, 2012 7:16 pm

Adding the accepted payment card logo is possible. Can do so by adding in catalog/view/theme/YOUR-THEME/template/common/footer.tpl.
You might consider using paypal express then? or rename the accepted payment: "paypal" to "paypal/credit cart"


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by Nile » Thu Feb 02, 2012 9:45 pm

Thanks for your reply, but what I'm specifically looking for is to add the card logos into the 'payment' area of the checkout.

Can anyone help??.......please :-)

Newbie

Posts

Joined
Wed Jan 11, 2012 12:41 am

Post by marcod » Fri Feb 03, 2012 2:59 am

I have done just what you need.

You need to modify file: \catalog\view\theme\default\template\checkout\payment.tpl
(you could change 'default' to your own theme if you want)

Line 15: replace it with this line:

Code: Select all

    <td><label for="<?php echo $payment_method['code']; ?>"><?php if ($payment_method['title']=="PayPal") echo '<img src="image/paypal_logo_30.png"'; else echo $payment_method['title']; ?></label></td>
You need the PayPal logo image in folder: \image

In this example the image is called 'paypal_logo_30.png' but you can call it what you like.
I made the image 30 pixels high because that looked about right for the checkout page.
paypal_logo_30.png

This is my example PayPal logo image file. Save it and test it out before making your own image. - paypal_logo_30.png (15.93 KiB) Viewed 11470 times

This is a quick and dirty way of doing it.
On the payment section of the checkout page, it simply replaces the text 'PayPal' with the image.
If you want to do it for more than one payment method, then the code becomes a bit more complicated.

Newbie

Posts

Joined
Fri Jan 07, 2011 3:40 am

Post by Nile » Mon Feb 06, 2012 1:55 am

Thanks for your help with this marcod, it wasn't quite how I wanted it, but you did point me in the right direction, and within a few minutes I had it sussed.

Code: Select all

<td><label for="<?php echo $payment_method['code']; ?>"><?php echo $payment_method['title']; ?></label></td><p>
<img alt="" src="http://kizzmi.com/image/data/Layout/paypal_logos.png" style="width: 247px; height: 22px;" /></p
  </tr>
  <?php } ?>
This worked for me. Not quite sure if it's right, but it worked?

Thank you very much, that was really annoying me.....you know how it is!

Newbie

Posts

Joined
Wed Jan 11, 2012 12:41 am

Post by tmas73 » Mon Feb 13, 2012 12:07 pm

Hi. I wonder what code I need to display:

1) Credit or Debit Card
2) Paypal
3) Moneybookers

my code is

Code: Select all

<td><label for="<?php echo $payment_method['code']; ?>"><?php if ($payment_method['title']=="Credit or Debit Card") echo '<img src="components/com_ayelshop/opencart/catalog/view/theme/default/image/checkout_cards_252.png"'; else echo $payment_method['title']; ?>
Now it only displays the Credit Card Images, but I would like a paypal image as Number -2)- and a moneybookers image as -3)-

How would I have to alter the code to make this possible?

Would be great for any help on this.

Thomas

Newbie

Posts

Joined
Mon Feb 13, 2012 12:01 pm

Post by marcod » Tue Feb 14, 2012 4:30 am

This is the code you need for multiple payment methods (3 in this example):

Code: Select all

    <td><label for="<?php echo $payment_method['code']; ?>"><?php switch ($payment_method['title']): case 'Credit or Debit Card': echo '<img src="image/credit_debit_card.png"'; break; case 'PayPal': echo '<img src="image/paypal_logo.png"'; break; case 'Moneybookers': echo '<img src="image/moneybookers_logo.png"'; break; default; echo $payment_method['title']; endswitch?></label></td>
The names of the payment methods are case sensitive, so make sure you enter them in the code exactly as they appeared originally.
Eg, "Paypal" is not the same as "PayPal".

Don't forget to change the paths/names of the image files to whatever you have called them.

Newbie

Posts

Joined
Fri Jan 07, 2011 3:40 am

Post by tmas73 » Wed Feb 15, 2012 2:24 am

Awesome, thanks a lot. Would this solution include a text alternative just in case the images would not load?

Thanks

Newbie

Posts

Joined
Mon Feb 13, 2012 12:01 pm

Post by someartworker » Sat Mar 03, 2012 11:52 pm

I have a question regarding Paypal that I originally posted here: http://forum.opencart.com/viewtopic.php?f=20&t=54893
someartworker wrote:For days and days now, I've been trying to make a shop I'm working on connect to Paypal. If anyone has any information that can help me, I'd greatly appreciate it.

Everything in the shop works correctly, except when you select Paypal as the payment on the checkout page and you finally get to the last step and click the "Confirm Order" button, nothing happens.

I am using a clean install and the most recent version of OpenCart (1.5.1.3.1) and the cart can be viewed here: http://order.uptowneggrolls.com

Thanks in advance.

Any help would be much appreciated.

Thanks.

Newbie

Posts

Joined
Sat Mar 03, 2012 1:11 am

Post by davidx » Sun Apr 08, 2012 11:23 pm

and for display text and image at same time, can we doo it?

Newbie

Posts

Joined
Wed Feb 29, 2012 6:13 pm

Post by MaxTech » Fri May 18, 2012 11:38 am

To answer a couple of the questions about showing text if no picture, use something like:

Code: Select all

      <?php // code required to add pictures to the payment methods display on checkout 
      ?>
          <td>
	          <label for="<?php echo $payment_method['code']; ?>">
		          <?php switch ($payment_method['title']): 
		          	case 'PayPal Hosted': echo '<img src="images/pp_hosted.png" title="PayPal Hosted Payment Solution" alt="PayPal Hosted Secure Payments">';
		          break;
		          	case 'PayPal': echo '<img src="images/paypal_logo.png" title="PayPal Payment Accepted" alt="PayPal Secure Payments">';
		          break; 
		          	case 'Bank Transfer': echo '<img src="images/banktransfer.png" title="Bank Transfer Accepted" alt="Bank Transfer">';
		          break;
		          	default; echo $payment_method['title'];	
		          endswitch?>
	          </label>
          </td>
      <?php // END - code required to add pictures to the payment methods display on checkout 
      ?>
Works perfectly . . . . Hope that helps, Max

Newbie

Posts

Joined
Tue May 01, 2012 10:36 am

Post by peter-hnr » Wed Feb 13, 2013 2:40 am

Old post I know
but i changed the line 3 in pp_standard.php, to
$_['text_title'] = '<img src="/image/paypal_logo_30.png" border="0">';
in catalog/language/yourlanguages/payment
easy and works fine for me with miltiple payment choises.
/P

New member

Posts

Joined
Wed Apr 04, 2012 6:56 am
Who is online

Users browsing this forum: No registered users and 4 guests