Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Google Checkout Button Replace

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-15-2008, 08:46 PM
 
ianfranklin ianfranklin is offline
 

Member
  
Join Date: Oct 2007
Posts: 10
 

Default Google Checkout Button Replace

Hello,

I wanted to know how to replace the default google checkout button with a larger google checkout button. When I go into:

/modules/Google_Checkout/gcheckout_button.tpl

There is a piece of code for the button:

{$gcheckout_button}

I want to know how to acess the image links for the button I want to use which is also a google checkout button but larger.
__________________
Ian Franklin
V 4.1.9
http://www.installeroasis.com
Reply With Quote
  #2  
Old 08-15-2008, 09:18 PM
 
ianfranklin ianfranklin is offline
 

Member
  
Join Date: Oct 2007
Posts: 10
 

Default Re: Google Checkout Button Replace

Ok, I spoke too soon but here is the answer

1)download notepad ++ to use for editing the PHP file you need

2)Use your favorite FTP program to download the gcheckout_button.php from :

(root x-cart file directory)/ modules/Google_checkout

3)Open the file up with notepad ++

4) scroll to line 52 and find the google checkout button link

~Pause~

Now I went to this link

http://checkout.google.com/seller/checkout_buttons.html#generate_button_url

and chose the button I wanted and then cut the link to use to check the difference between line 52 and the link. There isn't much except some code.

~UnPause~

5) temporarily paste the cut link after all the code in gcheckout_button.php so you can use it for reference.

6) Line 52 code will look something like this:

<img src="$_https://$gcheckout_env.google.com/{$gcheckout_sbx}buttons/checkout.gif?merchant_id={$config['Google_Checkout']['gcheckout_mid']}&amp;w=160&amp;h=43&amp;style=trans&amp;variant={$_gc_button_variant}&amp;loc=en_U S" width="160" height="43" border="0" alt="" />

All thats important here is the text in bold

"style=trans" = this is what the google checkout button is set default to in x-cart. This is what gives the button a gnarly edge on the right side. I set it to "style=white" and that gave it a clean edge with a drop shadow.

width="160" height="43" - Again default. This is the dimension of the small google checkout button that google offers. The different size buttons that you can have are just resizes from the same button. This is where the cut button link from the "~pause~' part comes in because you can change the dimension of your xcart button on line 52 from the link you cut from the google button you selected.

So change the style from "trans" to "white" if your on a white background and want a pretty edge.

Change the dimensions to make your button bigger our smaller if you wish.


7 )Remove the link you pasted temporarily at the bottom of the file before you save the file

once you've done these steps save this file as a PHP file but into a different directory so that you'll still have the original you downloaded just in case you mess something up.


now upload the the gcheckout_button.php file in the same place and thats it.
It will be bigger and better or whatever you set it to.

Hope this is clear enough and hope it helps someone!
__________________
Ian Franklin
V 4.1.9
http://www.installeroasis.com
Reply With Quote
  #3  
Old 09-14-2008, 06:32 PM
 
hotliquer hotliquer is offline
 

Member
  
Join Date: Sep 2005
Posts: 10
 

Default Re: Google Checkout Button Replace

Very clear.

Thanks for taking the time to post your outcome.

Twas just what I was looking for!
__________________
Ben Taylor

X-Cart version 4.1.11
OS Win XP PRO
http://www.bristol-glass.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:02 AM.

   

 
X-Cart forums © 2001-2020