Release 2.9: Enterprise-grade attributes, variant creator and plugin architecture
Welcome to the Saleor 2.9 release of Saleor!
- Customize the shape of your products with enterprise-grade attributes. It's a key feature that we've made even more powerful.
- We've introduced plugin architecture. This system gives you the possibility to provide custom logic without any changes in the core.
- Service accounts and Webhooks now allows you to easily integrate Saleor with other services without directly manipulating the source code.
- We've added the variant creator, which helps you to create multiple variants based on attributes assigned to your product type.
It’s been over three months since our last release, but don’t worry — we’ve not been slacking off! In fact, we’re proud to present the biggest update since the release of Saleor 2.0 last year. Ladies and gents, welcome to the Saleor 2.9 release!
Enterprise-grade attributes
Attributes let you customize the shape of your products. It’s a key feature that we’ve made even more powerful through some significant changes. First of all, attributes are no longer specific to product types; they can now be defined globally and reused with multiple product types! For example, instead of having to manually add a “Size” attribute to each new item of clothing in an apparel store, you can now just define the attribute once, along with all its values, and reuse it for different types of clothes.
We’ve also equipped the attribute model with several useful and customizable configuration options:
- Visibility of an attribute in the storefront
- Whether to use an attribute as a filter on product listings
- Ordering attribute values and more
You can read more about these in the dashboard guide in our docs.
Details view of an attribute
Plugin architecture
Saleor is a forkable project by nature. As a consequence, it’s harder to upgrade the forked projects to new versions while avoiding merge conflicts. We wanted to address this issue by introducing plugin architecture, the core of which are hook functions that are executed during the regular flow of processes such as checkout, order creation, and fulfillment. This system gives us the possibility to override these functions and provide custom logic without any changes in the core. As part of this release, we’ve also reimplemented some of the Saleor functionality as plugins, including tax calculations with Vatlayer and Avalara, and supported payment gateways. All plugins can be configured through the dashboard.
The configuration page for Stripe plugin
Service accounts and Webhooks
Service accounts and Webhooks are another big feature making it easier to integrate Saleor with other services without directly manipulating the source code. Service accounts are just like regular user accounts, but they give scripts or external services access to the API. Imagine you’re using Saleor to process checkouts and orders, while your stock is managed in a different service. You can now easily create a service account to pull the product data from Saleor through the API and synchronize it with your service.
Webhooks, in turn, let you subscribe to notifications about particular events in Saleor, such as new orders, successful payments or order status changes. It’s all available in both the GraphQL API and our dashboard.
Example service account
Metadata
If plugins and webhooks are not enough, there is one more way to extend Saleor without touching the source code. Metadata fields are only available in the API, and they allow you to store arbitrary data in most of Saleor’s models e.g., products or orders. Each model supporting metadata has two access levels — public and private — so that you can use it both for customizations in your storefront and internal processes.
Here is an example GraphQL mutation that sets arbitrary key-value pair for a user (gdpr-consent field):
Read more about metadata in our docs.
Customizable product list
The product list is one of the most critical views in the dashboard and is a daily working tool for many shop owners. To improve their productivity, we enhanced the product list with new features. The first significant change is the ability to customize the columns visible on the list. You can select predefined columns such as product name or price, as well as adding your own custom filters.
Selecting columns on the products list page
Variant creator
The variant creator is a small but powerful tool that you’ll find in the dashboard when adding variants for newly-created products. It’s a three-step wizard which helps you to create multiple variants based on attributes assigned to your product type.
Dashboard and documentation moved to new repositories
Over the last few months, Dashboard 2.0 has grown large enough to need its own repository. It’s a reasoned decision as the application uses its own stack consisting of Typescript, React, and Apollo Client. As a result, the main Saleor repository contains only the Django-based core and the GraphQL API, plus the legacy dashboard and storefront.
Also, our docs now live in their own repository. We rewrote and restructured them using Docusaurus, as well as adding a bunch of new sections and a fresh design to match the new branding. The docs consist of three main parts:
- Saleor Dashboard Guide
- GraphQL API
- Running your Saleor Server
Changelog
These were the highlights of the release. For the full changelog, go to the Github release page.
https://github.com/mirumee/saleor/releases/tag/2.9.0
Future releases
Adding new features to Saleor is always exciting for both the community and for us as builders, but it often results in a lot of changes in the codebase in a short time. We strive to keep the codebase clean and readable, which is why we’re planning to spend the last quarter of 2019 on housekeeping and maintenance. Few things that are on our radar for the next release include:
- Optimizing database queries for faster views in the frontend apps
- Extracting storefront-specific queries and mutations to a separate GraphQL endpoint
- Better organization of business logic in Saleor core (refactoring large utils.py files)
Lastly, this break from monthly releases sets the template for the future. As Saleor grows, we will focus on particular feature sets and will be releasing each when it is built, tested, and documented to a level that will enhance the customer and developer experience. We’re still moving at speed, but will be giving ourselves more time between releases to make sure the quality stays high.
Thank you
A big thank you 🙏 to all contributors, stargazers, and supporters of Saleor!
Contributing
For those of you who are interested in contributing to the project, we prepared a bunch of issues labeled as help wanted. Don’t worry if you don’t fully understand the problem — our team will try to guide you and answer all your questions. Remember to check our channels on Gitter and Spectrum; they serve best if you have quick questions that don’t require opening an issue on GitHub.
Within the next two weeks we’re attending two big events:
- GraphQL Summit in San Francisco on 30–31 October
- Web Summit in Lisbon on 4–7 November If you’re there, make sure to find us and say hello. Come and chat about Saleor and GraphQL, and collect some of our cool Saleor swag!
Related articles: