Dummy's Guide to Formatting Images in the Shopp Plugin
December 19, 2011 / Updated: December 19, 2011 / Lena Shore
Shopp (shopplugin.net) is a great little plugin for adding a shopping cart to your WordPress site.The support is excellent and everyone at Shopp has been nothing but overly helpful.
That being said, figuring out how to size your images can be a little confusing. Pouring over the community forum is helpful, but I think the approach is a bit technical and beginners are assumed to have knowledge they simply don’t. I thought perhaps a dummy’s approach might save everyone some time.
Where do I size it?
Since the version 1.1, all your sizing of images (thumbnails and preview images) needs to happen in the templates. If you haven’t upgraded do that first. There is lots of flexibility doing it this way. But, you will have to understand how to do a little bit of code.
How do I control it and where do I find the variables?
All the variables you’ll need are under the “gallery” section. The “overview” section shows you the string. The “options” section shows you all the variables and explains them in detail.
How do I make this code work?
Open your template and find this code (close to the top of your products.php file)
Go through and figure out what variable(s) you want to use under the options area. Note the name of the actual variable you’ll use is in bold. That’s the code that goes in your template file.
EXAMPLE from options page:
p.size: The maximum size to use for both width and height of the preview image (used in place of width and height)
“p.size” is the variable. In the example below the size of the preview image will be 350 pixels. Note that I put the entire thing in single quotations with a comma between it and gallery to separate them.
You can also string variables together and separate them with an ampersand (&) but keeping them in the same single quotes.