Product Classes allow you to add addtional Product Content Types beyond the default Product Content Type.
Create new classes at: Store > Products > Manage Classes (/admin/store/products/classes).
When you first install Ubercart for Backdrop CMS, you will have a single content type called Product. This content type contains all the necessary fields for selling and shipping products on your website. Since Backdrop CMS supports extensive field and content type customization, you can extend the default Product type using contributed modules or custom fields.
However, some products may require unique fields or settings. In such cases, it’s useful to create additional product content types, referred to as Product Classes. Ubercart automatically treats these Product Classes as standard products, adding product images, prices, and other essential fields. Customers can view these products in the catalog and add them to their carts. Each Product Class can have its own default attributes and options.
Product Class Use Cases Here are some common scenarios where creating Product Classes can simplify store management:
-
Default Attributes/Options:
-
Example: An apparel store selling shirts (size and color) and pants (size only). Create a "Shirt" Product Class with default size and color attributes, and a "Pants" Product Class with only size attributes.
-
-
Custom Fields for Specific Products:
-
Example: Selling books that require an "Author" field. Create a "Book" Product Class and add the custom field there instead of cluttering the generic Product type.
-
-
Taxable vs. Non-Taxable Items:
-
Example: Create separate Product Classes for taxable and non-taxable items and configure tax rules accordingly.
-
-
Custom Views and Listings:
-
Example: An apparel store wants separate product lists for hats and t-shirts. Create separate Product Classes and filter Views by content type.
-
There are many additional possibilities. Let’s walk through how to create and configure a Product Class.
Creating and Configuring a Product Class
-
Navigate to: Administer » Store » Products » Manage Classes.
-
Add a New Class:
-
Fill in the form under Add a Class:
-
Class ID: A unique identifier used internally.
-
Name: The label displayed to customers.
-
Description: A brief overview of the product type.
-
-
-
Submit the Form: This action creates a new content type with Ubercart-specific fields, such as images and prices.
-
Edit Class Settings:
-
Click Edit next to the newly created class. Adjust its name, description, and other settings using Backdrop’s content type editor at Administer » Structure » Content Types.
-
-
Set Default Attributes and Options:
-
If the Attribute Module is enabled, use the Attributes and Attribute Options tabs to configure default settings for all products of this type.
-
-
Add Products:
-
Go to Add Content and select the newly created Product Class to start adding products.
-
Important Considerations:
-
Custom Fields: Since each Product Class is its own content type, you can add fields specific to that product type, making your store easier to manage.
-
Planning: Carefully plan your catalog structure before setting up Product Classes to avoid significant changes later.
-
Converting Existing Types: If needed, you can convert an existing content type into a Product Class by using its machine name as the Class ID during creation.
-
Deleting Product Classes: Be cautious when deleting a Product Class, as any existing nodes of that type may be affected.
By using Product Classes effectively, you can simplify product management and enhance your store’s flexibility in Backdrop CMS.