Sylius/Sylius — pull request #1200 by ruudkobes (2014-03-13 20:39:31+00:00)
Title: Improve redirection after adding/removing cart item

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -

CartItemController::removeItem has a hard-coded redirect to the cart summary page. In a lot of cases, the redirect needs to be overridden, to allow a user to return to the referring page for example.

This PR just allows users to override the redirection methods for adding and removing an item and also allows the ```_redirect_to``` parameter to be passed in either the querystring or in the post-data.

I was thinking it might be a good idea to make the default redirect target configurable (globally), to make it easy to choose between the two most-used options:
* Redirect to referring page
* Redirect to cart (current default action)

What are your opinions on this?