An examples module for Commerce 2.x. Provides some usually defaults and a sample migration.
For demo, see https://github.com/bojanz/commerce_demo
Add this private repository to the composer configuration repositories list:
composer config repositories.mglaman vcs https://github.com/mglaman/commerce_examples
Then, install this module:
composer require drupal/commerce_examples:dev-master
- Sample product type
- Color and size attributes
- Sample product display and add to cart form configurations
- Migration example from local CSV source
- Price resolvers
- Order type resolvers
Visit any product and add ?discount=TRUE
to trigger a 15% discount.
Based on the product variation type, the product will go into the default order type, or be treated as digital.