From 4bf5c1b132d244b643f4b52759fe0f4a0d9b6c6f Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 26 Nov 2007 21:26:51 -0600 Subject: [PATCH] adding template code for AmazonSimilarItems et al Test this by having the following ISBNs in your system: 0152018484 0152053530 Signed-off-by: Joshua Ferraro --- catalogue/detail.pl | 11 +++++----- .../prog/en/modules/catalogue/detail.tmpl | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 82ee42905e..2a25379819 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -134,14 +134,13 @@ if ( C4::Context->preference("AmazonContent") == 1 ) { if (C4::Context->preference("AmazonSimilarItems") ) { my $xbiblios; my @xisbns; - if (C4::Context->preference("XISBNAmazonSimilarItems") ) { - my $xbiblio = get_biblio_from_xisbn($product); - push @xisbns, $xbiblio; - $xbiblios = \@xisbns; + $xbiblios = get_xisbns($product); } else { - $xbiblios = get_xisbns($product); + my $xbiblio = get_biblio_from_xisbn($product); + push @xisbns, $xbiblio ; + $xbiblios = \@xisbns; } push @products, +{ product => $xbiblios }; } @@ -157,7 +156,7 @@ if ( C4::Context->preference("AmazonContent") == 1 ) { comment => $reviews->{Comment}, }; } - } + } use Data::Dumper; warn Dumper(@products); $template->param( SIMILAR_PRODUCTS => \@products ); $template->param( AMAZONREVIEWS => \@reviews ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index 511423c9e7..613c1937fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -202,6 +202,28 @@ +

Related Items

+
-- 2.39.5