Next Gen Gallery and PayPal Add to Cart Button
My last post discussed adding a slide show to the front page of your site using Next Gen Gallery. You can also add a shopping cart to your site and Pay pal buttons to the pictures in your gallery, essentially creating an online store. Take a look at Maestroartservicesintl.com where Pay pal buttons were added to the artists’ paintings.
There is a great tutorial on adding the Paypal shopping cart at: http://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768 and a tutorial on adding the “Add to Cart” buttons at: http://www.wordpress-ecommerce.com/wordpress-shop-using-nextgen-gallery-and-wp-shopping-cart-7
Download the plugins for WordPress Simple Paypal Shopping Cart and WP eStore template file. Unzip and upload the WP Simple Paypal shopping cart plugin to your plugin folder. Activate the plugin. Unzip and upload the WP estore template file (gallery-wp-eStore.php) into wp-content ->plugins -> Next Gen Gallery ->View folder.
- If you are using Next Gen Gallery as a store, you need a gallery for each category of items in your site.
- Create your galleries as described in my previous post.
- Select Gallery -> Manage Gallery from the left menu bar.
- Select and open the gallery where you want to add the Paypal buttons.
- Scroll down the page until you see the pictures in your gallery.
- The code to add the Paypal “Add to Cart” button is entered into the description box of your picture.

I created a Paypal account and generated the code for my button from there. You need a merchant services /business account. Open the Merchant services tab and click the link to “create Add to Cart button”. Follow the wizard to create your button. PayPal uses the information you enter for this item to create the HTML code for your “Add to Cart” button. Copy this HTML code and go back to the gallery page. Paste the code into the “Description” box next to your picture.
To add the gallery with the “Add to Cart” buttons to your page use this code:
[ nggallery id=X template=wp-eStore ] where “X” is the ID number of your gallery. The wp-estore template is the php file we copied into the plugins -> Next Gen -> views folder earlier. This is the file that puts the “Add to Cart” button below your picture. Note: there is a space after the bracket in the code so WordPress does not try to insert a gallery with this code. If you copy the code, remove the space before and after the bracket.
Paypal also generates the code to “View Cart”. You can copy that code and paste it into a page where you want the shopping cart to appear.



