The core of any online store is the product you are selling. Some people may have very simple needs for categorizing and describing their products, while others may have much more complex needs. Satchmo’s product framework tries to strike a balance, enabling easy product configuration but supporting complex products if your needs demand.
Out of the box, Satchmo supports the traditional hierarchical method for categorizing products. In other words, you can create category trees like this:
- Movies
- Action
- Western
- Comedy
- Black and White
- Foreign
- English
- Silent
- Books
- Fiction
- Non-fiction
Some things to keep in mind with Satchmo’s implementation:
- You are not limited to the number of categories or the depth of categories.
- You are allowed to add products to 1 or more product categories
When entering a category in the admin interface, you will have several fields to fill in. Below is a description of each field and how it is used:
A Product is the main focus of your store. It is the “thing” that a person going to your store would see. There are many fields you can use to configure your Items.
In some cases, you may want to have certain product information stored in the database. For instance, you might want to have “number of pages” or “ISBN” fields for all of the books in your store. Attributes allow you to associate arbitrary data with your products via name, value pairs.
The final choice you have with your products is if there is additional pricing you would like to apply for bulk or special discounts. For instance, you may want to charge someone $10 for 1-5 shirts but only $7 if they order 6 or more. This model allows you to do such configuration.
In addition to the information discussed above, you can add as many images as you would like to your item. One of the nice things about the way Satchmo handles these images is that they are automatically converted to thumbnails and are cached so that the conversion process does not slow down your web site.
Images only have a couple of fields:
As discussed above, a product is the central focus of your store. For many cases, the products in your store may have several options. For instance, if you sell t-shirts, a visitor to your store should be able to choose the size of the shirt while looking at the main item. You may also want them to choose a color, style and/or a bunch of other different options. The challenge with this much flexibility is building something that is easy for the user to understnad and easy for the store administrator to maintain. Satchmo uses option groups and options to create configurable products and product variants.
Continuing on with the shirt example, you will probably end up with some similar options that you want to apply to a large number of products. For instance, all of your shirts are going to have sizes of Small, Medium and Large. Instead of adding all three of these to each item, you can create an option group and add that grouping to the item. Maintenance is much easier this way.
Here are the fields in the option groups:
In our example, if an option group is size, then the options would be “small”, “medium” or “large.” The nice thing about these options is that you can configure these to change the price of your product. If a large shirt costs more than a small shirt, then you can assign the incremental cost to the “large” option item and the correct price will be shown in the users cart and order.
ConfigurableProduct is a modifier for a product that allows you to associate an OptionGroup with a particular Product.
As described above a ProductVariation can be thought of as the actual product you maintain in inventory and sell to a customer. It is an item with all of the options applied. In our example case, it might be a Large, White Shirt. The ProductVariation object itself only has links between a ConfigurableProduct, and a Product.
A downloadable product is a virtual product that will be electronically delivered to a customer after the purchase is completed. In Satchmo, this is accomplished by sending a unique url to a customer after the purchase. This url can be restricted so that the possibility of multiple downloads is minimized. Depending on your product you may want to add additional security controls but that is outside the scope of Satchmo.
In order to use a downloadable product, you need to make sure you have a Product created as described above. Also, make sure that you have the Downloadable Product type enabled in the configuration settings.
From the Product detail page, choose “Add Downloadable Product”
This screen will allow you to upload your file and specifiy the number of allowed downloads, the number of minutes it will remain active and a final flag for whether or not the file is still active. After saving the changes, the product will be enabled for downloading.
In order for the downloadable product to be secured, you must make sure that your web server supports the x-send-file header. Both Apache and lighttpd do but you’ll need to refer to the web server documentation for details. Lighttpd natively supports this but Apache needs mod_xsendfile to work correctly.
In addition to configuring the x-send-file header, you will need to ensure that the protected directory can not be browsed to directly. An example lighttpd configuration is:
$HTTP["url"] =~ "^/static/protected/" {
url.access-deny = ("")
}
A custom product is one that is typically assembled or made to order based on the customer’s needs. A common situation is a computer configurator that allows a customer to tailor the computer to their needs. Once the order is submitted the store owner will then build or configure that product.
Once you have created a product as described above, you may wish to use it as a basis for a custom product. The most important additional information you need to associate with your product is the option groups or custom text fields the customer may use to create their product. The option groups are no different from the ones described above. This gives you tremendous flexibility to vary the price of the product based on the chosen options. The custom text fields are free form text fields meant to capture special notes or instructions related to the order.
One unique aspect of the custom product is that you can elect to charge only a certain percentage at the time the order is placed. If you choose a percent downpayment then only that amount will be charged when the order is completed. If you choose 100%, then the entire price will be charged at checkout.
The final unique aspect is that you can elect to defer shipping charges on the order. If you are creating a very unique product, you may wish to have that discussion with the customer when you are collecting the full payment.
The custom product does not create product variations. The downside of this is that you must manage your inventory yourself but the upside is that you don’t have all of those different configurations in your store. Feel free to play around with both products and see which one meets your needs the best.
A subscription product is a product type that can be used to manage recurring billing memberships or to add payment terms to a non-membership product.
In order to use this product,make sure you have the Subscription Product type enabled in the configuration settings. Additionally, if you would like to use a url to activate the rebilling, you will need to make sure the the setting ALLOW_URL_REBILL is set to True. If you do set it to True, make sure that you add a new unique key in the CRON_KEY setting.
To use a subscription product, you need to setup a base Product as described in the sections above. The price you set for the base product will be the amount that is charged to your customer periodically based on your subscription schedule
In order to use this product type, from the Product detail page, choose Add Subscription Product.
On this screen, you will enter your subscription payment terms as described below.
Use this section to add trial pricing to your product (ie only $4.95 for the first 7 days, then $29.95 a month thereafter).
Price: The price of the trial period. Enter 0 for a free trial, or a decimal number for a non-free trial (ie 9.94) Trial Duration: The number of days the trial will last. Leave both price and trial duration blank if you do not want to add a trial.
Cronjob: In order for recurring billing to work, you need to setup a cronjob on your server to run once a day (preferably in the middle of the night). Use settings similar to these:
0 23 * * * /usr/bin/lynx -source http://yourdomain.com/shop/checkout/cron/?key=YOURPASSKEY You will need to set the CRON_KEY variable in your settings file to your desired passphrase.
A gift certificate is a special product. In order to use it, make sure it is an enabled product type and that it is a selected payment method.
Once you have enabled the gift certificate product type and payment methods, you need to create a product as described above. Then, in the product subtypes section, select “Enable GiftCertificateProduct” to turn the product into a gift certificate. Now, a user has the option of purchasing a gift certificate and receiving a unique code that can be applied towards the purchase of a product at your store.
Here is a quick step by step overview for adding something to your store. Hopefully it illustrates how to add products and use the concepts described above.
- From the admin interface, add a new individual Product
- Choose the appropriate Category, Name, etc. For illustration purposes, create a Satchmo Developer Book
- Be sure to put in a value for the price ($25.00) with no expiration or quantity. Then click save
- You should see a list of all your products
- Click on the Satchmo Developer Book
- At the bottom of your screen, you’ll see the option to “Add ConfigurableProduct”
- Click on the link
- Select the appropriate Option Group (Book Type) and click Save & Continue Editing
- Check “Create Variations” and Click the save button
You’ve now created all the Product Variants for the Satchmo Developer Handbook. If you want to tweak specific ProductVariants you can but you don’t have to.
The product variation manager contains a set of helper functions for managing product variations. It is accessed at /product/admin/variations/ and provides a streamlined process for managing all of your configurable products.