From 11c657ca0fec639de0be2c3f8fd38a1fefdf6077 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 19 Dec 2012 14:40:51 -0500
Subject: [PATCH] Bug fix: vufindString global should be available even if cart
 is disabled.

---
 themes/blueprint/templates/layout/layout.phtml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/themes/blueprint/templates/layout/layout.phtml b/themes/blueprint/templates/layout/layout.phtml
index 89cc1504850..35d26033449 100644
--- a/themes/blueprint/templates/layout/layout.phtml
+++ b/themes/blueprint/templates/layout/layout.phtml
@@ -23,11 +23,11 @@
 
         // Deal with cart stuff:
         $cart = $this->cart();
+        $script = 'var vufindString = {};';
         if ($cart->isActive()) {
             $this->headScript()->appendFile("jquery.cookie.js");
             $this->headScript()->appendFile("cart.js");
-            $script = 'var vufindString = {};'
-                . 'vufindString.bulk_noitems_advice = "' . $this->transEsc('bulk_noitems_advice') . '";'
+            $script .= 'vufindString.bulk_noitems_advice = "' . $this->transEsc('bulk_noitems_advice') . '";'
                 . 'vufindString.confirmEmpty = "' . $this->transEsc('bookbag_confirm_empty') . '";'
                 . 'vufindString.viewBookBag = "' . $this->transEsc('View Book Bag') . '";'
                 . 'vufindString.addBookBag = "' . $this->transEsc('Add to Book Bag') . '";'
@@ -37,8 +37,8 @@
                 . 'vufindString.bookbagMax = "' . $cart->getMaxSize() . '";'
                 . 'vufindString.bookbagFull = "' . $this->transEsc('bookbag_full_msg') . '";'
                 . 'vufindString.bookbagStatusFull = "' . $this->transEsc('bookbag_full') . '";';
-            $this->headScript()->appendScript($script);
         }
+        $this->headScript()->appendScript($script);
     ?>
     <?=$this->headScript()?>
   </head>
-- 
GitLab