Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to specific URL after add to cart. #788

Merged
merged 1 commit into from
Jan 7, 2014

Conversation

kayue
Copy link
Contributor

@kayue kayue commented Jan 7, 2014

As a developer, I would like have the option to redirect customer to any page I want after add item to cart.

Usage:

{# Product/show.html.twig #}

<form action="{{ path('sylius_cart_item_add', {
    'id': product.id, 
    '_redirect_to': url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) 
}) }}" method="post">

   {# ... rest of the add to cart form #}

</form>

pjedrzejewski pushed a commit that referenced this pull request Jan 7, 2014
Redirect to specific URL after add to cart.
@pjedrzejewski pjedrzejewski merged commit aafe1aa into Sylius:master Jan 7, 2014
@pjedrzejewski
Copy link
Member

That's useful. 👍 Thank you Ka Yue! (I hope I got you name correctly)

@kayue kayue deleted the patch-1 branch January 7, 2014 08:30
@kayue
Copy link
Contributor Author

kayue commented Jan 7, 2014

Yup, "Ka Yue" is my first name :)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants