Download the PHP package asdoria/sylius-pickup-point-plugin without Composer
On this page you can find all versions of the php package asdoria/sylius-pickup-point-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asdoria/sylius-pickup-point-plugin
More information about asdoria/sylius-pickup-point-plugin
Files in asdoria/sylius-pickup-point-plugin
Package sylius-pickup-point-plugin
Short Description Asdoria Pickup point plugin for Sylius
License MIT
Informations about the package sylius-pickup-point-plugin
Asdoria Sylius Pickup Point Plugin
This plugin allows you to retrieve and use pickup points from different providers in your Sylius Shop
Installation
Require plugin with composer:
Register bundles in config/bundles.php
:
Import configuration:
Import routes:
Paste the following content to the src/Entity/Shipping/Shipment.php file
:
If you don't use annotations, add Shipment.orm.xml
:
Paste the following content to the src/Entity/Shipping/ShippingMethod.php file
:
If you don't use annotations, add ShippingMethod.orm.xml
:
Tell Sylius to use your own extended resources in config/packages/_sylius.yaml
:
Update schema database
Run following commands:
Front
0/ Admin
Add {{ form_row(form.pickupPointProvider) }}
in ShippingMethod form. You can copy the template overrides from the
plugin directory :
1/ Steps
1) In templates/bundles/SyliusShopBundle/Checkout/selectShipping.html.twig
, put react instance
element with class react-pickup-point
and locale with data-pkp-locale="{{ app.request.locale }}"
2) In templates/bundles/SyliusShopBundle/Checkout/SelectShipping/_shipment.html.twig
,
put <input type="hidden">
with class react-pickup-point-input-hidden
3) In your JS context, you must create a new entrypoint in webpack.
4) In templates/bundles/SyliusShopBundle/Checkout/selectShipping.html.twig
,
call javascripts and stylesheets events, and pickup-point
script after other scripts.
5) Create the file assets/shop/js/app/pickup-point.js
6) Map will teleport in current choice of provider. To do it,
in templates/bundles/SyliusShopBundle/Checkout/SelectShipping/_choice.html.twig
put class react-parent-teleport-pickup-point
in choice container, and class react-teleport-pickup-point
in a
child <div>
of this container.
7) Create file config/routes/js_translation.yaml
2/ Options
Data attribute | Value | Explication | Default Value |
---|---|---|---|
data-pkp-height |
px | Set height of map | 400px |
data-pkp-height-mobile |
px | Set height of map on mobile | 250px |
data-pkp-marker-icon |
string | Set marker icon with path | /bundles/asdoriasyliuspickuppointplugin/images/marker-icon.png |
data-pkp-zoom |
int | Set zoom of map | 13 |
data-pkp-filter-shop |
0 or 1 | Enable shops filter | 0 |
data-pkp-zoom-control |
0 or 1 | Display zoom controls | 1 |
data-pkp-scroll-wheel-zoom |
0 or 1 | Enable zoom on scroll | 0 |
data-pkp-zoom-control-position |
bottomleft, topright, etc... | Position of zoom controls | bottomright |
All versions of sylius-pickup-point-plugin with dependencies
ext-soap Version *
ext-simplexml Version *
setono/sylius-pickup-point-plugin Version ^1.3
friendsofsymfony/jsrouting-bundle Version ^3.3
willdurand/js-translation-bundle Version ^5.1