Specbee: Driving E-Commerce Revenue Success with Drupal Commerce
Every e-commerce business has unique requirements. While some are simple plug-and-play solutions, others are tailored with custom development. Evolving trends like AI-driven personalization, seamless mobile experiences, and the growing importance of sustainability, are equally playing a part in an e-commerce application’s requirements.
Using a framework that offers deep customization is essential for almost every e-commerce store. Today, we’re going to talk about one such e-commerce framework - Drupal Commerce. With Drupal Commerce, you get the flexibility of Drupal and the power of innovation. Let's take a closer look at some of its features and architecture in this article.
The Relevance of E-commerce Today
Global Reach: With an internet connection, anyone can access e-commerce platforms worldwide.
24/7 Accessibility: Enjoy the convenience of anytime access.
Diverse Product Offerings: Unlike offline shopping, where options are limited, e-commerce opens the door to a wide variety of products.
Economic Growth: E-commerce fosters economic growth by offering a broad spectrum of products, breaking free from the constraints of limited stock seen in offline shopping.
Contactless Transactions: Embrace the ease and safety of contactless transactions in the digital shopping realm.
Choosing Drupal Commerce
Now, the next question arises: Why should we choose the Drupal Commerce platform for e-commerce?
Considering the myriad CMS platforms in the market such as Magento, WordPress, Shopify, and Drupal, selecting the right platform can indeed be challenging.
Here are some reasons for opting for Drupal as your e-commerce platform:
Open-source and extensible
Flexibility for complex business needs
Rules-based architecture
Community support and modules
Integration with third-party services
Stands out for businesses aiming to create a user-friendly and easily accessible e-commerce platform.
Key Features of Drupal Commerce
Take a look at some key features of Drupal Commerce that you might like:
Integrations - Drupal provides extensive integration possibilities with third-party services and tools. E-commerce websites can seamlessly integrate with payment gateways, shipping providers, and other essential services.
Rules-Based Architecture - Drupal Commerce, as part of Drupal, integrates with the Rules module. This allows administrators to define complex business rules and workflows, providing flexibility in managing various aspects of the e-commerce process.
Headless and Decoupled Architecture - Drupal supports headless and decoupled architectures, allowing businesses to use Drupal as a back-end while using a different front-end technology. This flexibility is beneficial for creating unique and tailored user interfaces
Additional Features:
Multiple stores - Easily create and manage multiple stores with Drupal Commerce.
Multiple currencies - Handle transactions in multiple currencies.
Flexible and Extensible
Powerful Content Management
Community Support
Theming and Responsive Design
SEO-Friendly
Multilingual Capabilities
Security
Drupal Commerce Architecture and Components
Now, let's delve into the architecture and components of Drupal Commerce. There are different types of entities in Drupal Commerce, including,
Store: Can products be added without a store? Absolutely not! A key element in Drupal Commerce, the store, plays a crucial role in controlling billing and shipping countries available during the checkout process. Each store can even have its own currency, a boon for dealing with multiple currencies across locations.
Product Architecture: Understanding the product structure is key before diving into adding products in Drupal Commerce.
Imagine your store selling t-shirts or shirts. These products come in various sizes, colors, types, fabrics, etc.
To handle this complexity, Drupal Commerce introduces Product Attributes. For example:
Product Type: t-shirt
Size: Product Attribute
Color: Product Attribute
In Drupal Commerce:
There's a single product entity.
This product entity comprises 7 different product variations.
Size Product Attribute has 3 values: Small, Medium, and Large.
Color Product Attribute has 4 values: Green, Orange, Red, and Blue.
Order Entities: Order entities contain information about the product, its variation, and customer details.
Order Items: These represent purchased items within the order.
Order Types: Each order type has its own settings for the cart and checkout pages.
We’ll discuss more practical implementations of this later.
Implementing Drupal Commerce
Prerequisites
Make sure you have a web server that satisfies Drupal’s requirements
The preferred memory limit is 256MB or more.
Latest version of Composer to manage dependencies.
DDEV or lando for local development.
Drupal Installation
composer require "drupal/commerce"Enable Commerce
drush en commerce_product commerce_checkout commerce_cartGetting Started
Create a Store
From the toolbar navigate to Commerce > Configuration > Store > Stores and click on the Add Store button. Once you add the store, you will be able to add and display products easily.
Configure different product entities
To add a new Product inside a Store, let’s first create a Product Type by navigating to Commerce > Configuration > Product types from the toolbar menu or visit /admin/commerce/config/product-types
Click on Add Product type button
When you select Product variation type as “Create new” then you don’t need to add Product variation additionally.
Now, let's create Product Attributes for the same Product Type by navigating to Commerce > Configuration > Product Attributes or simply visit /admin/commerce/product-attributes and click on the “Add product Attribute” button.
While adding a Product Attribute, you will notice that the Product variation types (created in step 2) are present and you can map your attributes to your variations. As a result, these attributes will be visible when you add variations to any product.
Here in the above example, we have created a Product Attribute as Color, in which we have listed different colors.
Similarly you can create different Product attributes like Size, Type, etc.
Now that you have created a Store, Product Type, Product Variations, and Product Attributes, it’s time to create a new Product.
Add Products
1. To add a Product navigate to Commerce > Products and click on the “Add Product” button.
2. Enter your Product Details and click on “Save and add variations”.
3. Add your different product variations.
Displaying Products
Product display pages
First, you will need to customize the product pages from the “Manage Display” tab option. For multi-product displays, simply create a view page to display multiple products.
Add to cart form
Next, include the Add to Cart form on product pages or the other pages from where the user can add the products to the cart.
To include the “Add to cart” form, navigate to Commerce > Configuration > Orders > Order Item Types and then navigate to “Manage Form Display” of the particular order item (here we used Default)
Product images
To add Product Images, you need to add a field inside the Product Variation Type entity so that different images can be uploaded for every different Product variations.
Further, you can learn how to use the Drupal Core Image module to create a custom image style for products.
To create a custom view mode for product variations, you can use the Image delta formatter module.
Add Payment Gateway
By default, Drupal Commerce provides a COD (Cash On Delivery) payment gateway, but you can configure different payment gateways as well. To learn more about how to add a payment gateway click here.
Orders
You can manage your orders from the Orders page by navigating to Commerce > Orders.
Final Thoughts
Choosing the right framework for your unique e-commerce business is absolutely crucial. A robust and customizable framework like Drupal Commerce is not just an option; it's a strategic necessity. Combining the flexibility of Drupal with a flair for innovation, Drupal Commerce stands as a powerful solution for varied e-commerce needs. If you’re looking to build or enhance your e-commerce solution, we have the Drupal development expertise and experience to bring your vision to life. Let’s make it happen!
Chapter Three: Apigee Kickstart in Action: Powering Financial Services
A Developer Portal Shows the Flexibility of Drupal
Black Knight, Inc. is a financial services company that provides integrated software, data, and analytics solutions primarily to the real estate and mortgage lending sectors, as well as to the capital and secondary markets. Originally founded as Computing and Statistical Services in 1962, the Jacksonville, Florida-based corporation is a national leader in providing automated solutions that span the homeownership life cycle. Note that Black Knight has recently been acquired by Intercontinental Exchange (ICE).
Talking Drupal: Talking Drupal #437 - Drupal Mail & Easy Email
Today we are talking about sending email with Drupal, The Easy Email Module, and Drupal Mail Best Practices with guest Wayne Eaker. We’ll also cover Content Access by Path as our module of the week.
For show notes visit: www.talkingDrupal.com/437
Topics- Current state of email
- What happened to swiftmailer
- Do you still need the mailsystem module
- Why Symfony Mailer
- New dependency in core
- Difference between Symfony Mailer module and the Symfony Mailer Lite module
- How does the Easy email module make it easier
- What are the features of Easy Email
- Why not use PHP mail
- JMAP
- Do you have a roadmap
- How do we communicate the different module options
- Are you looking for help
- Easy Email Module
- Symfony Mailer Lite Module
- Symfony Mailer Module
- Mail System Module
- hook_mail replacement issue
- Swiftmailer / Symfony mailer issue
- JMAP
- FastMail
- Free Easy Email Webinar
Wayne Eaker - drupaltutor.com zengenuity
HostsNic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Ivan Stegic - ten7.com ivanstegic
MOTW CorrespondentMartin Anderson-Clutz - mandclu
- Brief description:
- Have you ever wanted to grant users access to edit content based on the path alias of the content? There’s a module for that.
- Module name/project name:
- Brief history
- How old: created in the past month by Mark Conroy of Annertech, who is also a core subsystem maintainer for the Umami profile
- Versions available: a stable 1.0.0, created in the past week, that works with Drupal 10
- Maintainership
- Actively maintained
- Doesn’t have a user guide yet, but the module’s README does include some FAQs, and the project page includes a link to a YouTube video that demonstrates how to install and use the module
- Number of open issues: 2, one of which is a bug
- Usage stats:
- 2 sites
- Module features and usage
- When installed, the module adds a new taxonomy vocabulary to your site. You can add terms to this vocabulary to define sections by path
- Users on the site will have a new field, where you can reference one or more of the section terms, granting the user access to edit any content with a path that matches the section
- The module also includes a submodule called Content Access by Path Admin Content. When installed, users who go to the admin/content listing will only see content listed that they can edit, based on either the sections they’ve been assigned, or their ownership of the content.
- Granting edit permissions to a “section” of the website is a common ask for site owners, so I’m excited that this module makes it easy to set that up. There are solutions in the contrib ecosystem based on taxonomy for access control, and back in episode #414 we talked about Access Policy as a very flexible way to grant edit permissions, but in my mind those all require more set-up, and may require an extra step during content creation to make sure the right access is available. Content Access by Path, along with something like the near-ubiquitous Pathauto, can make it pretty painless to set up and use section-specific edit permissions