2017 © Pedro Peláez
 

sylius-plugin customer-reorder-plugin

Sylius plugin that enables order reordering for a customer

image

sylius/customer-reorder-plugin

Sylius plugin that enables order reordering for a customer

  • Thursday, July 26, 2018
  • by pamil
  • Repository
  • 6 Watchers
  • 10 Stars
  • 260 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

:warning: BEWARE! This repository has been deprecated and will not be maintained or evolved by the Sylius Team. You can still use it with compatible Sylius versions, but at your own risk, as no bugs will be fixed on it., (*1)

, (*2)

Customer Reorder Plugin

, (*3)

This plugin allows customers to reorder a previously placed order., (*4)

Screenshot showing the customer's orders page with reorder buttons, (*5)

Business value

The plugin allows Customer to reorder any Order that has already been placed. Once a Reorder button is clicked, a new cart filled with items taken from a previously placed order is created. If for some reason Reorder can't be fulfilled completely, the Customer is informed about every circumstance that have affected the Order (i. e. promotion being no longer available or differences in item's prices)., (*6)

Once the Reorder process is completed, the newly created Order is listed in the history just like any other Orders., (*7)

Installation

Beware!

This installation instruction assumes that you're using Symfony Flex. If you don't, take a look at the legacy installation instruction. However, we strongly encourage you to use Symfony Flex, it's much quicker! :), (*8)

To install plugin, just require it with composer:, (*9)

composer require sylius/customer-reorder-plugin

Remember to allow community recipes with composer config extra.symfony.allow-contrib true or during plugin installation process, (*10)

Extension points

Customer Reorder plugin is based on two processes:, (*11)

  • reorder processing
  • reorder eligibility checking

They are both based on Symfony's compiler passes and configured in services.xml file., (*12)

ReorderProcessing and EligibilityChecking are independent processes - once a Reorder is created using Processors (services tagged as sylius_customer_reorder_plugin.reorder_processor), the created entity is passed to Eligibility Checkers (services tagged as sylius_customer_reorder_plugin.eligibility_checker)., (*13)

Hence, both processes can be extended separately by adding services that implement ReorderEligibilityChecker and are tagged as sylius_customer_reorder_plugin.eligibility_checker or implement ReorderProcessor and are tagged as sylius_customer_reorder_plugin.reorder_processor., (*14)

Both Reorder button layout and action performed on clicking it are defined in reorder.html.twig template which is declared in config.yml file., (*15)

What's more, since Order is a Resource, major part of its configuration is placed in *.yml files. Without using the plugin, Order had Show and Pay actions. Adding Reorder action required extending order-related behaviours in config.yml file., (*16)

You can read much more about Resources here: http://docs.sylius.com/en/1.2/components_and_bundles/bundles/SyliusResourceBundle/index.html, (*17)

Security issues

If you think that you have found a security issue, please do not use the issue tracker and do not post it publicly. Instead, all security issues must be sent to security@sylius.com., (*18)

The Versions