koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/opac opac-detail.pl,1.14,1.15


From: Joshua Ferraro
Subject: [Koha-cvs] CVS: koha/opac opac-detail.pl,1.14,1.15
Date: Tue, 25 Jan 2005 08:58:20 -0800

Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3544

Modified Files:
        opac-detail.pl 
Log Message:
Adds amazon support to opac-detail.pl


Index: opac-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** opac-detail.pl      18 Aug 2004 16:44:37 -0000      1.14
--- opac-detail.pl      25 Jan 2005 16:58:18 -0000      1.15
***************
*** 10,14 ****
  use C4::Biblio;
  use C4::SearchMarc;
! 
  my $query=new CGI;
  my ($template, $borrowernumber, $cookie) 
--- 10,14 ----
  use C4::Biblio;
  use C4::SearchMarc;
! use C4::Amazon;
  my $query=new CGI;
  my ($template, $borrowernumber, $cookie) 
***************
*** 73,76 ****
                                subscriptionid => $subscriptionid,
  );
! 
  output_html_with_http_headers $query, $cookie, $template->output;
--- 73,103 ----
                                subscriptionid => $subscriptionid,
  );
!   ## get Amazon.com stuff
! my $isbn=$dat->{'isbn'};
! my $amazon_details = &get_amazon_details($isbn);
! foreach my $result (@{$amazon_details->{Details}}){
!         $template->param(item_description => $result->{ProductDescription});
!         $template->param(image => $result->{ImageUrlMedium});
!         $template->param(list_price => $result->{ListPrice});
!         $template->param(amazon_url => $result->{url});
!                                 }
! 
! my @products;
! my @reviews;
! for my $details( @{ $amazon_details->{ Details } } ) {
!         next unless $details->{ SimilarProducts };
!         for my $product ( @{ $details->{ SimilarProducts }->{ Product } } ) {
!                 push @products, +{ Product => $product };
!         }
!         next unless $details->{ Reviews };
!         for my $product ( @{ $details->{ Reviews }->{ AvgCustomerRating } } ) 
{
!                 $template->param(rating => $product);
!         }
!         for my $reviews ( @{ $details->{ Reviews }->{ CustomerReview } } ) {
!                 push @reviews, +{ Summary => $reviews->{ Summary }, Comment 
=> $reviews->{ Comment }, };
!         }
! }
! $template->param( SIMILAR_PRODUCTS => address@hidden );
! $template->param( REVIEWS => address@hidden );
!   ## End of Amazon Stuff
  output_html_with_http_headers $query, $cookie, $template->output;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]