WordPress.org

Support

Support » Plugins and Hacks » NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] Adding automated PayPal forms to nextGEN Gallery

[Plugin: NextGEN Gallery] Adding automated PayPal forms to nextGEN Gallery

  • I am putting together a photography site who has hardly any HTML experience. I wanted to customise NextGEN to auto-fill the PayPal details for each image.

    What I wanted to do was make it really simple for him to upload his images into galleries and then for it to simply generate the paypal code for each photo on the fly (6×9 etc). Less for him to type/code etc.

    I have attempted to alter shutter-reloaded.js and add a series of forms to the section underneath the code line:

    imgNum = ( (shutterLinks[ln].num > 0) && t.imageCount ) ? ‘<div id=”shCount”> ( ‘ + shutterLinks[ln].num + ‘ / ‘ + shutterSets[shutterLinks[ln].set].length + ‘ )&nbs$

    I added the following form into the javascript:

    <form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>

    <SELECT name=”quantity”>
    <option value=”1″ SELECTED>1</OPTION>
    <option value=”2″ >2</OPTION>
    <option value=”3″ >3</OPTION>
    <option value=”4″ >4</OPTION>
    <option value=”5″ >5</OPTION>

    <option value=”6″ >6</OPTION>
    <option value=”7″ >7</OPTION>
    <option value=”8″ >8</OPTION>
    <option value=”9″ >9</OPTION>
    <option value=”10″ >10</OPTION>
    </SELECT>

    <input type=”hidden” name=”cmd” value=”_xclick”>
    <input type=”hidden” name=”business” value=”removed@example.com”>
    <input type=”hidden” name=”item_name” value=”6×4 Print ‘ + shutterLinks[ln].link + ‘ “>
    <input type=”hidden” name=”item_number” value=”‘ + shutterLinks[ln].link + ‘-6×4″>
    <input type=”hidden” name=”amount” value=”2.50″>
    <input type=”hidden” name=”no_note” value=”1″>
    <input type=”hidden” name=”currency_code” value=”GBP”>
    <input type=”hidden” name=”lc” value=”GB”>
    <input type=”image” src=”https://www.paypal.com/en_US/i/btn/x-click-but23.gif” border=”0″ name=”submit” alt=”Buy with PayPal!”>

    </form>

    For some reason it’s not appearing and simply links direct to the image itself. JS is not compiling I guess!

    I’ve done some tests and it appears to not allow the drop down box, and when I remove that code and just have the paypal link it doesn’t go anywhere.

    Can anyone help me out? If I can’t do it this way at all, how do I just make it go to a new page with these details on it instead of showing the nice jQuery pop up?

    Thanks

  • The topic ‘[Plugin: NextGEN Gallery] Adding automated PayPal forms to nextGEN Gallery’ is closed to new replies.
Skip to toolbar