Ludovic Frank - Freelance developer

Sylius, an e-commerce framework based on Symfony

ionicons-v5-k Ludovic Frank May 15, 2023
113 reads Level: Confirmed beginner

Hello ?,

After Josselin's article on languages and Sylius, I'd like to take you through the framework in its entirety...

Have you ever come across a complicated e-commerce project?

Or rather, have you ever found yourself unable to adapt or customize your e-commerce site the way you want?

As if you had to adapt to the solution rather than the solution adapting to you?

Does this sound familiar? If so, I've got something for you: Sylius. Have you ever heard of it? No ?

In any case, in a world as competitive as e-commerce, Sylius could be just the thing to help you stand out from the crowd.

In this article, we'll explore Sylius and what it can do for your business, and, if you're a developer, how do you use it?

Ready to get started? Let's get started.

Sylius's logo

My vision of e-commerce (before Sylius)

Well, I'll be honest with you: before working with Sylius, I hated e-commerce projects from the bottom of my soul, and here's why:

  • If you're a developer, you know that in a relational database, you try to avoid copying data, you use relationships. In the world of e-commerce, we don't do this, for a very simple reason: we need to keep track of everything, who bought what and when... For accounting and tax reasons.
  • Customization is very limited. In fact, the projects I worked on before working with Sylius limited my creativity.Let me explain: if your online store looks like all the others, if it doesn't convey "your brand image" and "your values", then it's not interesting. Why should I buy from you rather than someone else's e-commerce platform?
  • Every time I took over an e-commerce project, it was a mess, not that the development before me was done by bad developers, no, it's mostly that they did what they could with what they had. But it was still a lot of "bricolage".

Did you say Sylius?

Well, fasten your seatbelts, because we're about to dive into the world of Sylius. If you're picturing a mythical Greek hero fighting monsters in ancient times, you're in the wrong era, but you're right in spirit. Sylius isn't a hero of legend, but he could well be the hero of your e-commerce site.

Sylius is a high-quality open source e-commerce platform based on the Symfony framework. It's like the "chameleon" of e-commerce platforms, highly adaptable and always ready to "blend in" with your business requirements.

It's designed for developers who appreciate flexibility and a solid foundation to build on, but it's not afraid to be end-user friendly, on both the customer and vendor sides.

A return to the past...

Like a good cheese or a fine wine, Sylius has aged and matured over time (although, thankfully, it doesn't have an expiration date - my jokes, it's not what it used to be...). Its story began in 2011 when its creator, Paweł Jędrzejewski (a talented developer living in Poland), was just a frustrated developer tired of the rigid e-commerce solutions available sir the market. His vision? A platform as flexible as a gymnast and as reliable as a Swiss watch.

Today, Sylius has acquired a loyal clientele of developers and business leaders, proving that frustration can indeed give birth to innovation.

Sylius superpowers

Let's take a look at what makes Sylius the "superhero" of e-commerce solutions.

  • Unrivalled flexibility: Remember our chameleon analogy? This is where it really shines. Sylius' architecture allows you to modify, extend and replace any part of the platform. It's like a giant Lego set for the that you can build and rebuild to your heart's content. So, unlike other e-commerce platforms, you can perfectly integrate the soul of your company into your online store.
  • The Symfony framework: Imagine the best toolbox you've ever seen, OK, you got it? And now ... multiply it by ten. It's Symfony, a set of reusable PHP components that form a PHP framework for web projects. Sylius is built on this framework, making it a robust and reliable platform. If you're a regular reader of this blog, you know how much I love Symfony.
  • User-friendly administration interface: For the non-developers among you, I haven't forgotten you. Sylius has a clean, intuitive administration interface that's as easy to use as iOS. What's more, it's customizable: you can add a section, remove others, extend it as you see fit, which can be very handy if you need specific tools for your logistics or marketing.
  • API-First approach: Sylius not only provides you with an e-commerce front-end, it also offers an API, via the well-known Symfony bundle, API Platform. But what's the point? Quite simply, as your project grows, there may come a time when it makes sense for you, as an e-tailer, to appear on the App Store and Google Play. At that point, the API exposed by API Platform and Sylius could be of great use to you, and enable you to develop your activity on the stores more rapidly.
  • Community and documentation: Last but not least, Sylius boasts a thriving community and comprehensive documentation (albeit still limited in some respects). This is always handy, because when you're stuck on a feature or a bug, there's always someone to help you out.

So that's the "what", "when" and "why" of Sylius. That's a good start, but let's go deeper into the world of Sylius and online sales.

Sylius admin dashboard

Why Sylius?

Okay, we've got the "what" of Sylius. Now let's roll up our sleeves and dive into the "why". After all, Sylius isn't the only e-commerce platform on the market, so why should it be your e-commerce platform of choice? Hold on to your hats, because we're about to explore the unique selling points (yes, we're sticking with the sales theme ....?) that make Sylius stand out from the crowd.

The Sylius difference: Three points

Sylius is like that friend we all have who's good at everything. Whether it's baking, playing guitar or fixing a leaky faucet, he can do it all (and by the way, does this friend get on our nerves?).

Sylius' three points: unrivalled flexibility, unrivalled scalability and unrivalled ease of use.

  • Unrivalled flexibility: As we saw earlier, Sylius is a chameleon. It can adapt to your business needs like no other e-commerce solution can. Like being given a blank canvas and a can of paint, you can create your masterpiece (in our case, e-commerce) exactly the way you want it.
  • Unrivalled scalability: Imagine you're on a diet and you've just discovered a new passion for cauliflower (imagine I said?). You start with a handful, but soon you're eating them for breakfast, lunch and dinner (it's a curious image, though). Sylius is like that, but with your company. It's ready to grow with you, whether you start small or develop an empire.
  • Ease of use: Sylius combines the best of both worlds: powerful capabilities for developers and a user-friendly interface for the less tech-savvy. It's like having a state-of-the-art espresso machine that also has a "make coffee" button. It lets you create a very pleasant user experience for your staff and customers.

Sylius versus the rest of the world...

I can hear you asking: "Sylius looks great, but how does it stack up against other e-commerce platforms?" It's a good question...

Let's do a quick comparison:

Magento, WooCommerce and Shopify: These are the big fish in e-commerce. But while these platforms are great in their own right, they often lack flexibility. They're like the gingerbread house kits you find at Christmas: fun and easy, but limited in terms of creativity. Sylius, on the other hand, gives you the ingredients and lets you build your own gingerbread house, castle or even an entire village!

Seeing is believing: Sylius in the real world

Enough theory. Let's see how Sylius works in the real world. I'm not going to use one of my projects to illustrate this chapter, as that would be too easy (but there will be something below).

I'll let you discover this website.

Brille24 This is one of Europe's leading online opticians, whose catalogs include Ray Ban and Gucci.

In addition to the plugins available directly in the Sylius marketplace, they have developed their own plugins (among others):

  • "Tier Price": establishes price tiers according to product quantity
  • "Custom Options": allows customers to add additional information to the product ordered
  • "Special Price": defines price periods.

So, Sylius has played its part perfectly and helped them with their projects, when there isn't already something in the ecosystem that meets the need, Sylius' extensibility makes it possible to create it.

Your e-commerce starter kit

Ready to start selling online with Sylius? You're all set! Just like preparing for a trip, we need to make sure we have all the essentials in our luggage. So let's go through the process of setting up your Sylius store, but first, let's quickly check the prerequisites.

Preparation: the basic requirements

Before you start assembling your Sylius-based e-commerce "system", you'll need a few tools. These are listed below:

  • PHP 8.0 or higher : Sylius, like Symfony, is written in PHP, so you'll need to be able to run PHP on your machine. You'll need to be able to run PHP on your machine. As Sylius is modern, you'll need a recent version of PHP.
  • An environment capable of running Symfony: Between Sylius and PHP, there's Symfony. In fact, Sylius is a set of bundles for Symfony, so your machine must be able to run Symfony perfectly for it to be able to run Sylius.
  • Composer: this is what will enable you to download Sylius and Symfony to your machine, and is available here.
  • A database - MySQL, PostgreSQL or MariaDB: You can choose your favorite, and the one you're most used to working with. For a large project, it may be wise to use PostgreSQL.
  • Node.js and Yarn: This will be needed to create or adapt your store's interface. Here, Node.js is used only for the browser part of your store, not for the server part.

If this sounds like a lot, don't worry. Each tool on this list is just a key to unlocking the full potential of Sylius.

Your Sylius store: a step-by-step assembly guide

Now that all our tools are ready, it's time to start building.

  • Installing Sylius: laying the foundations for your online store. With "Composer" by your side, it should be a walk in the park.
  • Set up your environment: This is where you connect your database and configure e-mail delivery.
  • Import your data: it's time to fill your (virtual) shelves with interesting products.
  • Customize your store: The best thing about Sylius is its ability to be customized. Make your store truly yours - it's my personal favorite part? and the one that will bring you the most value.
  • Launch your store : once you've got everything right, you're ready to launch your online store... this is called "going live".

Challenges you may encounter

Every journey has its challenges, and setting up your Sylius store is no different. But don't forget that every challenge is an opportunity in disguise. Here's what you might encounter and how to deal with it:

  • Technical obstacles: Sylius is user-friendly, but it's not a toy. If you're not tech-savvy, some parts may seem intimidating. That's why, when you start with Sylius, it's important to be well supported by one or more people who know their stuff.
  • Time constraints: Creating a personalized Sylius boutique isn't an instantaneous process; it's not fast food, it's gastronomy. But believe me, the time investment is well worth it....
  • Cost considerations: Although Sylius is free, working with a developer or purchasing plugins can incur costs. But consider these costs as investments that will pay off in the long term.

Let's take a look at some of the "basics" you'll need to know to start an online sales business with Sylius.

Enhance your Sylius store: Customize your e-commerce site!

If you've succeeded in creating your Sylius store, let's not stop at the basics. Imagine if "Da Vinci" had stopped at the sketch of Mona Lisa. It would have been sad... No ?

It's time to unleash the full power of Sylius and make your online store truly unique.

So, ready to create something unique? Let's find out.

Sylius customization: the art of personalizing your online presence

Customizing your Sylius store is like playing with the most advanced LEGO game.

You have a multitude of blocks, each with a unique shape, size and color, ready to be combined as you see fit. This is your chance to build a spaceship, a castle or even a life-size T-Rex, if that's your thing.

Here are the customization options:

  • Themes: Sylius features a flexible theme system that lets you change the look of your store in the blink of an eye. There aren't as many themes as on other online store systems, but there's nothing to stop you creating your own from existing themes.
  • Plugins: Existing plugins are available on the Sylius website, ready to enhance your Sylius store with additional functionality. Want to add a loyalty program or a complex shipping rule? There's a plugin for that. You can also.
  • APIs: Sylius comes with a powerful API platform that lets you integrate virtually any external system. It's as if you had adapters for any kind of client, you can perfectly create a "React Native" application, Angular or even directly a native application (for iOS and Android), and, these applications will connect directly to the API.

Sylius Hacks: Tips and tricks for a top-notch e-commerce store

Finally, let me share a few tips to help you get the most out of Sylius:

  • Take advantage of the community: The community is like a hive of busy bees, always buzzing with new ideas, solutions and advice. Don't hesitate to ask for help or share your own discoveries. Like any open source project, Sylius is very active on Github.
  • Keep up to date: Sylius is constantly evolving, with new features, improvements and fixes. Make sure you keep your Sylius store up-to-date to take advantage of the latest developments.
  • Take it slow: Don't try to customize everything at once. Start small, test, learn and gradually build your dream store.

So there you have it: a guide to customizing your store. Remember, your e-commerce site is a reflection of your brand.

With Sylius, you have the power to create a truly unique experience that will keep your customers coming back for more. So take advantage of this platform?

Improve your e-commerce...

If you've come this far, it's because you're interested in the subject?

Why settle for a small, comfortable e-commerce site when you could have a sprawling online shopping mall?

Let's talk about taking your store to the next level with plugins and extensions. It's like adding rooms, floors or even wings to a mansion. Ready to take your shop to the next level? Let's get started!

Sylius plugins and extensions: some special tools

If Sylius were a Swiss Army knife, plugins and extensions would be the assortment of useful blades, tools and gadgets that come out when you need them.

They add extra features and functionality to your store, allowing you to tailor it to your specific needs.

Here are just a few of the categories of plugins you can find:

  • Payment gateways: These plugins enable your store to accept a wide range of payment methods, payment via Stripe, cash on delivery or even ... cryptocurrency.
  • Shipping methods: Would you like to offer your customers next-day delivery, "Click and collect" service or free delivery over a certain amount? There's a plugin for that.
  • Marketing tools: From SEO to marketing tool integration (like mailchimp), these plugins will help you attract and retain customers. It's as if you were hiring a marketing agency for your site (well, only less comprehensive?).
  • strong>Analytics: These tools provide information on your store's performance and help you make data-driven decisions. This allows you to see what's working and what's not.

Some of the best-known plugins

With so many plugins and extensions available, it can be hard to know where to start. So here are a few of the most popular and useful plugins:

  • SyliusAdminOrderCreationPlugin: This plugin lets you create orders directly from the administration interface. This makes life easier for your most difficult customers, saving them from having to go through the "checkout" phase.
  • SyliusInvoicingPlugin: This plugin generates invoices for your orders. It's like having an accountant in your pocket.
  • RefundPlugin : This plugin allows you to issue partial or full refunds to your customers.

Even if these plugins aren't exactly what you want them to be, don't forget that they're simple Symfony bundles, so you only need good Symfony skills to modify them.

Plugin Play: How to install and use plugins

Installing a plugin is more complex than on other platforms, but if you're in the Symfony ecosystem, then you won't be out of place:

  • Find the plugin: Use the plugin "store " or trusted third-party sources (usually Github) to find the plugin you need.
  • Install the plugin: Use Composer to install the plugin. It's the same as with Symfony.
  • Configuring the plugin: Each plugin comes with its own set of configuration instructions, usually available in Github repositories.

Once these steps have been completed, the new features added by the plugin should become available.

Conclusion

Unlike other e-commerce solutions on the market, Sylius' great strength lies in its incredible level of customization.

In fact, I've used it as the basis for my e-commerce platform.

I hope you've enjoyed this introduction to Sylius, and I'll see you next time?