Drupal Technical
[Drupal 7] How to convert a custom content type in a Drupal site into an Ubercart product ?
In one of my Drupal based shopping cart site powered by Ubercart, the products were customizable(ie, end users had the permission to edit the product). So in order not to overwrite the existing product and to save the changes made by the end user, I had to create a new node with all the values of the product. So I created a new content type and related this to the product content type and saved the node as a new one. If you want to know how to convert a custom content type in a Drupal site into an Ubercart product, read on.
The steps I followed to convert a custom content type into an Ubercart product are,
- I created a new content type(admin/structure/types/add) called 'New product'.
- I added the required fields for the content type.
- Next I created a new product class with the name 'product_new'.
- To create this
- Go to admin/store/products/classes.
- Add a class ID.
- The Class ID is the machine readable name of the above content type.
- There add a class name: Class name is the human readable name of the content type.
Now if you try to add a content to the new content type, you can see the Ubercart fields too.
Hope that helps