Download the PHP package mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin without Composer
On this page you can find all versions of the php package mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin
More information about mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin
Files in mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin
Package sylius-ceska-posta-balikomaty-plugin
Short Description Česká pošta balíkomaty plugin for Sylius
License MIT
Informations about the package sylius-ceska-posta-balikomaty-plugin
Česká Pošta Balíkomaty Plugin
Features
- Adds shipment type Česká Pošta Balíkomat branch which allows sending ordered products to selected Česká Pošta Balíkomat branch.
- The user can choose the Česká Pošta Balíkomat branch during checkout in the Shipment step.
- See Česká Pošta Balíkomat branch in final checkout step and also in the admin panel.
- Export CSV with the Česká Pošta Balíkomat shipments and import it easily into Česká Pošta Balíkomaty's system.
Installation
- Run
$ composer require mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin
.
-
Add plugin classes to your config/bundles.php
:
-
Add resource to config/packeges/_sylius.yaml
-
Add routing to config/_routes.yaml
-
Your Entity Shipment
has to implement \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShipmentInterface
.
You can use the trait \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShipmentTrait
.
-
Your Entity ShippingMethod
has to implement \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShippingMethodInterface
.
You can use the trait \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShippingMethodTrait
.
-
Include @MangoSyliusCeskaPostaBalikomatyPlugin/Admin/ShippingMethod/_ceskaPostaBalikomatyForm.html.twig
into @SyliusAdmin/ShippingMethod/_form.html.twig
.
-
Include @MangoSyliusCeskaPostaBalikomatyPlugin/Shop/Checkout/SelectShipping/_ceskaPostaBalikomatyChoice.html.twig
into @SyliusShop/Checkout/SelectShipping/_choice.html.twig
.
-
Replace {% include '@SyliusShop/Common/_address.html.twig' with {'address': order.shippingAddress} %}
with {{ include('@MangoSyliusCeskaPostaBalikomatyPlugin/Shop/Common/Order/_addresses.html.twig') }}
in @SyliusShop/Common/Order/_addresses.html.twig
-
Replace {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.shippingAddress} %}
with {{ include('@MangoSyliusCeskaPostaBalikomatyPlugin/Admin/Common/Order/_addresses.html.twig') }}
in @SyliusAdmin/Order/Show/_addresses.html.twig
-
Override the template in @MangoSyliusShipmentExportPlugin/_row.html.twig
- Create and run doctrine database migrations.
$ composer require mangoweb-sylius/sylius-ceska-posta-balikomaty-plugin
.Add plugin classes to your config/bundles.php
:
Add resource to config/packeges/_sylius.yaml
Add routing to config/_routes.yaml
Your Entity Shipment
has to implement \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShipmentInterface
.
You can use the trait \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShipmentTrait
.
Your Entity ShippingMethod
has to implement \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShippingMethodInterface
.
You can use the trait \MangoSylius\SyliusCeskaPostaBalikomatyPlugin\Model\CeskaPostaBalikomatyShippingMethodTrait
.
Include @MangoSyliusCeskaPostaBalikomatyPlugin/Admin/ShippingMethod/_ceskaPostaBalikomatyForm.html.twig
into @SyliusAdmin/ShippingMethod/_form.html.twig
.
Include @MangoSyliusCeskaPostaBalikomatyPlugin/Shop/Checkout/SelectShipping/_ceskaPostaBalikomatyChoice.html.twig
into @SyliusShop/Checkout/SelectShipping/_choice.html.twig
.
Replace {% include '@SyliusShop/Common/_address.html.twig' with {'address': order.shippingAddress} %}
with {{ include('@MangoSyliusCeskaPostaBalikomatyPlugin/Shop/Common/Order/_addresses.html.twig') }}
in @SyliusShop/Common/Order/_addresses.html.twig
Replace {% include '@SyliusAdmin/Common/_address.html.twig' with {'address': order.shippingAddress} %}
with {{ include('@MangoSyliusCeskaPostaBalikomatyPlugin/Admin/Common/Order/_addresses.html.twig') }}
in @SyliusAdmin/Order/Show/_addresses.html.twig
Override the template in @MangoSyliusShipmentExportPlugin/_row.html.twig
For the guide how to use your own entity see Sylius docs - Customizing Models
Usage
- Create new shipping method in the admin panel and enable Česká Pošta Balíkomat, save it and click
Sync Česká Pošta Balíkomaty branches
button to load the list of branches into the current database. -
Česká Pošta Balíkomaty CSV export will be generated for shipping method which has the code 'ceska_posta_balikomat', you can change this in parameters, it is an array.
- Česká Pošta Balíkomaty branches are updated on their servers. Just call this command (via
cron
) once a day, ideally during the night.
Development
Usage
- Develop your plugin in
/src
- See
bin/
for useful commands
Testing
After your changes you must ensure that the tests are still passing.
License
This library is under the MIT license.
Credits
Developed by manGoweb.
All versions of sylius-ceska-posta-balikomaty-plugin with dependencies
php Version ^7.3
sylius/sylius Version ^1.7.0
mangoweb-sylius/sylius-shipment-export-plugin Version ^0.4.0