Download the PHP package 3brs/sylius-packeta-plugin without Composer
On this page you can find all versions of the php package 3brs/sylius-packeta-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 3brs/sylius-packeta-plugin
More information about 3brs/sylius-packeta-plugin
Files in 3brs/sylius-packeta-plugin
Informations about the package sylius-packeta-plugin
Packeta Plugin
Features
- Enables sending shipments via [en] [cz] [pl] [sk] [hu] [ro] to Packeta branch or to the customer's address via Packeta service.
- The user can choose the Packeta branch from the map during checkout in the Shipment step.
- See Packeta branch in final checkout step and also in the admin panel.
- Export CSV with the Packeta shipments (both to Packeta branch or customer's address) and import it easily into Packeta's system.
Installation
- Run
composer require 3brs/sylius-packeta-plugin. -
Add plugin classes to your
config/bundles.php: -
Use plugin configuration by creating
config/packages/threebrs_sylius_packeta_plugin.yamlwith content -
Add routing to
config/routes.yaml -
Your Entity
Shipmenthas to implement\ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentInterface. You can use the trait\ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentTrait. -
Your Entity
ShippingMethodhas to implement\ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentInterface. You can use the trait\ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentTrait. -
Override the template in
@ThreeBRSSyliusShipmentExportPlugin/_row.html.twig - Create and run doctrine database migrations.
For the guide how to use your own entity see Sylius docs - Customizing Models
Usage
- For delivery to the Packeta branch, create new shipping method in the admin panel, set
Packeta api keyand leaveCarrier IDempty. - For delivery to customer's address, create new shipping method in the admin panel, set the
Carrier IDand leave thePacketa API keyempty. - If you need to filter the points in the map by country, use the
Show only pickup points from specific country in the map. If you leave this blank, all points in all supported countries will be shown. -
Packeta CSV export will be generated for shipping method which has the code 'packeta', you can change this in parameters, it is an array (therefore can contain more codes, e.g. if you need to have different prices for different countries, you will need more shipping methods; it is okay to use always the same API key)
You should add to this array both methods for shipping to Packeta branch and also to customer's address via Packeta service.
- Packeta API documentation: https://docs.packeta.com/docs/getting-started/client-section-imports#csv-import
- You can expand the list of countries by the parameter
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
All versions of sylius-packeta-plugin with dependencies
php Version ^8.2
sylius/sylius Version ^2.1
3brs/sylius-shipment-export-plugin Version ^2.1
