From 269c2e84e483e4b9deea751a5099ca15af9eea90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kali=C5=84ski?= Date: Fri, 6 Sep 2024 15:36:38 +0200 Subject: [PATCH 1/2] OP-508 - installation.md has been updated --- README.md | 60 +++++++------------------------ doc/installation.md | 86 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 47 deletions(-) create mode 100644 doc/installation.md diff --git a/README.md b/README.md index a9d38f9..2adb772 100644 --- a/README.md +++ b/README.md @@ -35,59 +35,25 @@ This **open-source plugin was developed to help the Sylius community**. If you h [![](https://bitbag.io/wp-content/uploads/2020/10/button-contact.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_dpdpl-shipping-export) -# Installation +## Installation -```bash -composer require bitbag/dpd-pl-shipping-export-plugin -``` - -Add plugin dependencies to your `config/bundles.php` file: -```php -return [ - ... - - BitBag\DpdPlShippingExportPlugin\DpdPlShippingExportPlugin::class => ['all' => true] -]; -``` - -Import required config in your `config/packages/_sylius.yaml` file: -```yaml -imports: - ... - - - { resource: "@DpdPlShippingExportPlugin/Resources/config/config.yml" } -``` - -Import routing in your `config/routes.yaml` file: - -```yaml -bitbag_shipping_export_plugin: - resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing.yml" - prefix: /admin -``` - -Clear application cache by using command: - -```bash -bin/console cache:clear -``` +--- +### Requirements -Verify database schema changes: +We work on stable, supported and up-to-date versions of packages. We recommend you to do the same. -```bash -bin/console doctrine:schema:update --dump-sql -``` +| Package | Version | +|---------------|-----------------| +| PHP | \>=8.0 | +| sylius/sylius | 1.12.x - 1.13.x | +| MySQL | \>= 5.7 | +| NodeJS | \>= 18.x | -Update your database schema +---- +### Full installation guide +- [See the full installation guide](doc/installation.md) -```bash -bin/console doctrine:schema:update --force --complete -``` -# Usage -### Important! -If non-existent postal codes are provided - both in the "shipping gateway" and during the order, export of the shipment will not be possible. For the plugin to work properly, it is also necessary to add the weight of the products. # About us - --- BitBag is a company of people who **love what they do** and do it right. We fulfill the eCommerce technology stack with **Sylius**, Shopware, Akeneo, and Pimcore for PIM, eZ Platform for CMS, and VueStorefront for PWA. Our goal is to provide real digital transformation with an agile solution that scales with the **clients’ needs**. Our main area of expertise includes eCommerce consulting and development for B2C, B2B, and Multi-vendor Marketplaces.
diff --git a/doc/installation.md b/doc/installation.md new file mode 100644 index 0000000..1125a5e --- /dev/null +++ b/doc/installation.md @@ -0,0 +1,86 @@ +# Installation + +## Overview: +GENERAL +- [Requirements](#requirements) +- [Composer](#composer) +- [Basic configuration](#basic-configuration) +--- +ADDITIONAL +- [Known Issues](#known-issues) +--- + +## Requirements: +We work on stable, supported and up-to-date versions of packages. We recommend you to do the same. + +| Package | Version | +|---------------|-----------------| +| PHP | \>=8.0 | +| sylius/sylius | 1.12.x - 1.13.x | +| MySQL | \>= 5.7 | +| NodeJS | \>= 18.x | + +## Composer: +```bash +composer require bitbag/dpd-pl-shipping-export-plugin +``` + +## Basic configuration: +Add plugin dependencies to your `config/bundles.php` file: + +```php +# config/bundles.php + +return [ + ... + BitBag\DpdPlShippingExportPlugin\DpdPlShippingExportPlugin::class => ['all' => true] +]; +``` + +Import required config in your `config/packages/_sylius.yaml` file: + +```yaml +# config/packages/_sylius.yaml + +imports: + ... + - { resource: "@DpdPlShippingExportPlugin/Resources/config/config.yml" } +``` + +Import routing in your `config/routes.yaml` file: +```yaml +# config/routes.yaml + +bitbag_shipping_export_plugin: + resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing.yml" + prefix: /admin +``` + +### Update your database +First, please run legacy-versioned migrations by using command: +```bash +bin/console doctrine:migrations:migrate +``` + +After migration, please create a new diff migration and update database: +```bash +bin/console doctrine:migrations:diff +bin/console doctrine:migrations:migrate +``` + +### Clear application cache by using command: +```bash +bin/console cache:clear +``` +**Note:** If you are running it on production, add the `-e prod` flag to this command. + +## Known issues +### Translations not displaying correctly +For incorrectly displayed translations, execute the command: +```bash +bin/console cache:clear +``` +### Errors when attempting to export a shipment +- If non-existent postal codes are provided - both in the shipping gateway and during the order, +export of the shipment will not be possible. +- For the plugin to work properly, it is also necessary to add the weight of the products. From 56703ad4d0f6bf0253be06bb96ac9b8eeb6e224b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kali=C5=84ski?= Date: Fri, 6 Sep 2024 15:39:33 +0200 Subject: [PATCH 2/2] OP-508 - cleaning --- composer.json | 2 +- tests/Application/config/bootstrap.php | 9 ++++++++- tests/Application/public/index.php | 9 ++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index fc7c603..054404c 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^8.0 || ^8.1", + "php": "^8.0", "bitbag/shipping-export-plugin": "^3.0", "msztorc/php-dpd-api": "^2.1", "sylius/sylius": "~1.12.0 || ~1.13.0", diff --git a/tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php index c78eb11..450a654 100644 --- a/tests/Application/config/bootstrap.php +++ b/tests/Application/config/bootstrap.php @@ -1,5 +1,12 @@