Skip to content
Inform your customers via text message
Branch: master
Clone or download
Johan Hornof
Johan Hornof small readme update
Latest commit 31ec96e Jan 18, 2019

README.md

BulkSMS Plugin

Features

  • Use https://www.bulksms.com 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

Installation

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

Usage

First enter BulkSMS 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 }}

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.

You can’t perform that action at this time.