[Paypal checkout / Matrix] button confusion

racepics

Joined: 2006-03-30
Posts: 39
Posted: Thu, 2010-04-08 21:55

I'm using both Email Checkout and Paypal Checkout modules.
Many of my customers are clicking the Email Checkout button when they actually wanted to pay by credit card.
I think the confusion is that the paypal button just looks like some sort of logo and very different from the standard grey buttons that they used to get this far along in the ordering process.

Is there a way to replace the standard Paypal logo/button with one the looks that same as all the others but clearly states [CLICK HERE TO PAY BY CREDIT CARD] or something else blindingly obvious :)

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-04-08 22:56

It's pretty obvious, I think. The html for the paypal button is in one of the template files (.tpl) in the checkoutpaypal module. If you're familiar with smarty/html you can change it to whatever you want. Follow the instrutions at the top of the file *carefully* regarding modifying templates.

 
racepics

Joined: 2006-03-30
Posts: 39
Posted: Fri, 2010-04-09 03:58

Thanks alec - The paypal button is pretty obvious to those who know what paypal is :) Unfortunately many of the people in this country (NZL) do not. Those who are new to online shopping and struggle with even the most basic procedures.
Sometimes I wish I could just tell them to 'go ask a 12yr old to help you" lol.

In modules/checkoutpaypal/templates/ the bottom of the PaymentButton.tpl file we have:

<div style="width:200px">
<input type="image" src="http://{$payment.paymentVariables.ppurl}/{g->text text="en_US"}/i/btn/x-click-but01.gif"
name="submit" alt="{g->text text="Pay with PayPal"}" />
<input type="image" name="submit" alt="{g->text text="Pay with PayPal"}"
src="{g->url href="modules/checkoutpaypal/images/"}logo_ccVisa.gif" />
<input type="image" name="submit" alt="{g->text text="Pay with PayPal"}"
src="{g->url href="modules/checkoutpaypal/images/"}logo_ccMC.gif" />
</div>

I have tried changing the top src= line to show a button I've placed in modules/checkoutpaypal/images but that changes nothing in the website.

I cant see any info in the top of the file about modifying it..

This is the whole file:

{if $payment.paymentVariables.orderTotal > 0}
<form action="https://{$payment.paymentVariables.ppurl}/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="return" value="{g->url arg1="controller=checkout.OrderComplete" arg2="transactionId=`$payment.paymentVariables.transactionId`" arg3="verify1=`$payment.paymentVariables.verify[1]`" arg4="verify2=`$payment.paymentVariables.verify[2]`" forceFullUrl=true}" />
<input type="hidden" name="cancel_return" value="{g->url arg1="controller=checkout.OrderComplete" arg2="error=cancel" arg3="transactionId=`$payment.paymentVariables.transactionId`" arg4="verify1=`$payment.paymentVariables.verify[1]`" arg5="verify2=`$payment.paymentVariables.verify[2]`" forceFullUrl=true}" />
<input type="hidden" name="notify_url" value="{g->url arg1="view=checkoutpaypal.IPN" forceFullUrl=true}" />
<input type="hidden" name="image_url" value="{$payment.paymentVariables.imageUrl}" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="business" value="{$payment.paymentVariables.paypalname}" />
<input type="hidden" name="currency_code" value="{$payment.paymentVariables.ccode}" />
<input type="hidden" name="invoice" value="{$payment.paymentVariables.transactionId}" />
<input type="hidden" name="lc" value="{g->text text="en_US"}" />
{if !empty($payment.paymentVariables.pprtnbuttontext)}
<input type="hidden" name="cbt" value="{$payment.paymentVariables.pprtnbuttontext}"/>
{/if}
{foreach from=$payment.paymentVariables.ppItems item=item}
<input type="hidden" name="{$item.ppname}" value="{$item.name}" />
<input type="hidden" name="{$item.ppnumber}" value="{$item.number}" />
<input type="hidden" name="{$item.ppamount}" value="{$item.amount}" />
<input type="hidden" name="{$item.ppshipping}" value="{$item.shipping}" />
<input type="hidden" name="{$item.ppquantity}" value="{$item.quantity}" />
{foreach from=$item.options key=k item=i}
<input type="hidden" name="{$k}" value="{$i}" />
{/foreach}
{/foreach}
<div style="width:200px">
<input type="image" src="http://{$payment.paymentVariables.ppurl}/{g->text text="en_US"}/i/btn/x-click-but01.gif"
name="submit" alt="{g->text text="Pay with PayPal"}" />
<input type="image" name="submit" alt="{g->text text="Pay with PayPal"}"
src="{g->url href="modules/checkoutpaypal/images/"}logo_ccVisa.gif" />
<input type="image" name="submit" alt="{g->text text="Pay with PayPal"}"
src="{g->url href="modules/checkoutpaypal/images/"}logo_ccMC.gif" />
</div>
</form>
{/if}

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2010-04-09 13:48
Quote:
I have tried changing the top src= line to show a button I've placed in modules/checkoutpaypal/images but that changes nothing in the website.

Save the modified file in a /local/ subdirectory. Leave the original unchanged. Clear the template cache after modifying template files (or turn off template caching while editing templates).

Quote:
I cant see any info in the top of the file about modifying it..

What about this bit that you forgot to quote? At the top of the file?

Quote:
{*
* $Revision: 1798 $
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}

It's dull dull dull to keep having to repeat the same advice because people don't read things.

 
racepics

Joined: 2006-03-30
Posts: 39
Posted: Fri, 2010-04-09 20:17
Quote:
What about this bit that you forgot to quote? At the top of the file?

I do not have that info in the top on my file, so I can only assume its been removed. (I'm not the only person who has worked on this site :) Having said that, I do already know about using /local/ directories for modified files, and did use one thanks.

Assuming that changing the top src= line is still the right thing to do to change the button, I will try again with the cache cleared.

Thanks.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2010-04-09 22:43
Quote:
I'm not the only person who has worked on this site

Ok - I totally understand. But something to bear in mind is that I (or anyone) can only give advice based on the files as distributed from the repository, we have to have a common baseline to work from - so it's up to you to make sure that if somebody gives you advice to change a particular line of a file, or reference the contents of a particular file, that you take the trouble to make sure you're looking at the same file contents as they're looking at. (Of course I could have forgotten to include that header in the relevant template file, but having checked, I didn't forget.)

If you just want a regular button like the checkoutemail module, then copy the code from the equivalent checkoutemail template. Your "changing the src tag" idea doesn't sound at all correct to me.