SUNRISE PHP is a template shopfront implementation that implements a complete online shop on the commercetools eCommerce platform using the following components:
It aims to focus on being slim, easy to understand and fast, delegating reusabilty into the commons and symfony-components libraries.
Please read the Changelog before updating in any case.
To run, you need a project on the commercetools platform that contains some minimum necessary content (e.g. the sample data). Then get your project key, client ID and client secret from the merchant center and provide them in one of the following ways:
app/config/parameters.ymlwith the following format:
parameters: env(SECRET_TOKEN): Secr3tT0ken env(CTP_CLIENT_ID): client-id env(CTP_CLIENT_SECRET): client-secret env(CTP_PROJECT): project-key
For local development purposes you can run the application in the php built-in web server. The
web folder contains static assets and index.php as the only PHP file.
php bin/console server:run --env prod
php bin/console server:run
To improve the template, we are happily receiving pull requests with improvements and bug fixes. If you'd like to change bigger things or add features it's a good idea to discuss the idea in a github issue first.
IMPORTANT: The composer configuration clones the PHP commons library and the sunrise designs inside the
vendor directory. So pay attention when doing git operations with changes in these files.
php bin/console list
php bin/console cache:warmup
For an easy and fast deployment of your application we recommend heroku:
The Sunrise app is delivered with a docker compose configuration.
docker run -v $PWD:/var/www/symfony -w /var/www/symfony --rm=true jaysde/symfony-php-fpm composer install --prefer-dist docker-compose up
This starts a nginx and a php-fpm docker container serving the application.
Fork and forge your own eCommerce solution from it.
templatesdirectory in the project folder and overriding the
*.hbsfilenames you find in