spinbits / sylius-baselinker-plugin
Baselinker Plugin for Sylius.
Installs: 683
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 5
Open Issues: 2
Type:sylius-plugin
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- sylius/sylius: ~1.10.0 || ~1.11.0
- symfony/flex: ^1.10
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- lakion/mink-debug-extension: ^2.0.0
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.74
- phpstan/phpstan-doctrine: 0.12.31
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: 0.12.12
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sensiolabs/security-checker: ^6.0
- squizlabs/php_codesniffer: ^3.7
- sylius-labs/coding-standard: ^3.1
- symfony/browser-kit: ^4.4 || ^5.2
- symfony/debug-bundle: ^4.4 || ^5.2
- symfony/dotenv: ^4.4 || ^5.2
- symfony/intl: ^4.4 || ^5.2
- symfony/web-profiler-bundle: ^4.4 || ^5.2
- vimeo/psalm: 4.4.1
Conflicts
- doctrine/doctrine-bundle: 2.3.0
- jms/serializer-bundle: 3.9.0
- symfony/amqp-messenger: ^6.0
- symfony/cache: ^6.0
- symfony/doctrine-bridge: 4.4.16
- symfony/doctrine-messenger: ^6.0
- symfony/error-handler: ^6.0
- symfony/password-hasher: ^6.0
- symfony/property-info: 4.4.22 || 5.2.7
- symfony/redis-messenger: ^6.0
- symfony/serializer: 4.4.19 || 5.2.2
- symfony/stopwatch: ^6.0
- symfony/twig-bridge: ^6.0
- symfony/var-dumper: ^6.0
- symfony/var-exporter: ^6.0
README
Sylius Baselinker Plugin
Need help ?
Drop us a message hello@spinbits.io
Overview
This plugin is used to connect Sylius and Baselinker. Baselinker can be used as an integrator and management platform for your e-commerce. It allows to offer your products on many platforms like Ebay, Amazon or Allegro. Baselinker can help you automate sale processes with almost 16000 different providers.
Details
This package is implementation of communication with BaseLinker Connector ("integration file"). For further details please refer to https://developers.baselinker.com/shops_api/
After installation your Baselinker connector url will be available under path: /baselinker-connector
of your shop.
Baselinker Configuration
- Login to your Baselinker account: https://login.baselinker.com/
- Click integrations: https://panel-b.baselinker.com/list_integrations.php
- Configure your integration as showed below. Remember to replace your shop domain in url.
- Copy communication password and set it your
.env
file as showed below:BASELINKER_PASSWORD='example-password-change-it'
Sylius Quickstart Installation
Follow the steps to install the plugin on your Sylius application:
-
Run
composer require spinbits/sylius-baselinker-plugin
. -
Import route into your routing file:
spinbits_baselinker_plugin: resource: "@SpinbitsSyliusBaselinkerPlugin/Resources/config/admin_routing.yml"
-
Import trait to your Order entity:
src/Entity/Order/Order.php
use Spinbits\SyliusBaselinkerPlugin\Entity\Order\OrderTrait; class Order extends BaseOrder { use OrderTrait;
-
Import trait to your ProductRepository entity:
src/Repository/ProductRepository.php
use Spinbits\SyliusBaselinkerPlugin\Repository\BaseLinkerProductRepositoryInterface; use Spinbits\SyliusBaselinkerPlugin\Repository\ProductsRepositoryTrait; use Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository as BaseProductRepository; class ProductRepository extends BaseProductRepository implements BaseLinkerProductRepositoryInterface { use ProductsRepositoryTrait; }
Make sure there is repository replace with your namespace in
config/packages/_sylius.yaml
sylius_product: resources: product: classes: repository: App\Repository\ProductRepository
-
Set Baselinker password:
.env
BASELINKER_PASSWORD='example-password'
-
Imports Plugin XML config file:
<imports> <import resource="@SpinbitsSyliusBaselinkerPlugin/Resources/services.xml"/> </imports>
Or in
config/services.yaml
:imports: - { resource: '../vendor/spinbits/sylius-baselinker-plugin/src/Resources/config/services.xml' }
-
Run migrations:
bin/console doctrine:migrations:migrate
Test plugin:
Basic tests
in order to test plugin you should
- replace
localhost
with your sylius domain - replace
example-password
with your baselinker password
You may get supported methods:
curl -X POST -d 'bl_pass=example-password&action=SupportedMethods' http://localhost/baselinker-connector
You may get version of integration:
curl -X POST -d 'bl_pass=example-password&action=FileVersion' http://localhost/baselinker-connector
Using Baslinker tester
go to:
https://developers.baselinker.com/shops_api/index.php?tester=1
and follow the instructions.
Help
If you need some help with Sylius development, don't hesitate to contact us directly. You can send us an email at office@spinbits.io