From 528b310908848e3913cec4d4127d652e5fd6b180 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 8 Aug 2018 17:15:02 +1200 Subject: [PATCH] Bug 21174 - Implemented syspref to enable the loading of cart popup on one click Test plan: 1. In Koha OPAC click on the cart icon (making sure to have items in the cart and the dropdown box 'Items in your cart:..' appears. 2. Click this dropdown and the cart popup appears. 3. Confirm you can successfully remove items from and empty the cart 4. Apply patch 5. Restart memcached, plack and in koha-shell run ./updatedatabase.pl 6. By default the new syspref in this patch is turned off. Therefore repeat steps: 1,2,3 and confirm they work the same as before you applied the commit 7. In Koha staff client go to Administration->Global system preferences and enable the 'EnableOneClickToOpenCartPopup' preference 8. Back in the OPAC click on the cart icon (making sure to have items in the cart) and notice no 'Items in your: ..' dropdown appears instead the cart popup loads straight away. 9. Confirm the items in your cart is displayed by the cart popup 10. Confirm you can remove items from/empty the cart Sponsored-By: Toi Ohomai Insitute of Technology, New Zealand --- .../prog/en/modules/admin/preferences/opac.pref | 6 ++++ .../opac-tmpl/bootstrap/en/includes/masthead.inc | 32 +++++++++++++++------- .../bootstrap/en/includes/opac-bottom.inc | 1 - .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 5 +++- koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 22 +++++++++++---- 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index f46dda3..74f83b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -416,6 +416,12 @@ OPAC: no: "Don't allow" - patrons to store items in a temporary "Cart" on the OPAC. - + - pref: EnableOneClickToOpenCartPopup + choices: + yes: Enable + no: "Don't enable" + - Enable to load the cart popup immediately upon clicking on the OPAC cart icon. + - - pref: OpacTopissue choices: yes: Allow diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 0984563..4d66e22 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -1,6 +1,7 @@ [% USE Koha %] [% USE Branches %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] +[% SET CartOneClick = Koha.Preference('EnableOneClickToOpenCartPopup') %]