From 78f813b11cfd3b47bf4ded82a5f8adfe90d43aa0 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 8 Sep 2009 18:59:15 +1200 Subject: [PATCH] Fixing merge error in opac-detail.pl --- opac/opac-detail.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 9c01eaf000..7ce4cf7f83 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -284,7 +284,11 @@ if ( C4::Context->preference("OPACAmazonEnabled") && C4::Context->preference("OP my $similar_products_exist; my $amazon_reviews = C4::Context->preference("AmazonReviews"); my $amazon_similars = C4::Context->preference("AmazonSimilarItems"); + my @services; + my $amazon_details = &get_amazon_details( $dat->{isbn}, $record, $marcflavour, \@services ); + if ( $amazon_reviews ) { + my $item = $amazon_details->{Items}->{Item}->[0]; my $customer_reviews = \@{ $item->{CustomerReviews}->{Review} }; for my $one_review ( @$customer_reviews ) { @@ -308,14 +312,10 @@ if ( C4::Context->preference("OPACAmazonEnabled") && C4::Context->preference("OP push @similar_products, +{ similar_biblionumbers => $similar_biblionumbers, title => $similar_product->{Title}, ASIN => $similar_product->{ASIN} }; } } - } - my $editorial_reviews = \@{$amazon_details->{Items}->{Item}->{EditorialReviews}->{EditorialReview}}; - my $average_rating = $amazon_details->{Items}->{Item}->{CustomerReviews}->{AverageRating} || 0; - $template->param( OPACAmazonSimilarItems => $similar_products_exist ); - $template->param( amazon_average_rating => $average_rating * 20); - $template->param( AMAZON_CUSTOMER_REVIEWS => $customer_reviews ); - $template->param( AMAZON_SIMILAR_PRODUCTS => \@similar_products ); - $template->param( AMAZON_EDITORIAL_REVIEWS => $editorial_reviews ); + $template->param( OPACAmazonSimilarItems => $similar_products_exist ); + $template->param( AMAZON_SIMILAR_PRODUCTS => \@similar_products ); + } + } # Babelthèque -- 2.39.5