Drupal Technical
[Drupal] How to add custom fields to a product content type in Ubercart?
One of our Drupal clients requested us to create an online envelope editor in their Drupal site. The envelope was a product in Ubercart as the site was a Drupal e-commerce site. The envelope was to be edited by the user of the site using a form interface. We needed to add custom fields to the product content type in Ubercart to get the feature up and running. If you want to know how to add custom fields to a product content type in Ubercart, read on to find out how we did it.
Follow the steps below to add custom fields to a product content type in Ubercart
- First Go to Structure -> Content Type-> Product in admin/structure/types/manage/product.
- Next click on the manage fields tab.
- In the 'Add New fields' text-box (Refer the image), Give a name for your field.
- This will automatically add a machine-name for the field
- You many edit the field but the name cannot be changed after the settings are saved
- Next select the field type for the field you added.
- Select the widget mode.
- Finally click on save to save your settings
That's all there is to it
If you need professional assistance in configuring Ubercart in your Drupal site get in touch with us.