(Info) Understanding Product Classes | Ubercart 1.x

Info : Understanding Product Classes | Ubercart 1.x

When you first install Ubercart, you will have a single node type to use when adding new products to your website called Product. The node system in Drupal is a mature system with many contributed modules interacting with it. This is true in Ubercart where you can associate assign default attributes and options to a specific product node type. For this reason, it can be beneficial for your site to have multiple node types available for adding products.

Ubercart lets you add multiple product node types beyond the default Product type. These additional types are referred to as product classes. Ubercart will treat any product class as a normal product node, adding image support to them if enabled and letting customers view them in the catalog and add them to their carts.

A few example use cases may be helpful. Consider product classes if...

  • You want to set default attributes/options to different product types to simplify adding products to your site. Ex: an apparel store selling shirts with size and color attributes and pants with size attributes. Consider making a "Shirt" product class and a "Pants" product class with default attributes and options appropriate for shirts and pants.
  • You want to use CCK to add various extra fields to some types of products you sell but not all of them. Ex: adding an author field for books. Consider making a special "Book" product class and then adding the fields to this instead of to the generic "Product" node type, especially if you're selling other products that don't have authors!
  • You want to make a View that lets customers display a sorted list of products of a certain type. Ex: an apparel store selling hats and t-shirts. Consider making two product classes and adding a filter to your View based on the node type so it can display all your hats or all your t-shirts.

There are certainly many other use cases. For the purposes of this documentation, we'll examine what it takes to implement the first use case. To get started, you need to be logged in as a user with access to administer product classes. Then use the following steps to add and setup your product class.

Creating and configuring a product class:

  1. Browse to Administer › Store administration › Products > Manage classes.
  2. Fill in the information on the form under the heading Add a class. Refer to the help text beneath each field for information, but particularly note that the ID must be unique for Drupal to reference this node type internally while the name will be what gets displayed to the user.

| Read more..

Courtesy : Ubercart.org