fmdd/sylius-promotion-extension-plugin

FMDD Sylius promotion extension plugin

This package is auto-updated.

Last update: 2024-10-08 17:38:29 UTC


README

This plugin add :

  • Threshold promotion
  • Free product promotion

Installation

  1. require the bundle with Composer:
$ composer require fmdd/sylius-promotion-extension-plugin
  1. enable the bundle :
<?php

# config/bundles.php

return [
    // ...
    FMDD\SyliusPromotionExtensionPlugin\FMDDSyliusPromotionExtensionPlugin::class => ['all' => true],
    // ...
];

3.Add form theme block :

# config/routes/sylius_admin.yaml
sylius_promotion_extension:
  resource: "@FMDDSyliusPromotionExtensionPlugin/Resources/config/admin_routing.yml"

4.Add form theme block :

...

{% block sylius_product_variant_autocomplete_choice_row %}
    {{ form_row(form, {'remote_url': path('fmdd_admin_ajax_product_variant_by_name_phrase'), 'load_edit_url': path('fmdd_admin_ajax_product_variant_by_code')}) }}
{% endblock %}

Now in you admin panel you have 2 new promotions actions :

  • Threshold promotion
  • Free product promotion