Sylius is a new project to create an open source ecommerce platform built from Symfony2 components. Its pre-alpha at the moment, so there is a lot to do, but as the projects stated goals is to create an ecommerce platform from decoupled components, its exciting none the less.
Its a bit of a ball-ache to install on a Mac (so I can only imagine the Windows process), but I’ve just managed to get it up and running, so thought I’d throw together a quick guide to getting started.
The actual installation page can be found here, but as its taken me a while to figure out, they are probably pretty used to their workflow and glossed over a few things… it is pre-alpha after all.
Make sure you have the following programs and packages installed on your machine before starting.
- Vagrant – Local development environments. If you want to know how to get started you can read my articles on Vagrant, or check the docs
- Composer – Package and dependancy management
Im going to assume as you are trying to build a pre-alpha ecommerce platform you are ok with creating directories and navigating with the terminal, otherwise you should probably just go and get woocommerce right now and save yourself the headaches.
First of all, create a directory on your computer called sylius and inside it, run the following command:
composer create-project -s dev sylius/sylius
This will allow Composer to install the project from its repo and download into the directory you specified. As you are doing this on a Mac you probably got the following error about not having ‘lib-icu” installed on your machine…
To get round this we are going to ignore it for now. By running ‘ls’ you can see that there is a ‘composer.json’ file in the sylius directory, so we can simply tell composer to update the packages for us and carry on.
#run this from the current directory composer update
Composer will now update all the packages that the installer wasn’t able to get through, which hopefully looks something like this:
Once this process has finished, you will be asked to provide some basic config data to composer. This data, which is for DB access as well as Facebook/Social integration, PayPal/Stripe payment gateway keys and some other misc stuff, can mostly just be left as the defaults.
So we should have the packages down now, the next step is Vagrant. For those of you new to Vagrant, checkout my mini series on it here, other wise all you need to do is type
Vagrant needs NFS, which requires admin privileges during the ‘Up’. Whilst Vagrant is downloading the box, installing the required software and generally saving you from doing anything at all, you will have to add the following lines to your Hosts file:
#run this in the terminal sudo nano /etc/hosts #add these below whatever is currently there and "ctrl+x" once ready 10.0.0.200 sylius.dev 10.0.0.200 www.sylius.dev