From 1fb1a9ff884fcbb15c09f54d488f376a217f9f30 Mon Sep 17 00:00:00 2001 From: Meenakshi.R Date: Mon, 4 Jun 2012 11:44:06 +0530 Subject: [PATCH] Bug 7570 - Add Item availability status to cart. Sending an Improved Patch for showing avalibility status for all the items in Cart. Changes: -Items.pm: In sub GetItemsLocationInfo changes the sql query to get items all info. -koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt: Added the code to display the Avalibiltiy Status. Test Cases: -Add some of the records into your cart with different cases like a Title with 4 items, 1 checked out, 1 lost,etc. -Click on Cart button and check the details page in new window, weather the status showing exact results. --- C4/Items.pm | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index a6d5a22..6b7d0d1 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1389,7 +1389,7 @@ sub GetItemsLocationInfo { my @results; my $dbh = C4::Context->dbh; - my $query = "SELECT a.branchname as homebranch, b.branchname as holdingbranch, + my $query = "SELECT items.*,a.branchname as homebranch, b.branchname as holdingbranch, location, itemcallnumber, cn_sort FROM items, branches as a, branches as b WHERE homebranch = a.branchcode AND holdingbranch = b.branchcode diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt index c4d40ed..7f630d0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt @@ -354,6 +354,7 @@ function enableCheckboxActions(){ Author Year Location + Status [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] @@ -390,7 +391,12 @@ function enableCheckboxActions(){ [% END %] [% END %][% ELSE %]This record has no items.[% END %] - + [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% END %] + [% END %] [% END %] -- 1.7.1