We’re going to talk about customizing the views of the site. Shopp has a specific method of customization and this method is intended to make it upgrade proof. That is Shopp wants you to be able to have a set of customization files that are independent from the regular upgrade path.
Where the Shopp Customization Files are Stored
The way it does that is by allowing you to create a directory inside of your theme directory that Shopp will place its files in. This means that any customization you made goes away if you switch themes. So if you switch to a different theme, your customization files are not in the new theme, they’re in the old theme and you would have to copy them and move them into the new one.
But if you’ve got theme-specific code inside that customization folder then the good part about that is it doesn’t break the site if you switch themes. So in any case, you have a lot of power and control over what happens in Shopp and you have a method of segregating all of your customization into single spot.
We’re going to start with that right now on your site, Lanny. So I’m going to log in to your site using FileZilla, mentalmanagementstore.com. The way this starts is we scroll down here to public_html and then mental management store. Okay, why isn’t it coming up? Lanny, what am I missing?
Lanny: Just scroll down to the…
Rick: Oh yeah, it’s here. I’m sorry.
Create a Directory for the Customization Files
We come down to wp_content and themes and thesis_182 and then let’s rename the custom sample folder for because it should be renamed anyway. Then inside the thesis_182 folder, we are going to create a new directory. I’m going to click over here and say create directory and that new directory name is going to be shopp and it has to be in lowercase.
Now we have our directory and we need to set some permissions for it. Right click on that and say file permissions. And then what we want is 755. Those are the permissions that we want on that folder and say okay to that. Now if we open it up, you can see it’s empty, right? But now, we’re going to fill it.
Install Theme Templates
Return to the site, go to our dashboard and come over to Shopp and Shopp Settings and presentation. And just this button right here, install theme templates. Click on this button. Now it’s going to take all the customization files and stick them in that Shopp folder we created. All we do now is come over here and say enable theme templates and hit save changes again. Now Shopp is going to look first in this customization directory.
Come back over here and refresh this and you’ll see we’ve got a lot of files in here now. We’ve got all these different files that are sitting here ready for us to customize.
Customize the Appearance and Layout
Shopp provides us with an opportunity to conceptually do 2 kinds of customization. The first kind of customization in Shopp is customizing the appearance of things. So we can customize how this is laid out beyond what we already had as options. For example, we can take this from 3 down to 2, right? So there’s some amount of customization that can happen just by creating settings.
But outside of settings, we can also customize how this looks, how this lays out and we’re going to be working on that tonight. You can customize this view and the main view and our cart view in Shopp. If we proceed to check out for a moment, we have the ability also to customize how this lays out. So customizing the appearance is one of the things we can do.
Customize the Functions
We can also customize the functionality of Shopp or customize what it does. And some of that customization is simple in the same way that customizing this is… what we see is simple but some of it’s fairly advanced.
When we are customizing what you can see, we are customizing templates and we’re rearranging the HTML in the templates or we are editing CSS to change what some of this looks like.
When we’re changing how it behaves or functions, we may very well be customizing templates. But Shopp also has a very large number of hooks and filters similar to Thesis and WordPress hooks and filters that allow you to step into the middle of some kind of processing and add some more functionality to it or change the way it functions.
One of the things I’m going to do next week is give you a piece of custom code that will send you an email when somebody abandons the shopping cart. That is a piece of custom functionality that I wrote for another project that registers the abandonment of the shopping cart and then sends you information. And so that’s one of the things that can be done here.