- ENGLISH PROVERB
Please note: As of Friday, May 3, 2013, cpshop is officially retired, and is no longer for sale. details
cpshop is incredibly easy to install. If you've installed perl scripts in the past, then you can probably guess how this works. If you prefer a little hand-holding, however, then here you are. Every step of the way is covered in exhaustive, even unnecessary detail.
Keep in mind that I really do cover every ridiculous detail in here, so if you know what you're doing feel free to skim.
This is what you'll need to have to set up cpshop:
Here's the most creative part of the process. Essentially, make an HTML page with special tags marking where certain content will go -- your cpshop distribution should have come with a demo file called cptemplate.html, which you can edit if you prefer. I'll assume here you call the template "cptemplate.html", though you can really call it anything you want.
List of tags:
<meta type=keywords value="<[keywords]>">
<meta type=description value="<[description]>">
Here is an example of a very typical (and very boring) looking template. Feel free to cut-and-paste it, if you'd like to use it as a starting point:
Some hints in creating your template:
Step Three: Rename cpshop.cgi and cpshop.cgi.config/cpshop.cgi.images (optional)
If you want to, you can rename cpshop.cgi to something else, like "cpshop.pl", "cpshop", or "mystore".
If you do rename cpshop.cgi, you also have to rename cpshop.cgi.config and cpshop.cgi.images to match. So if you rename cpshop.cgi to store.pl, then rename cpshop.cgi.config to store.pl.config, and cpshop.cgi.images to store.pl.images.
For the purposes of these instructions, I'll assume the name of the main script is still cpshop.cgi, the config file is still cpshop.cgi.config, and the image swap file is still cpshop.cgi.images.
Step Four: Set Up Your Dummy Store
No, you're not selling dummies. :) The Dummy Store serves two purposes: to tell cpshop which store to use as the base store for the cart and checkout process, and to allow you to redirect your visitors to cpshop from your shop.
If you don't have a premium shop, then do nothing for this step. Later on, however, I recommend you use the default entry (cpdefault) in the "Dummy Store ID" field in cpadmin, which will give your cart a plain white appearance (which is better than the heavily-branded CafePress look-and-feel).
If you do have a premium shop, and you're just planning on using cpshop for that shop, then I generally recommend you just enter that premium shop ID into the "Dummy Store ID" field in cpadmin (which you'll do when you're setting program options in step 8). However, if you'd also like visitors to be automatically bounced from your CafePress store to your cpshop store, then you should follow these instructions:
Step Five: Set The Admin Password
Open cpadmin.cgi in your text editor (once again, like Notepad), and change the password to something you can remember, but most people wouldn't think of. The password is located near the top of the script, between the quotes: $password = "mypass"
Later on, when you access the admin screen, you'll use this password to login. So don't forget it.
Step Six: Upload The Scripts
(Before you upload, make sure the first line in both cpshop.cgi and cpadmin.cgi points to the correct location of perl on your server. If you're not sure where it is [usually #!/usr/bin/perl or #!/usr/local/bin/perl] then try typing which perl from the telnet command line, or ask your system administrator.)
Using your FTP client, upload the script files to the server, along with any templates you've created, placing them in your cgi-bin directory (they can be in a sub-directory, like /cgi-bin/store/). Please note:
chmod 644 *chmod 766 cpshop.cgi.configchmod 755 cpshop.cgi cpadmin.cgi
Step Seven: Create Special Sub-Directories
After setting up these directories, cpshop can cache CafePress' pages, speeding up loading time for your visitors, decrease server load for both you and CafePress, and add logging capabilities to your store.
Note: Starting with version 2.0rc12, cpshop supports Output Caching, which speeds up program output even more, decreasing CPU usage dramatically. It does so at the cost of disk space, however, so the functionality is optional but highly recommended. To enable Output Caching, you should create a fourth directory called "cpoutput" and also chmod it to 777.
Note 2: Starting with version 2.3, cpshop supports Hooks, which allow you to enter custom HTML that only appears on certain pages. If you want to use hooks, you'll want to create another directory called "cphooks", and then go read up on using cpshop hooks.
Step Eight: Set Program Options
Load cpadmin.cgi from the browser. For example, if your cpshop.cgi file is located here:
Enter your password on the password screen, and press the submit button to get the admin screen
If you've created multiple cpshops, you can use the dropdown box at the top of the admin screen to select the correct shop.
On the admin screen you can customize everything about your cpshop store. Everything is explained in place, so I won't bother doing it here. Just make sure you follow the instructions as closely as possible, and press the "save all changes" button when you're done.
Step Nine: Testing
Well, you've done everything you were supposed to do. Now try accessing the script from your browser. It should work like a charm.
(Of course, if it doesn't, then FAQ and the message board.)