The challenge is to do REST API for simple shop with products and category Content must to import from xml Admin can to add and edit content Anonymous can access to public API The master branch have a working project, however you can see how project are grow with step** branch. So...
- step0 - Just installed Symfony2.2
- step1 - Create SimpleShopBundle and view HelloWorld!!!
- step2 - Install bootstrap and update template
- step3 - Import simple price in controller, and view it in template
- step4 - Now we can import price from command line with import:price command
- step5 - Create an API. Now we can get 10 products per page from /api/products/[page] and all products from category (using id category) api/categories/[category_id]/products
- step6 - Create backend admin panel for CRUD for Product && Category entity
- step7 - Create Behat tests, and include travis-ci.
If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:
curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Then, use the clone repository SimpleShop:
git clone https://github.com/spolischook/SimpleShop /var/www/your_project
Then run:
composer update
Composer will install all dependencies under the
/var/www/your_project/vendor directory.
Copy parameters.yml.dist and rename to parameters.yml (app/config/) Set database connection parameters (database_name, database_user, database_password) Create table:
app/console doctrine:database:createRun reload to do all necessary operation to start project:
php bin/reload.phpImport price:
app/console import:priceYou have to access your project with:
http://localhost/your_project/web/app_dev.php
First of all you must edit the begat.yml. Write your base url for test env. Then you can run the tests by type in console:
vendor/behat/behat/bin/behat @SimpleShopBundleGeekhub test uses GitHub issues. If you have found bug, please create an issue.
License can be found here.
Simple Shop was originally created by Sergey Polischook for the final examination of Geekhub Project.
