| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Google Checkout Button Replace | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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. |
|||||||
#2
|
|||||||
|
|||||||
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']}&w=160&h=43&style=trans&variant={$_gc_button_variant}&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! |
|||||||
#3
|
|||||||
|
|||||||
Re: Google Checkout Button Replace
Very clear.
Thanks for taking the time to post your outcome. Twas just what I was looking for! |
|||||||
|
|||
X-Cart forums © 2001-2020
|