Skip to content
Snippets Groups Projects
Commit bd6b80c7 authored by Demian Katz's avatar Demian Katz
Browse files

Make sure users see feedback when submitting empty bulk options w/ cart disabled.

- Resolves VUFIND-1150.
- There's probably a better way to do this, but this is a bare minimum fix.
parent 2b5e672e
Branches
Tags
No related merge requests found
...@@ -77,6 +77,13 @@ class CartController extends AbstractBase ...@@ -77,6 +77,13 @@ class CartController extends AbstractBase
// when we're done: // when we're done:
$this->session->url = $this->getLightboxAwareUrl('cart-home'); $this->session->url = $this->getLightboxAwareUrl('cart-home');
// If the cart is disabled, going to cart home is not going to help us;
// use the referer instead.
if (!$this->getCart()->isActive()) {
$this->session->url
= $this->getRequest()->getServer()->get('HTTP_REFERER');
}
// Now forward to the requested action: // Now forward to the requested action:
if (strlen($this->params()->fromPost('email', '')) > 0) { if (strlen($this->params()->fromPost('email', '')) > 0) {
$action = 'Email'; $action = 'Email';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment