Download the PHP package setono/sylius-pickup-point-plugin without Composer
On this page you can find all versions of the php package setono/sylius-pickup-point-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/sylius-pickup-point-plugin
More information about setono/sylius-pickup-point-plugin
Files in setono/sylius-pickup-point-plugin
Package sylius-pickup-point-plugin
Short Description Pickup point plugin for Sylius
License MIT
Informations about the package sylius-pickup-point-plugin
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 environmentbudbee
provider requiresetono/budbee-bundle
to be installedcoolrunner
provider requiresetono/coolrunner-bundle
to be installedgls
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 with dependencies
ext-mbstring Version *
behat/transliterator Version ^1.5
doctrine/event-manager Version ^1.2
doctrine/orm Version ^2.7
friendsofsymfony/rest-bundle Version ^2.8 || ^3.0
psr/cache Version ^1.0 || ^2.0 || ^3.0
psr/http-client Version ^1.0
sylius/core Version ^1.0
sylius/core-bundle Version ^1.0
sylius/order Version ^1.0
sylius/registry Version ^1.0
sylius/resource-bundle Version ^1.8
sylius/shipping Version ^1.0
sylius/shipping-bundle Version ^1.0
symfony/cache Version ^5.4 || ^6.0
symfony/config Version ^5.4 || ^6.0
symfony/console Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/form Version ^5.4 || ^6.0
symfony/http-foundation Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/intl Version ^5.4 || ^6.0
symfony/messenger Version ^5.4 || ^6.0
symfony/options-resolver Version ^5.4 || ^6.0
symfony/routing Version ^5.4 || ^6.0
symfony/security-bundle Version ^5.4 || ^6.0
symfony/validator Version ^5.4 || ^6.0
webmozart/assert Version ^1.11