I have a page on my site called shop where I display all products within my shop. If I'm on page 2 let's say (therefore at /shop?page=1) and I click on the "Add to cart" button on one of my products, I get redirected to /shop.
I should be redirected to /shop?page=1
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | cart-redirect-1165808-8.patch | 1.1 KB | helior |
| #5 | fix_add_to_cart_page_redirect-1165808-5.patch | 767 bytes | Anonymous (not verified) |
| #4 | 1165808-4.patch | 619 bytes | amateescu |
| #1 | add_to_cart_redirect-1165808-1.patch | 618 bytes | guillaumev |
Comments
Comment #1
guillaumev commentedHere is a patch which fixes the issue...
Comment #3
rszrama commentedIf we can get this patch committed, we won't have to fix this in Commerce: #171267: form redirects removes get variables like sort and order
Comment #4
amateescu commentedWaiting for core won't get us very far :)
Comment #5
Anonymous (not verified) commentedThe patch from #4 didn't work for me as my site's in a subdirectory. This patch works though.
Comment #6
fp commented#5 works well for me. Thanks for the patch.
Comment #7
rszrama commentedI'm not sure I understand the approach this patch is taking. Is there no simpler way to do this? For example, can we not just set the redirect to the request_path()?
Comment #8
helior commentedComment #9
rszrama commentedTested with the following View and committed.