mangoweb-sylius / sylius-jezek-duel-plugin
Jezek duel plugin for Sylius
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.1
- ext-ftp: *
- ext-simplexml: *
- sylius/sylius: ^1.2.5
- symfony/framework-bundle: ^4.1
- symfony/symfony: ^4.1
Requires (Dev)
- behat/behat: ^3.4
- behat/mink: ^1.7@dev
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/context-service-extension: ^1.2
- friends-of-behat/cross-container-extension: ^1.1
- friends-of-behat/service-container-extension: ^1.0
- friends-of-behat/symfony-extension: ^1.2.1
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpstan/phpstan-doctrine: ^0.10
- phpstan/phpstan-shim: ^0.10
- phpstan/phpstan-symfony: ^0.10
- phpstan/phpstan-webmozart-assert: ^0.10
- phpunit/phpunit: ^6.5
- se/selenium-server-standalone: ^3.12
- sylius-labs/coding-standard: ^2.0
- symfony/templating: ^4.1
This package is auto-updated.
Last update: 2024-11-25 01:12:04 UTC
README
Ježek Duel Plugin
Features
Provides integration with Duel accounting software.
- Downloads Sylius orders into Duel
- Updates product data in Sylius
- You can update any product data, by default the plugin updates stock level only. For details see
updateProduct()
method of themango:jezek:update
command. - In combination with the Payment Fee module, it can handle cash on delivery fees (known as "Dobírka" in Czechia and Slovakia) incl. taxes.
Requirements
- Based on how integrations in Ježek Duel work, you will need an FTP account as a storage for XML files which are used for transferring data.
Installation
- Run
$ composer require mangoweb-sylius/sylius-jezek-duel-plugin
. - Register
\MangoSylius\JezekDuelPlugin\MangoSyliusJezekDuelPlugin
in your Kernel. - Add ftp parameters into config.yml
mango_sylius_jezek_duel:
server_url: 'server_url'
username: 'username'
password: 'password'
- Your Entity
Order
has to implement\MangoSylius\JezekDuelPlugin\Model\OrderWithExportedAtInterface
. You can use TraitMangoSylius\JezekDuelPlugin\Model\OrderWithExportedAtTrait
. - Your Entity
ProductVariant
has to implement\MangoSylius\JezekDuelPlugin\Model\ProductVariantWithJezekIdsInterface
. You can use TraitMangoSylius\JezekDuelPlugin\Model\ProductVariantWithJezekIdsTrait
. - Include template
Resources/views/Channel/extendedChannelForm.html.twig
in@SyliusAdmin/Channel/_form.html.twig
.
For guide to use your own entity see Sylius docs - Customizing Models
Usage
- Set up the eshop in Duel
Use "Webový servis" or "eBrána" type. Click "Založit e-shop" in "Agenda" tab (id asked for folder names, keep defaults - "in" and "out"). - Link products
Use Ježek product UID codes as code for products in Sylius or if you use another codes in your Sylius eshop, put Duel's product UID in dedicated product parameter "Ježek ID". You can put mode UIDs (one per line) to connect more Duel products to one Sylius product when selling product bundles. The plugin first checks "Ježek ID" field, if empty, it checks product code to match the product by Ježek UID. For configurable products, there is one "Ježek ID" per variant. You can use the same "Ježek ID" for multiple variants as well as products. - Data handling by Sylius
Setup commands in cron as specified below. Recommended frequency is 5 mins for orders (can be less for busy shops) and one hour for products (if you update products less frequently, use daily sync). - Invoice inbound sync (orders from eshop)
Click "Stažení objednávek z e-shopu" in "Agenda" tab. - Invoice outbound sync (product data to eshop)
Click "Aktualizace dat v e-shopu" in "Agenda" tab.
Commands
-
Export orders to FTP.
mango:jezek:export
-
Update products details from FTP.
mango:jezek:update
Development
Usage
- Create symlink from .env.dist to .env or create your own .env file
- Develop your plugin in
/src
- See
bin/
for useful commands
Testing
After your changes you must ensure that the tests are still passing.
- Easy Coding Standard
bin/ecs.sh
- PHPStan
bin/phpstan.sh
License
This library is under the MIT license.
Credits
Developed by manGoweb.