From 1ecc346a7f9b511ffe18d1667bdb6887be969e77 Mon Sep 17 00:00:00 2001 From: janpalen Date: Fri, 19 Jul 2024 13:20:42 +0200 Subject: [PATCH] OP-376 - Change README file --- doc/installation.md | 57 ++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/doc/installation.md b/doc/installation.md index deb236b..773029d 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -15,12 +15,14 @@ ]; ``` -1. Import required config by adding `config/packages/bitbag_sylius_bonus_points_plugin.yaml` file: +1. Import resource in your `config/packages/_sylius.yaml` ```yaml - # config/packages/bitbag_sylius_bonus_points_plugin.yaml + # config/packages/_sylius.yaml imports: + ... + - { resource: "@BitBagSyliusBonusPointsPlugin/Resources/config/config.yml" } ``` @@ -40,34 +42,37 @@ ```php - - - - - - ``` + /** + * @ORM\Entity + * @ORM\Table(name="sylius_order") + */ + #[ORM\Entity] + #[ORM\Table(name: 'sylius_order')] + class Order extends BaseOrder implements BonusPointsAwareInterface + { + #[ORM\Column(type: 'integer', nullable: true)] + protected ?int $bonusPoints = null; + + public function getBonusPoints(): ?int + { + return $this->bonusPoints; + } + + public function setBonusPoints(?int $bonusPoints): void + { + $this->bonusPoints = $bonusPoints; + } + } 1. Customize shop templates to include bonus points. For starter You may want copy to templates directory everything from plugin's tests/Application/templates