Coppermine Photo Gallery Shop manual.

This page has the instructions for using Coppermine as a shop for photoprints, using Paypal.

For general Coppermine setup, see the manual, see the index.html, in the docs folder of the official coppermine download.


Support for this hack should be asked only on the associated thread in the modifications board of the Coppermine forums.

This hack is not designed for use with Nuke or CMS versions of Coppermine, although a decent coder with knowledge of these versions should be able to make any required changes. Please do not ask for help with this on the standalone version boards.

Requirements

There is only one extra requirement to the standard setup, and that is you require a Premier or Business account with Paypal. This is easy to set up, and will make it easy for you to collect your payments.

Installation.

If this is a complete new install, first upload and install version 1.4.3 of Coppermine, and ensure it is working correctly.

Note, if using version earlier than 1.4.3, update to the latest version.

The installation of this version is exactly the same as for the standard version, except you should first choose how many print sizes you are going to offer, and if you are going to offer choice of paper type or not.

If you are using the classic theme, simple open the file enclosed in the enclosed themes folder called theme.php, and find this code;

<option value="{$CONFIG['size1']} @{$CONFIG['size1_price']} ">{$CONFIG['size1']}; {$CONFIG[currency_symbol]}{$CONFIG['size1_price']}</option><br>
<option value="{$CONFIG['size2']} @{$CONFIG['size2_price']}">{$CONFIG['size2']} ; {$CONFIG[currency_symbol]}{$CONFIG['size2_price']}</option><br>
<option value="{$CONFIG['size3']} @{$CONFIG['size3_price']}">{$CONFIG['size3']} ; {$CONFIG[currency_symbol]}{$CONFIG['size3_price']}</option><br>

<option value="{$CONFIG['size4']} @{$CONFIG['size4_price']}">{$CONFIG['size4']} ; {$CONFIG[currency_symbol]}{$CONFIG['size4_price']}</option><br>
<option value="{$CONFIG['size5']} @{$CONFIG['size5_price']}">{$CONFIG['size5']} ; {$CONFIG[currency_symbol]}{$CONFIG['size5_price']}</option><br>
<option value="{$CONFIG['size6']} @{$CONFIG['size6_price']}">{$CONFIG['size6']} ; {$CONFIG[currency_symbol]}{$CONFIG['size6_price']}</option><br>
<option value="{$CONFIG['size7']} @{$CONFIG['size7_price']}">{$CONFIG['size7']} ; {$CONFIG[currency_symbol]}{$CONFIG['size7_price']}</option><br>

<option value="{$CONFIG['size8']} @{$CONFIG['size8_price']}">{$CONFIG['size8']} ; {$CONFIG[currency_symbol]}{$CONFIG['size8_price']}</option><br>
<option value="{$CONFIG['size9']} @{$CONFIG['size9_price']}">{$CONFIG['size9']} ; {$CONFIG[currency_symbol]}{$CONFIG['size9_price']}</option><br>
<option value="{$CONFIG['size10']} @{$CONFIG['size10_price']}">{$CONFIG['size10']} ; {$CONFIG[currency_symbol]}{$CONFIG['size10_price']}</option><br>
<option value="{$CONFIG['size11']} @{$CONFIG['size11_price']} ">{$CONFIG['size11']}; {$CONFIG[currency_symbol]}{$CONFIG['size11_price']}</option><br>

<option value="{$CONFIG['size12']} @{$CONFIG['size12_price']}">{$CONFIG['size12']} ; {$CONFIG[currency_symbol]}{$CONFIG['size12_price']}</option><br>
<option value="{$CONFIG['size13']} @{$CONFIG['size13_price']}">{$CONFIG['size13']} ; {$CONFIG[currency_symbol]}{$CONFIG['size13_price']}</option><br>
<option value="{$CONFIG['size14']} @{$CONFIG['size14_price']}">{$CONFIG['size14']} ; {$CONFIG[currency_symbol]}{$CONFIG['size14_price']}</option><br>
<option value="{$CONFIG['size15']} @{$CONFIG['size15_price']}">{$CONFIG['size15']} ; {$CONFIG[currency_symbol]}{$CONFIG['size15_price']}</option><br>

<option value="{$CONFIG['size16']} @{$CONFIG['size16_price']}">{$CONFIG['size16']} ; {$CONFIG[currency_symbol]}{$CONFIG['size16_price']}</option><br>
<option value="{$CONFIG['size17']} @{$CONFIG['size17_price']}">{$CONFIG['size17']} ; {$CONFIG[currency_symbol]}{$CONFIG['size17_price']}</option><br>
<option value="{$CONFIG['size18']} @{$CONFIG['size18_price']}">{$CONFIG['size18']} ; {$CONFIG[currency_symbol]}{$CONFIG['size18_price']}</option><br>
<option value="{$CONFIG['size19']} @{$CONFIG['size19_price']}">{$CONFIG['size19']} ; {$CONFIG[currency_symbol]}{$CONFIG['size19_price']}</option><br>

<option value="{$CONFIG['size20']} @{$CONFIG['size20_price']}">{$CONFIG['size20']} ; {$CONFIG[currency_symbol]}{$CONFIG['size20_price']}</option>


Now delete all the lines refering to options you are not using, i.e., if you are allowing 6 choices of size, remove, or edit out, the lines for options 7 - 20.

Now, if you are giving the options for paper choice, you are done, if not, find this code, which is just after the last options, and remove it;

Paper&nbsp; &nbsp;
<input type="hidden" name="on0" value="Paper"><select name="os0"><option value="Glossy">Glossy<option value="Matt">Matt<option value="Satin">Satin</select>

&nbsp; &nbsp; 


Save the theme.php file.


Upload all files to the server, into the respective folders and replacing the existing ones, and run update.php. The shop will not work if you miss this update.
Upload the pictures in the images folder into the images folder on the server.



Setting up shop.

Config

Once the coppermine install is up and running, you need to set up the configuration.
Log on in admin mode, and click on the 'config' menu item.

Setting the paypal account email

This must contain the email address which is your registered address with paypal.

Setting prices

You now need to set up the config to show your prices and options.
Still in config, find the 'Shop sizes and prices' section.
Fill in the sizes you are making available, and their prices. Do not use any currency code in these fields, for example, for a price of $10.99 do not enter the $, just 10.99.





Setting Currency

Now you have to set the currency symbol and code. The symbol is used to display the correct symbol to the viewer, and the code is used by the paypal button.
It is important that for the code, you use only the correct one as shown for your currency, and use upper case. The symbol is not critical, so you can just use '$' instead of 'US$', if you prefer.





Now set the 'thumbnail view' settings. You are advised to set these as shown here;





Uploading your pics.

Pics are uploaded as normal.

You can upload up to 10 pics at a time using the html upload method.
Unless you only have only a few to upload, you are advised to upload to the server by ftp. You should ensure they are put into folders you create within the albums folder, but not into the 'userpics' folder.
Now use the 'batch add' function from the admin menu, to place these pics in your albums.

Once placed in the album, the pictures need to have their info added. Click on the 'edit files' button, next to the album thumb.



In the edit files area, you can do most things to each picture.
It is important that you fill in the 'picture title'.

Note that you can use BB Code in the description, to add links etc.





Hopefully, when you look at at picture, you should see something like this, which is in the smf theme.





Customising the PayPal buttons


Do not attempt this unless you know what you are doing.

If you have set up re-direct pages etc., you can add these to the paypal button code.
Simply look at the code for your re-direct pages, and add it in to each of the buttons on the theme.php you are using.


You can also change the buttons themselves, again simply replace the existing button url ("https://www.paypal.com/en_GB/i/btn/x-click-but22.gif") with your own one.



Adding languages

The only language included in the package is English, but any language file can be edited to include the shop section.


Open your language file, and find;
'array('Character encoding', 'charset', 4),'


add the following below, and edit the red text to your language;

'Paypal shop account email',
  array('Paypal email account', 'paypal_email', 0),

'Shop sizes and prices',
array('Size 1', 'size1', 0),
array('Price size 1', 'size1_price', 0),
array('Size 2', 'size2', 0),
array('Price size 2', 'size2_price', 0),
array('Size 3', 'size3', 0),
array('Price size 3', 'size3_price', 0),
array('Size 4', 'size4', 0),
array('Price size 4', 'size4_price', 0),
array('Size 5', 'size5', 0),
array('Price size 5', 'size5_price', 0),
array('Size 6', 'size6', 0),
array('Price size 6', 'size6_price', 0),
array('Size 7', 'size7', 0),
array('Price size 7', 'size7_price', 0),
array('Size 8', 'size8', 0),
array('Price size 8', 'size8_price', 0),
array('Size 9', 'size9', 0),
array('Price size 9', 'size9_price', 0),
array('Size 10', 'size10', 0),
array('Price size 10', 'size10_price', 0),
array('Size 11', 'size11', 0),
array('Price size 11', 'size11_price', 0),
array('Size 12', 'size12', 0),
array('Price size 12', 'size12_price', 0),
array('Size 13', 'size13', 0),
array('Price size 13', 'size13_price', 0),
array('Size 14', 'size14', 0),
array('Price size 14', 'size14_price', 0),
array('Size 15', 'size15', 0),
array('Price size 15', 'size15_price', 0),
array('Size 16', 'size16', 0),
array('Price size 16', 'size16_price', 0),
array('Size 17', 'size17', 0),
array('Price size 17', 'size17_price', 0),
array('Size 18', 'size18', 0),
array('Price size 18', 'size18_price', 0),
array('Size 19', 'size19', 0),
array('Price size 19', 'size19_price', 0),
array('Size 20', 'size20', 0),
array('Price size 20', 'size20_price', 0),
array('Currency symbol US$ - Can$ - £ - € - ¥', 'currency_symbol', 0),
array('Currency USD-CAD-GBP-EUR-JPY', 'currency', 0),






Well, that's it, your shop should be up and running now.
Good luck.