Skip to content

Commit

Permalink
add icons, usage and testing at readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gewebe committed Nov 17, 2019
1 parent 3b0b7d4 commit 009d4cb
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 4 deletions.
50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Sylius Product Deposit Plugin
The deposit plugin in Sylius allows you to set an amount of refundable deposit for any product. For example: deposit for car replacement parts, batteries or bottle deposit for drinks.

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE)
[![Build Status][ico-travis]][link-travis]
[![Quality Score][ico-code-quality]][link-code-quality]

The product deposit plugin in Sylius allows you to set an amount of refundable deposit price for any product.
For example: deposit for bottles, cans, pallets, batteries or car replacement parts.

## Features
* Store individual deposit prices for each product variant and channel
Expand All @@ -22,7 +29,6 @@ Register the plugin by adding it to your `config/bundles.php` file
return [
// ...
\Gweb\SyliusProductDepositPlugin\GwebSyliusProductDepositPlugin::class => ['all' => true],
// ...
];
```

Expand Down Expand Up @@ -67,7 +73,7 @@ imports:
}
```

- If you use `yaml` mapping:
- If you use `yaml` mapping add also:

```yaml
App\Entity\ProductVariant:
Expand Down Expand Up @@ -99,4 +105,40 @@ bin/console doctrine:migrations:migrate

## Usage

TODO
##### 1. Add a deposit price to a product variant
![Screenshot manage product variant deposit price](docs/images/manage_product_variant_deposit.png)

##### 2. Browse a product variant with deposit price
![Screenshot product details with deposit](docs/images/product_details.png)

##### 3. Buy a product with deposit price included in final product price
![Screenshot shopping cart with deposit](docs/images/shopping_cart.png)

## Testing

Setup
```bash
$ composer install
$ cd tests/Application
$ yarn install
$ yarn run gulp
$ bin/console assets:install public -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -d public -e test
```

Run Tests
```bash
$ vendor/bin/behat
$ vendor/bin/phpspec run
$ vendor/bin/phpstan analyse -c phpstan.neon -l max src/
```

[ico-version]: https://img.shields.io/packagist/v/gweb/gweb-product-deposit-plugin.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/gewebe/SyliusProductDepositPlugin/master.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/gewebe/SyliusProductDepositPlugin.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/gweb/sylius-brand-plugin
[link-travis]: https://travis-ci.org/gewebe/SyliusProductDepositPlugin
[link-code-quality]: https://scrutinizer-ci.com/g/gewebe/SyliusProductDepositPlugin
Binary file added docs/images/manage_product_variant_deposit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/product_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/shopping_cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 009d4cb

Please sign in to comment.