Installing dependent modules
If you're installing Drupal Commerce on an existing Drupal site or on a new Drupal site without using Commerce Kickstart, you first need to install the latest packaged release of the following modules:
Note: These modules may have more recent -dev releases that fix bugs and add new features, but releases of Drupal Commerce are developed to work with the latest tagged releases of each of these modules.
Installing Drupal Commerce modules
When turning on the sub-modules of Commerce, you will notice that some modules are dependent on other modules. You may wish to turn them on one at a time so as to pinpoint any error messages. This is the order to satisfy dependencies:
- Commerce and Commerce UI
- Customer and Customer UI
- Line Item and Line Item UI
- Order and Order UI
- Checkout, Payment, Product
- Product Reference
- Cart and Product Pricing
- Product UI
- Tax UI
- Payment UI
- Product Pricing UI
Note: You can also enable those modules via drush in the aforementioned order:
drush en commerce commerce_ui -y; drush en commerce_customer commerce_customer_ui -y; drush en commerce_price -y; drush en commerce_line_item commerce_line_item_ui -y; drush en commerce_order commerce_order_ui -y; drush en commerce_checkout commerce_payment commerce_product -y; drush en commerce_cart commerce_product_pricing -y; drush en commerce_product_ui -y; drush en commerce_tax_ui -y; drush en commerce_payment_ui -y
If your installation of Commerce encounters an error that indicates that a field required by Commerce was not created properly, you may try the Commerce Repair module to create the field.
Installing additional contributed modules
There are a wide variety of other modules that you may need or want to use in conjunction with Drupal Commerce. These are contributed by the community at large to integrate with payment services, extend core features, and add other essential e-commerce features like Coupons and Shipping.
The community maintains a rough list of contributed modules on this wiki page, but there may be new modules listed on drupal.org that have not been added yet. To find the absolute latest modules added to drupal.org, you should use the module search functionality for the keyword "Drupal Commerce" (in quotes).
Uninstalling Drupal Commerce
If you need to uninstall the Drupal Commerce modules for any reason, you will have to first disable them a few at a time based on their dependencies. For example, the Line Item module cannot be disabled until the Product Reference module is disabled, because Product Reference depends on Line Item.
- Check your Drupal version. The uninstallation process has been updated in Drupal Commerce 1.2 to work around new behavior added in Drupal 7.4. Nothing changed in the Commerce modules depends on the new behavior, but the uninstallation process wasn't tested on versions earlier than Drupal 7.10. There have been security releases since Drupal 7.4, anyways, so sites are encouraged to update as a best practice in general.
- Work your way several times through the modules list disabling all the Commerce modules.
- Repeat the process on the uninstallation form.
- While the modules and all their various entities and fields will be deleted, Drupal's field system does retain deleted field data in the form of a variety of field_deleted_data_* and field_deleted_revision_* tables. It is up to your database administrator to delete these tables once you confirm the data is no longer necessary. There will also be rows in the field_config and field_config_instance table representing the deleted fields that may be deleted if you desire. Deleting this data is not required for continued operation of the site or even for reinstallation of Drupal Commerce.
Note: Disabling modules may cause some functionality to be disrupted, but no data will actually be deleted. For example, disabling the Example Payment Method module will cause the payment method rule enabling that payment method to malfunction, but neither the rule itself nor payment transactions made via that method will be deleted. When you uninstall a module, expect any data stored by that module to be deleted, including (but not limited to) customer profile data, order and line item information, and payment transactions.
For a collection of useful materials for anyone building an eCommerce website in Drupal, see Resource Guide: Building an eCommerce Website.