TF-1 Technology Blog

Posted: August 17th, 2012 by Howard Huang

From my recent experience with drupal-commerce (Commerce Kickstart), creating a product can be a bit tricky. It may not be that user friendly, but it’s definitely going to save you time and allow you to have more space to do your customization in the long run.

The following is the common mistake you may make when you are trying to create a product.

You find this option called “product type”. Then you start giving names and attributes to it and doing all kinds of adjustments. After you click on “Save product type” and try to create a product, you might be lost there because you can’t find the product type you just made. When you go back to product type creation page, the one you just created is still there. It’s not because some unknown bug has occurred, it is simply because we don’t have a content type of your product yet. Yes, the content type.

From my last post, you may know content type is one of the essence in Drupal 7. Pretty much everything is created from the content type, so is product.

Here is the difference in between content type and product type. We all know what content type is, a content type may contain any attributes you want. Content type defines what the content is, how can you describe the content. For example, a house can have the following attributes such as square feet, height, color, materiel and so on. Product type defines what attributes a product should contain, such as price, product sku, status and so on.

Now here is the key point. All you have to do is add an extra attribute/field in your content type – “Product Reference”. Product reference can be pointing to any product types you created. It’s just like house is just a house until you put a price on it, then it turns into a product.

After you make the reference, you may find your content type has became a product type which you can create product base on it.

The reason it’s designed this way is to save you time when you are creating similar type of products, so you don’t have to re-construct same fields in each product type. All the detail/unique/specified fields should be defined in content type, and shared one should be in product type.

Of course, you can have different product type as well to separate different kinds of product. It’s all about your own preferences.

Comments are closed.

several months ago: TF-1 marks the successful engagement of 500 #Drupal projects, from which over 100 are Drupal #Commerce and Drupal #Ubercart specific. Reply Retweet Favourite
several months ago: At the new office, TF-1 Team @ work http://t.co/B0p9eR23 Reply Retweet Favourite
several months ago: We just started listing our Thrinacia pledgers. Check it out at https://t.co/ZLFfAfbZ Reply Retweet Favourite
several months ago: Taskforce-1 is now a seed partner of NCFA. http://t.co/fvkNHT1R Reply Retweet Favourite
several months ago: Article on Thrinacia, our open source SaaS crowdfunding platform just got published on NCFA Canada at http://t.co/xuk2DTZv Reply Retweet Favourite
several months ago: Several new pledges received for Thrinacia initiative today, thank you everyone and lets raise enough to complete Milestone 2. Reply Retweet Favourite
Contact Us




TaskForce-1 Industries Ltd.
#110 - 19162 - 22'nd Av.
Surrey, B.C - Canada
V3S 3S6 View Map
Toll Free Phone: 1.888.630.5733