Download the PHP package fmdd/sylius-extended-channels-plugin without Composer
On this page you can find all versions of the php package fmdd/sylius-extended-channels-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fmdd/sylius-extended-channels-plugin
More information about fmdd/sylius-extended-channels-plugin
Files in fmdd/sylius-extended-channels-plugin
Package sylius-extended-channels-plugin
Short Description Extended channels plugin for Sylius
License MIT
Informations about the package sylius-extended-channels-plugin
WIP
Features
- Duplicate product and product variant
- Bulk action to set categories for products
- Mark Taxon as external link so taxonomy can be used for creating custom menus with links anywhere
- Download current exchange rates
- Update product prices using downloaded or custom exchange rates
- Set channel timezone
- Set channel phone
- Send copy of order mail to custom email address per channel
- When SMTP is unavailable, it prevents error 500 on order submit but logs the error and submits the order
- Cancel unpaid orders for certain payment method
- Allows to change the code for the product and product variant
- Administration for Hello Bars (you can use your own types)
Installation
- Run
$ composer require mangoweb-sylius/sylius-extended-channels
. -
Add plugin classes to your
config/bundles.php
: - Your Entity
Channel
has to implement\MangoSylius\ExtendedChannelsPlugin\Model\ExtendedChannelInterface
. You can use TraitMangoSylius\ExtendedChannelsPlugin\Model\ExtendedChannelTrait
. - Your Entity
Taxon
has to implement\MangoSylius\ExtendedChannelsPlugin\Model\ExternalLinkTaxonInterface
. You can use TraitMangoSylius\ExtendedChannelsPlugin\Model\ExternalLinkTaxonTrait
. - Include template
{{ include('@MangoSyliusExtendedChannelsPlugin/Channel/extendedChannelForm.html.twig') }}
in@SyliusAdmin/Channel/_form.html.twig
. - Add
{{ form_row(form.externalLink) }}
to template in@SyliusAdmin/Taxon/_form.html.twig
. - Replace inner content of
<div class="sylius-grid-nav__bulk"> ... </div>
with{{ include('@MangoSyliusExtendedChannelsPlugin/Grid/bulkActions.html.twig') }}
in@SyliusAdmin/Grid/_default.html.twig
. -
Add resource to
config/packeges/_sylius.yaml
- Add routing to
config/_routes.yaml
For guide to use your own entity see Sylius docs - Customizing Models
Optional
Run src/Migrations/basic-data/timezones-data.sql
for load the timezones table. (Recommended, otherwise the timezone select will be empty)
Usage
Commands
-
Updates exchange rates (you need to define currencies first in Sylius admin)
-
Update Product prices by exchange rates, from
sourceChannel
(primary value, won't be changed) totargetChannel
. You can run this after the previous command to update by downloaded rates or you can run it without the previous one to update the prices with your custom exchange rates set in Sylius admin. -
Remove orders that are not paid for a configured period and for certain shipping methods. This allows to keep unpaid orders which are e.g. to be paid at personal pickup, therefore needs to stay unpaid for a couple of hours / days. Configuration parameters:
sylius_order.order_expiration_period
sylius_order.expiration_method_codes
-
You can use events to modify an object when you duplicate it
mango-sylius-extended-channels.duplicate.product.before-persist
mango-sylius-extended-channels.duplicate.product.after-persist
mango-sylius-extended-channels.duplicate.product-variant.before-persist
mango-sylius-extended-channels.duplicate.product-variant.after-persist
-
You can use event after bulk category assignment
mango-sylius-extended-channels.products.after_bulk_categories
-
You can change the types of Hello bars
- Use the Twig function for listing Hello Bars
mangoweb_sylius_available_hello_bars()
mangoweb_sylius_available_hello_bars_by_type(type)
Development
Usage
- Create symlink from .env.dist to .env or create your own .env file
- Develop your plugin in
/src
- See
bin/
for useful commands
Testing
After your changes you must ensure that the tests are still passing.
License
This library is under the MIT license.
Credits
Developed by manGoweb.