Bug Fixing : Browse shelves not displaying results
[koha.git] / opac / opac-ISBDdetail.pl
index 81e122c..e2187fe 100755 (executable)
@@ -42,6 +42,8 @@ the items attached to the biblio
 =cut
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Context;
 use C4::Output;
@@ -49,6 +51,7 @@ use CGI;
 use MARC::Record;
 use C4::Biblio;
 use C4::Acquisition;
+use C4::External::Amazon;
 use C4::Review;
 use C4::Serials;    # uses getsubscriptionfrom biblionumber
 use C4::Koha;       # use getitemtypeinfo
@@ -114,11 +117,23 @@ $template->param(
     biblionumber => $biblionumber,
     reviews             => $reviews,
 );
+    my @services;
+       my $amazon_reviews  = C4::Context->preference("AmazonReviews");
+       my $amazon_similars = C4::Context->preference("AmazonSimilarItems");
+               
+    if ( $amazon_reviews ) {
+        $template->param( AmazonReviews => 1 );
+        push( @services, 'EditorialReview' );
+    }
+    if ( $amazon_similars ) {
+        $template->param( AmazonSimilarItems => 1 );
+        push( @services, 'Similarities' );
+    }
 
 ## Amazon.com stuff
 #not used unless preference set
 if ( C4::Context->preference("AmazonContent") == 1 ) {
-    use C4::Amazon;
+    use C4::External::Amazon;
     $dat->{'amazonisbn'} = $dat->{'isbn'};
     $dat->{'amazonisbn'} =~ s|-||g;