All that is needed is to have a definition of the form that is used by the Google Checkout. The Paypal plugin is a good start for modifications, but I would suggest cloning into a Google plugin rather than trying to make one version that does both services.
Do you have a Google Merchant ID? It looks pretty simple to make this implementation, but I have no way to test it.
I have placed an experimental Googal Checkout plugin in the nightly build. I have not tested it as I do not have a merchant ID. Please give it a try and provide feedback.
Okey doke, I've been trying to get the plugin to work, but the plugins page gives me these errors (and won't let me activate the plugin).
Warning: exif_read_data() [function.exif-read-data]: Unable to open file in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/exifimagerotate.php on line 2
Warning: imagecreatefromjpeg(SRC_IMAGE) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 8
Warning: imagesx(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 9
Warning: imagesy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 10
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 11
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 23
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 25
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 26
Fatal error: Cannot redeclare imagerotate() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_rotate.php on line 45
Alright. I replaced the /zp-core/plugins directory with the one from the May 3rd nightly build, and that took away the errors in the plugins admin page.
Now, however, I get two errors when looking at an image:
This one shows up at the top, above the breadcrumb.
Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177
This one is at the bottom, where the comment field used to be (it disappeared).
Fatal error: Call to undefined function printImageMap() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 62
Sorry, I mis-read trisweb's instructions. Ok. I've reinstalled everything except the Themes folder, and the errors persist. Do I need to customize my theme from scratch? Are there new things in the theme that are causing the error?
ImageMap is part of the plugin google maps. You have to activate it on the options plugin tab first to use it. If you don't want to use it delete it from your theme or place `if(function_exists("printImageMap") { printImageMap();` around it.
...I know how to make an include, that's about it! I can design circles around anyone, but I'm a novice when it comes to code. Trying to figure out ZenPhoto is probably the most indepth "training" I've ever had.
I fixed the code so that it reads: `<?php if(function_exists("printImageMap")) { printImageMap(); ?>`
I still get errors, though... this one in Gallery view: `Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177`
This one in image view: `Parse error: syntax error, unexpected $end in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 118`
The code is still wrong, but my fault again, I forgot another bracket.....:-)) Here finally the right one: `<?php if(function_exists("printImageMap")) { printImageMap() } ?>`
I was just judging from the one line I posted and that itself is (now) correct. I don't know of couse what else code you have in your image.php. Please check if all brackets are closed and if there is not one too much.
Alright. I checked it, found the bracket and fixed it.
What should I look for for this other error? `Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177`
And where is the Google Checkout option actually supposed to show up? I don't see it.
There must be something else wrong in your theme. Probably another bracket.
You have to add the google checkup function to your theme manually as with all additional functions. Of course It won't show up automatically. Please see the documentation (the svn one) for info.
Back to installing the Google Checkout, though... I found the doc you're referring to; but I don't understand how to install the code on my page. The document makes no sense to me.
It's like with nearly all functions, just place `<?php googleCheckout(); ?>`to print the button. Of course you need to fill in your google checkout data in the plugin options, too.
We need somehow to find out what Google does not like in the posting. I don't have a Google Merchant Account and don't know what kind of debugging aids they have. (That is why this plugin is marked experimental--I could not check it out, only provided what I thought Google wanted in the form.)
Do you have other WEB applications that use Google Checkout? We might be able to tell something by looking at them.
sbillard - I was setting up a gallery for a friend whose wife is a photographer and they really wanted this feature, so I have built a working plugin. Please let me know where/how/when to post it so that you can take a look at it. I used the new Google checkout shopping carts script/API, so it tracks all items added to the cart and allows you to view the cart from a dropdown javascript element over the site. I thinks it's a great solution and am really excited to help out by sharing back the work I've done.
Mammlouk: Please create a TRAC ticket and attach the plugin. I did find some problems with the released version which are now fixed in tonight's nightly build.
Comments
Does that help?
I have placed an experimental Googal Checkout plugin in the nightly build. I have not tested it as I do not have a merchant ID. Please give it a try and provide feedback.
I've been trying to get the plugin to work, but the plugins page gives me these errors (and won't let me activate the plugin).
Warning: exif_read_data() [function.exif-read-data]: Unable to open file in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/exifimagerotate.php on line 2
Warning: imagecreatefromjpeg(SRC_IMAGE) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 8
Warning: imagesx(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 9
Warning: imagesy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 10
Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 11
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 23
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 25
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_mirror.php on line 26
Fatal error: Cannot redeclare imagerotate() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/plugins/image_rotate.php on line 45
We need to fix this for the next version I think, so it won't be a problem, but for now that should work.
Now, however, I get two errors when looking at an image:
This one shows up at the top, above the breadcrumb.
Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177
This one is at the bottom, where the comment field used to be (it disappeared).
Fatal error: Call to undefined function printImageMap() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 62
You can see this in action here:
http://zerflin.com/ZenPhoto/index.php?album=artwork/Vector People&image=Tamikas Mural outlines.jpg
Anyway it's recommended not just to replace one folder but to update the whole installation.
Ok. I've reinstalled everything except the Themes folder, and the errors persist.
Do I need to customize my theme from scratch? Are there new things in the theme that are causing the error?
I inserted what you gave me in the image.php file of the theme, so that it looks like this:
<?php if(function_exists("printImageMap") { printImageMap(); ?>
but it gave me this error:
Parse error: syntax error, unexpected '{' in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 62
I can design circles around anyone, but I'm a novice when it comes to code. Trying to figure out ZenPhoto is probably the most indepth "training" I've ever had.
I fixed the code so that it reads: `<?php if(function_exists("printImageMap")) { printImageMap(); ?>`
I still get errors, though... this one in Gallery view: `Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177`
This one in image view: `Parse error: syntax error, unexpected $end in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 118`
Here finally the right one: `<?php if(function_exists("printImageMap")) { printImageMap() } ?>`
I still get these errors:
`Parse error: syntax error, unexpected '}' in /home/content/b/j/a/bjancewicz/html/ZenPhoto/themes/default/image.php on line 62`
`Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177`
What should I look for for this other error? `Warning: Invalid argument supplied for foreach() in /home/content/b/j/a/bjancewicz/html/ZenPhoto/zp-core/template-functions.php on line 177`
And where is the Google Checkout option actually supposed to show up? I don't see it.
You have to add the google checkup function to your theme manually as with all additional functions. Of course It won't show up automatically. Please see the documentation (the svn one) for info.
Here the direct link to the google checkup doc: http://www.zenphoto.org/documentation/zenphoto/_plugins---GoogleCheckout.php.html
To your error problem: How should I know? You could post the code of that page, then I could take a look.
Back to installing the Google Checkout, though... I found the doc you're referring to; but I don't understand how to install the code on my page. The document makes no sense to me.
I tried to read this too for help, (http://www.zenphoto.org/2008/04/how-to-read-the-zenphoto-functions-guide/) but I don't know what to include from the `void` line of code.
Is there anyone that has this on their gallery already that I could copy the code from, or can you help me understand the document?
I've got it installed. I have a Google Merchant account, and have put in all my information correctly.
It doesn't seem to be working, though; when I try to hit the Checkout button on an image, an error comes up from Google.
http://zerflin.com/ZenPhoto/index.php?album=artwork/Vector+Things&image=A+CHILD+OF+5.jpg
What can I check?
Do you have other WEB applications that use Google Checkout? We might be able to tell something by looking at them.
Thanks,
-Jeremy