Install
Install via Composer
Download Php-Console and its dependencies to the vendor directory. You can use Composer for the automated process:
$ php composer.phar require splash/sylius-splash-plugin
Composer will install the bundle to vendor/splash/sylius-splash-plugin directory.
Installation
Install via Composer
Download Splash Sylius Plugin and its dependencies to the vendor directory. You can use Composer for the automated process:
$ php composer.phar require splash/sylius-splash-plugin
Composer will install the bundle to vendor/splash
directory.
Adding bundle to your application kernel
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new \Splash\Bundle\SplashBundle(), // Splash Sync Core PHP Bundle
new \Splash\SyliusSplashPlugin\SplashSyliusSplashPlugin(), // Splash Bundle for Sylius
// ...
);
}
Connect to your Splash Account
First, you need to create access keys for you module in our website. To do so, on Splash workspace, go to Servers » Add a Server and note your id & encryption keys.
Configure Splash Bundles
Here is the default configuration for Splash bundles:
splash:
id: ThisIsSyliusWsId # Your Splash Server ID
key: ThisIsSyliusWsEncryptionKey # Your Server Secret Encryption Key
splash_sylius_splash:
default_channel: FASHION_WEB # Select here your shop default channel
Configure Splash Routes
Add Splash Bundle routes to your configuration:
splash_ws:
resource: "@SplashBundle/Resources/config/routing.yml"
prefix: /ws
Test & Connect your server
Once your server is created in your account, you need to declare it.
To do so, open your web browser and touch “http://my.webshop.com/ws/splash-test” url.
Requirements
- PHP 7.4+
- Sylius 1.6+
- An active Splash Sync User Account
Configuration
Configuration reference
Here is the reference configuration for Splash Sylius Plugin:
splash:
# Your Splash Server ID
id: ThisIsSyliusWsId
# Your Server Secret Encryption Key
key: ThisIsSyliusWsEncryptionKey
# Expert Mode. Set this url to route to your dedicated server.
host: https://www.splashsync.com/ws/soap
# Server Page Information (Optional)
infos:
company: My Company Name
address: Postal Address
zip: Address Post Code
town: Address Town
www: Server Url
email: Company Email
phone: Company Phone
logo: https://public.url.com/path/to/logo.png
splash_sylius:
# Select here you shop default channel
default_channel: FASHION_WEB
# Default Folder for Storage of new Images.
images_folder: "%kernel.project_dir%/web/media/image"
Test Environment (Docker)
You want to try this module? Adjust it to your needs? Or develop new features? Ok! Let’s build a DEV environment!!
Using Docker & Docker Compose, you can start a full developer project.
For each module, we predefined most common possible installations.
Requirements on Local System
- Git git-scm.com
- Php Composer getcomposer.org/
- Docker & Docker-Compose www.docker.com/
- No active Splash Sync User Account is needed!
Clone Module Sources
First, you need to download the sources and compile the module locally.
$ git clone https://github.com/SplashSync/Php-Console myModule
$ cd myModule
$ composer install --no-dev
Build whole Docker Compose Environment
Then, just build the docker environment.
$ docker-compose up
This may take a while but in the end, you should have all your environment working!
Access your Environment
To facilitate access to your instances, we fixed all containers IPs on docker-compose.yml
file.
In this file, you should find a comment with target IPs of your environment containers.
I.e. for Prestashop:
################################################################################
# Docker Compose File
#
# This Docker File intend to Create a Complete Dev Environment
# for Splash Modules on Prestashop
#
# To us different PS Version coinfigured, you need to add hosts to /etc/hosts
#
# 172.102.0.10 latest.prestashop.local
# 172.102.0.16 ps1-6.prestashop.local
# 172.102.0.17 ps1-7.prestashop.local
# 172.102.0.100 toolkit.prestashop.local
#
################################################################################
So, if you browse IP 172.102.0.10, you should find your App working!!
All usefull details of the installtion are visible on docker-compose.yml
file.
For an easier usage, you can cut/paste all IPs to your /etc/hosts. This will make the App available from Url, not only IP.
Test, Develop & Debug using our toolkit
Have you seen this last container available? It’s Splash ToolKit!!
It’s done for developpers and should already be pre-setuped for you Apps!
Just browse the url, and log with user “admin” and password “admin”!
Clear cache?
If your configuration changed, you may have a pretty error… you need to clear the cache!
How? Just run this docker command:
$ docker-compose exec toolkit rm -Rf var/cache/*
Test your connector locally??
Yes, you can! All you need to run our complete core test sequence is already provided by Splash Toolkit.
How? Just run phpunit using this docker command:
$ docker-compose exec toolkit vendor/bin/phpunit