2018-07-13 22:00:46 +02:00
|
|
|
|
# coding-challenge-online-shop
|
|
|
|
|
Coding challenge for a online shop
|
2018-07-15 16:31:18 +02:00
|
|
|
|
## task
|
2018-07-14 10:29:32 +02:00
|
|
|
|
### requirements
|
2018-07-15 16:26:33 +02:00
|
|
|
|
1. Create a web application with PHP which works like a really small online shop. ✓
|
2018-07-15 16:56:56 +02:00
|
|
|
|
2. Create a database with at least 20 products✓ automatically✓ per script. ✓
|
2018-07-15 16:50:26 +02:00
|
|
|
|
3. Create a product listing which display all products from the database. ✓
|
|
|
|
|
<br> The following information are required:
|
2018-07-15 16:26:33 +02:00
|
|
|
|
- price net and gross ✓
|
|
|
|
|
- image ✓
|
|
|
|
|
- product name ✓
|
|
|
|
|
- color ✓
|
|
|
|
|
4. Add a “to the basket” button to each product in the listing. ✓
|
2018-07-13 22:09:30 +02:00
|
|
|
|
5. Make the product basket work and display all products which are in the basket as a list with
|
2018-07-15 16:50:26 +02:00
|
|
|
|
small images. ✓
|
2018-07-15 16:26:33 +02:00
|
|
|
|
6. Create a login and registration with e-mail address, password and a name. ✓
|
|
|
|
|
7. The login should be session based. ✓
|
|
|
|
|
8. Create a checkout which is shown when the user is logged in. ✓
|
2018-07-15 16:50:26 +02:00
|
|
|
|
9. The user should be able to choose between 2 payment methods. ✓
|
|
|
|
|
<br> Call them method1 ✓ and
|
2018-07-15 16:26:33 +02:00
|
|
|
|
method2 ✓.
|
|
|
|
|
10. Store the order at the database. ✓
|
2018-07-15 16:50:26 +02:00
|
|
|
|
11. Add a color filter to the product list.✓
|
|
|
|
|
<br> The user should be able to filter the listing with the existing colors. ✓
|
2018-07-14 10:29:32 +02:00
|
|
|
|
### specifications
|
2018-07-15 16:31:18 +02:00
|
|
|
|
- Please use PHP ✓, MySQL ✓ and HTML ✓. You can also use CSS, JavaScript, Bootstrap ✓ and jQuery.
|
2018-07-15 16:26:33 +02:00
|
|
|
|
- Save your code online at github. ✓
|
|
|
|
|
- Please use an autoloader and namespaces. ✓
|
|
|
|
|
- Don’t use a ready to go framework. Build the application from the scratch. ✓
|
|
|
|
|
- Use transactions if it makes sense. ✓
|
|
|
|
|
- Please cover your code with unit tests. ✓
|
2018-07-15 16:31:18 +02:00
|
|
|
|
### time frame
|
2018-07-15 16:56:56 +02:00
|
|
|
|
- one weekend ✓
|
2018-07-14 10:29:32 +02:00
|
|
|
|
## start
|
2018-07-14 10:44:39 +02:00
|
|
|
|
To run the program execute:
|
2018-07-14 10:29:32 +02:00
|
|
|
|
```bash
|
2018-07-14 16:51:51 +02:00
|
|
|
|
bash ./start.sh
|
2018-07-14 10:29:32 +02:00
|
|
|
|
```
|
2018-07-14 20:09:56 +02:00
|
|
|
|
### Attention
|
2018-07-15 16:50:26 +02:00
|
|
|
|
This is a demo program; Everytime when you restart the demo the database will be reset.
|
2018-07-14 20:09:56 +02:00
|
|
|
|
|
2018-07-15 16:31:18 +02:00
|
|
|
|
### requirements
|
|
|
|
|
The start.sh file needs docker and docker-compose.
|
|
|
|
|
|
2018-07-15 17:00:37 +02:00
|
|
|
|
### access
|
|
|
|
|
If you started the application you can run access it with a browser on <a href="http://localhost:8100/">localhost:8100</a>.
|
|
|
|
|
|
2018-07-14 10:44:39 +02:00
|
|
|
|
## test
|
|
|
|
|
To run the tests execute:
|
|
|
|
|
```bash
|
2018-07-14 16:51:51 +02:00
|
|
|
|
bash ./test.sh
|
2018-07-14 10:44:39 +02:00
|
|
|
|
```
|
2018-07-15 16:50:26 +02:00
|
|
|
|
Tests just exist for the core, the entities and some other files. UnitTest you will find in the directory of the unit.
|