mangoweb-sylius/sylius-smsmanager-plugin

SMS manager plugin for Sylius

This package is auto-updated.

Last update: 2021-07-13 15:16:39 UTC


README

38423357?s=200&v=4

SMS Manager Plugin
68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d616e676f7765622d73796c6975732f73796c6975732d736d736d616e616765722d706c7567696e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e676f7765622d73796c6975732f73796c6975732d736d736d616e616765722d706c7567696e2e737667 68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d616e676f7765622d73796c6975732f53796c697573534d534d616e61676572506c7567696e2f6d61737465722e737667

Features

  • Use https://smsmanager.cz account to send SMS to customers
  • Inform your customers with a text message that the package has been sent
  • Custom text for every shipping method and language
  • Use variables to personalise the text

admin.png

Installation

  1. Run $ composer require mangoweb-sylius/sylius-smsmanager-plugin.
  2. Register \MangoSylius\SmsManagerPlugin\MangoSyliusSmsManagerPlugin in your Kernel.
  3. Import @MangoSyliusSmsManagerPlugin/Resources/config/resources.yml in the config.yml.
  4. Your Entity Channel has to implement \MangoSylius\SmsManagerPlugin\Model\SmsManagerChannelInterface. You can use Trait MangoSylius\SmsManagerPlugin\Model\SmsManagerChannelTrait.
  5. Your Entity ShippingMethodTranslation has to implement \MangoSylius\SmsManagerPlugin\Model\SmsManagerShippingMethodInterface. You can use Trait MangoSylius\SmsManagerPlugin\Model\SmsManagerShippingMethodTrait.
  6. Include template @MangoSyliusSmsManagerPlugin/channelSmsSegmentForm.html.twig in @SyliusAdmin/Channel/_form.html.twig.
  7. Include template @MangoSyliusSmsManagerPlugin/shippingMethodSmsForm.html.twig in @SyliusAdmin/ShippingMethod/_form.html.twig. For guide to use your own entity see Sylius docs - Customizing Models

Usage

First enter SMS Manager credentials and other parameters in channel settings, then enter SMS text for each shipping method. If the text is blank, no SMS will be sent.

You can use the following variables in the text:

{{ orderNumber }}
{{ trackingNumber }}
{{ address.fullName }}
{{ address.company }}
{{ address.street }}
{{ address.postCode }}
{{ address.city }}
{{ address.provinceCode }}
{{ address.provinceName }}
{{ address.countryCode }}

smstext.png

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.

  • Easy Coding Standard
    bin/ecs.sh
  • PHPStan
    bin/phpstan.sh

License

This library is under the MIT license.

Credits

Developed by manGoweb.