From 5882de87989a09c5352ebc030cff4ea0645b8ef0 Mon Sep 17 00:00:00 2001 From: Meenakshi.R Date: Tue, 5 Jun 2012 12:47:19 +0530 Subject: [PATCH] Bug 7570 - Add Item availability status to cart. Added Item availability status to cart(Location table cell). Changes: -C4/Items.pm: Sql query to get items full information. -koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt: Added code for showing availibility staus in opac-basket page and in "More details" link. Test Cases: -Add records to your cart with different cases like 1 record with different Item status(Lost,Avaliable,Withdrawn,etc). -Click on your cart and see the results in a new window. -Click on "More details" link and check the results. --- C4/Items.pm | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt | 6 ++++-- 2 files changed, 5 insertions(+), 3 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..71874cb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt @@ -308,13 +308,14 @@ function enableCheckboxActions(){ [% END %] - Location(s) + Location(s)(Status) [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% ELSE %]This record has no items.[% END %] @@ -353,7 +354,7 @@ function enableCheckboxActions(){ Title Author Year - Location + Location(Status) [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %] @@ -388,6 +389,7 @@ function enableCheckboxActions(){ [% IF ( ITEM_RESULT.itemcallnumber ) %] ([% ITEM_RESULT.itemcallnumber %]) [% END %] + ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %]) [% END %][% ELSE %]This record has no items.[% END %] -- 1.7.1