Download the PHP package setono-custom/sylius-pickup-point-plugin-local without Composer
On this page you can find all versions of the php package setono-custom/sylius-pickup-point-plugin-local. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono-custom/sylius-pickup-point-plugin-local
More information about setono-custom/sylius-pickup-point-plugin-local
Files in setono-custom/sylius-pickup-point-plugin-local
Package sylius-pickup-point-plugin-local
Short Description Pickup point plugin for Sylius
License MIT
Informations about the package sylius-pickup-point-plugin-local
Sylius Pickup Point Plugin
Add a <select>
that contains pickup points to your select shipping checkout step.
- Screenshots
- Installation
Supported providers
- DAO
- GLS
- PostNord
- Fake provider (for development/playing purposes)
Screenshots
Shop
This is the shipping method step in the checkout process where you can choose a pickup point.
On the complete order step in checkout you can see the pickup point you have chosen.
Admin
On the order you can see what pickup point the customer has chosen.
When you edit shipping method you can associate a pickup point provider to that shipping method.
Installation
Step 1: Install and enable plugin
Open a command console, enter your project directory and execute the following command to download the latest stable version of this plugin:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Add bundle to your config/bundles.php
:
Step 2: Import routing and configs
Import routing
`
Import application config
`
(Optional) Import fixtures to play in your app
`
Step 3: Update templates
Add the following to the admin template SyliusAdminBundle/ShippingMethod/_form.html.twig
See an example here.
Next add the following to the shop template SyliusShopBundle/Checkout/SelectShipping/_shipment.html.twig
See an example here.
Next add the following to the shop template SyliusShopBundle/Common/Order/_shipments.html.twig
after shipment method header:
See an example here.
Next add the following to the admin template SyliusAdminBundle/Order/Show/_shipment.html.twig
after shipment header:
See an example here.
Step 4: Customize resources
Shipment resource
If you haven't extended the shipment resource yet, here is what it should look like:
Shipping method resource
If you haven't extended the shipping method resource yet, here is what it should look like:
You can read about extending resources here.
Update shipping resources config
Next you need to tell Sylius that you will use your own extended resources:
Step 5: Configure plugin
Enable desired providers
Note that:
faker
provider will not work on prod environmentgls
provider requiresetono/gls-webservice-bundle
to be installeddao
provider requiresetono/dao-bundle
to be installedpost_nord
provider requiresetono/post-nord-bundle
to be installed
If you want to use cache
Cache disabled by default. To enable it, make next configuration:
Step 6: Update database schema
Step 7: Update validation groups
Add checkout_select_shipping
to sylius.form.type.checkout_select_shipping.validation_groups
:
Step 8: Install assets
Play
To see pickup points list, use next example address at checkout:
Note, that providers have their pickup points only at given countries:
- DAO: DK
- PostNord: DK, SE, FI
- GLS: See https://gls-group.eu/EU/en/depot-parcelshop-search
So, to play with all 3 providers at once - use DK
address.
Troubleshooting
-
At
/en_US/checkout/select-shipping
step you seeNo results found
atPickup point id
field.-
Check your browser's developer console and make sure JS scripts loaded correctly. Also make sure
setono-pickup-point.js
compiled (read as you not forgot to runsylius:install:assets
). - Make sure content of plugin's
src/Resources/views/_javascripts.html.twig
actually rendered. If not - probably, you erased{{ sonata_block_render_event('sylius.shop.layout.javascripts') }}
from your customlayout.html.twig
.
Also, make sure
{{ sonata_block_render_event('sylius.admin.layout.javascripts') }}
in place at your admin'slayout.html.twig
if it was customized.- If you're using themes, make sure you executed
sylius:theme:assets:install
after plugin installation.
-
-
The service "setono_sylius_pickup_point.registry.provider" has a dependency on a non-existent service "setono_post_nord.http_client".
You should specify
setono_post_nord.http_client
configuration or defineBuzz\Client\BuzzClientInterface
service to use as default http client. See https://github.com/Setono/PostNordBundle/issues/1You should add config/packages/buzz.yaml and config/packages/nyholm_psr7.yaml configs.
-
You're facing
Pickup point cannot be blank.
validation error at/checkout/address
step at your applicationMake sure you're followed instructions from
Installation step 7
.
All versions of sylius-pickup-point-plugin-local with dependencies
sylius/sylius Version ^1.3
symfony/config Version ^4.4 || ^5.0
symfony/intl Version ^4.4 || ^5.0
symfony/messenger Version ^4.4 || ^5.0
thecodingmachine/safe Version ^1.0