ZenPaypal Plugin new version !

i've writing a new version of zenpaypal plugin.

- add new options default to setting html background of paypal page web, to test it with sandbox paypal, and others options to using with paypal cart.
- modify php code

it's run as cart (panel) ... also, it's possible to adding few objects in the cart before billing.

To install it, please read the install.txt in the archive zip

The archive is downloadable here : http://dev.stephane-huc.net/share/zenphoto/zenpaypal.zip
«13

Comments

  • Excellent adjustments to the plugin, I noticed however that there's still an extra </div> at the end of the pricelist function. Also, the buynow button is hardcoded to the french button.. perhaps that could be set to use the proper locale setting?
  • The cart sounds very intriguing. I was thinking of trying to build something like that myself. I look forward to playing with your plugin. Thanks!
  • Another minor bug, the price list div is showing the last item in the pricelist as the link, instead of saying "price list".
  • I've modified :
    - implement all currencies supported by Paypal
    - function zenPaypalToJS : delete variables in appel
    - function zenPaypal :
    -> inverse order of variable $pricelistlink and $pricelist in appel
    -> 'localize' url for buttons ;-)
    -> a lot of bits to modified. @micheall : ty.

    New archive : http://dev.stephane-huc.net/share/zenphoto/zenpaypal.zip
  • Thanks for the quick work on those hucste, only thing I can see now is that the pricelist doesn't appear at all. I've tried toggling the pricelist to true in the zenpaypal.php to no effect. Perhaps I'm missing something. I don't see any options in admin to display it or not, so not sure where it's going wrong. I'll check the cgi error log and let you know if it displays any errors.

    Edit: not seeing any errors in the cgi log, so not sure...
  • acrylian Administrator, Developer
    @hucste: Thanks for taking over that one, the eZenphoto solution the original developer moved to is a little to big for many and also sadly technically speaking not optimal (it's a hack of Zenphoto 1.2.4 and not even a plugin...).

    It would be great if you could make a small project page for that plugin with changelog and download that we can link to from our plugins section. Thanks!
  • @micheall : how have you writing zenPaypal on your script image ?

    now is zenPaypal(true) to activate pricelist in code html !

    @acrylian : oki ... in few hours :p
  • <?php if (function_exists('zenPaypal')) { zenPaypal(NULL, true, "Price List"); } ?>

    is my current call to it.

    Edit:
    Ahh, I see you changed the structure so all it needs is zenpaypal(true). Do the rest of the variables that were there not get parsed now and need to be changed in the hardcode itself?
  • @micheall : please, quite a few moments ... i'm implement this in section administration ;-)
  • acrylian Administrator, Developer
    Thanks, I will update the entry on our plugins page.

    Update done and you made it to our news section as well..;-)
  • I dropped the folder into plugins, but it's not showing up under administration > plugins so I can activate it. Am I missing something? This is in 1.2.6.

    By the way, the instructions refer to"plugins" as "extensions". Should be updated. :)
  • acrylian Administrator, Developer
    Plugins are extensions and in the coming 1.2.6 the standard plugins reside in zp-core/zp-extensions...;-)
  • plugins in zp-extensions: is for 1.2.7, no ?!

    http://www.zenphoto.org/2008/06/zenphoto-plugins/

    [quote]
    Optional plugins need to be placed within the zp-core/plugins folder.

    Note: In the coming 1.2.7 release they will need to be place within the plugins folder within the root of your Zenphoto installation. Included standard plugins are located in zp-core/zp-extensions.
    [/quote]
  • The text means that, in 1.2.7, the plugins distributed with zenphoto should be in zp-core/zp-extensions. Any other plugins (third-party or otherwise) should be placed in the plugins directory in the root of the zenphoto installation.
  • Just a note on that, I placed it in root/plugins folder from the get-go and it's worked flawlessly. And everything looks good hucste. I'll poke around a bit more to see if I can find anything else broken but otherwise I think you've covered everything that everyone could need with it.

    Edit: One thing that might be worth adding as an option is to include the Album name for paypal as well. I know my images are normally the camera-named images and seeing Image: DSCN123124.jpg and having to sort through might be a pain.

    Something like:

    `$zenPaypalHTML .= "\t"."\t"."\t".'form_paypal.item_name.value = "'.gettext('Album: ').getBareAlbumTitle().gettext(' - Photo: ').getImageTitle().gettext(' - Size: ').$itemparts0.gettext(' - Media: ').$itemparts1.'";'."\n";`
  • @micheall: ty. good idea for the album. Now this is modifiable in section "Administration" ;-)

    New archive :
    - http://zenphoto.dev.stephane-huc.net/news/ZenPaypal-Plugin-1.1.3-EN
    - http://zenphoto.dev.stephane-huc.net/news/ZenPaypal-Plugin-1.1.3-FR
  • Aie, it's a fantastic plugins. It's work fine for me.

    I have a question, is there a way to disable this plugin for some pictures ?

    Laurent
  • @laurent: ty. and no; because i don't any idea how to do this!
  • acrylian Administrator, Developer
    Quick and easy workaround without even touching the plugin:
    Use the custom image field to enter for example "nopaypal" and then check on the theme page with a simple "if" statement if the paypal function should be shown.
  • What he means is the gallery admin would set a custom field up for a "nopaypal" check, and then in their theme files, they'd add something like "if (customfield != nopaypal) then display paypal stuff. I haven't worked with the customfield stuff myself so not sure the exact usage of it
  • acrylian Administrator, Developer
    Thanks micheall, that's it. It's really just `if(getImageCustomData() == "paypal") { printPaypal; }`> (or the other way round).

    I would suggest not to include this check within the plugin.
  • ok, thanks to both. I'm going to write this on my pages ;-)
  • @hucste

    Your comments on the zenpaypal page under the tips should read:
    <?php
    if(function_exists('zenPaypal')) {
    if(getImageCustomData() != 'nopaypal') { zenPaypal(); }
    }
    ?>

    You're missing the {} and a ;

    Keep up the great work on the plugin though, it's nice to have it supported again!
  • acrylian Administrator, Developer
    One short note to recommended Zenphoto function name guide lines, since you also reworked some code anyway and before you get too fat. Functions that only fetch data should be named `get`something and functions that do echo something `print`something. That makes it easy to see what a function generally does.

    I just spotted that this is missing on our developer guidelines so I will add it.
  • @micheall: ty. the '{}' is not necessary when you have oe only instruction in bloc if ...but, i've missed ';' ;-)

    @acrylian: ok, if i understand you, that's better than rename function 'zenPayPalDisplayPaypalLogo' to 'printPayPalLogoforZenPaypal', isnt-it ?!
  • acrylian Administrator, Developer
    Shorter would be just `printZenPayPalLogo()` for example, if you want to keep the "zenpaypal" in all functions...:-)
  • ok, it's modified. v.1.1.5 !
    (not necessary to update your version, just to be compliant with our guideline ;-) )

    http://zenphoto.dev.stephane-huc.net/pages/ZenPaypal-Plugin-EN
    http://zenphoto.dev.stephane-huc.net/pages/ZenPaypal-Plugin-FR
  • Whaou,

    you are great, i ask for a option yesterday and today i saw a new version, thank you very much to you.

    @hucste : i saw your french web page, it's better for me ;-)
    I will try it this week-end, to much work now.

    Laurent
Sign In or Register to comment.