[Koha-patches] [PATCH] Syndetics and Amazon bugfix enhancements

Daniel Sweeney daniel.sweeney at liblime.com
Fri Mar 6 17:28:19 CET 2009


From: Joshua Ferraro <jmf at liblime.com>

This patch resolves a number of problems related to Enhanced Content:

1. Previously, there was no syspref for controlling whether or not to display
Amazon.com cover images apart from other content. This had the side effect
of preventing use of amazon.com content alongside use of another provider's
images. This patch introduces AmazonCoverImages and OPACAmazonCoverImages,
and changes the name of AmazonContent to AmazonEnabled.

So, for instance, you can now enable OPACAmazonSimilarItems yet utilize
SyndeticsCoverImages for displaying those similar items.

NOTE TO DOCUMENTATION TEAM: please update references to AmazonContent
and OPACAmazonContent to comply with the above.

2. Fixes some semantically incorrect uses of AmazonContent (now OPACAmazonEnabled)
on the OPAC side.

3. Resolves once and for all, the normalization of ISBN,UPC,EAN and OCLC numbers
for all enhanced content elements; These elements can be normalized using the
new functions in C4::Koha; I've replaced use of the various previously used
variables $xisbn,$norm_isbn,$clean_isbn, etc with $isbn, and the template
variable normalized_isbn.

We finally have a single, consistant place to retrieve normalize values for
these fields given a particular record.

4. Adds Syndetics attribution statements to display of all Syndetics content
'enhanced content provide by Syndetics' or 'Enhanced Description from Syndetics'

5. Adds an option to view the large cover image on the detail page on the OPAC
when using SyndeticsCoverImages; this option is controlled by a new system
preference: SyndeticsCoverImageSize which has two values: MC (medium) LC (large)

6. Adds UPC and OCLC numbers for Syndetics enhanced content queries especially
helpful for finding enhanced content for DVD and Music materials

7. Adds capability to display Syndetics images to opac-user for checkouts and overdues

8. Updates to systempreferences.sql, and updatedatabase.pl database revision 014

Signed-off-by: Daniel Sweeney <daniel.sweeney at liblime.com>
---
 C4/Auth.pm                                         |  485 ++++++++++----------
 C4/External/Amazon.pm                              |   68 +---
 C4/External/Syndetics.pm                           |   45 +--
 C4/Koha.pm                                         |  129 ++++++
 C4/Search.pm                                       |   10 +-
 C4/XISBN.pm                                        |   19 +-
 admin/systempreferences.pl                         |    7 +-
 catalogue/detail.pl                                |   27 +-
 installer/data/mysql/en/mandatory/sysprefs.sql     |   18 +-
 .../1-Obligatoire/unimarc_standard_systemprefs.sql |   18 +-
 installer/data/mysql/updatedatabase.pl             |   14 +-
 .../prog/en/modules/catalogue/detail.tmpl          |   18 +-
 .../prog/en/modules/catalogue/results.tmpl         |   11 +-
 .../opac-tmpl/prog/en/includes/doc-head-close.inc  |    4 +-
 .../opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl |    8 +-
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl     |   94 ++--
 .../prog/en/modules/opac-readingrecord.tmpl        |    8 +-
 .../prog/en/modules/opac-results-grouped.tmpl      |    2 +-
 .../opac-tmpl/prog/en/modules/opac-results.tmpl    |   10 +-
 koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl |   20 +-
 opac/opac-ISBDdetail.pl                            |   27 +-
 opac/opac-detail.pl                                |   85 ++--
 opac/opac-readingrecord.pl                         |   31 +-
 opac/opac-search.pl                                |   11 -
 opac/opac-user.pl                                  |   71 ++--
 25 files changed, 653 insertions(+), 587 deletions(-)

diff --git a/C4/Auth.pm b/C4/Auth.pm
index fef2242..7098ce6 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -145,19 +145,19 @@ sub get_template_and_user {
         $template->param( loggedinusername => $user );
         $template->param( sessionID        => $sessionID );
 
-		my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
-		if (defined($pubshelves)) {
-        	$template->param( 	pubshelves     	=> scalar (@$pubshelves),
-        						pubshelvesloop 	=> $pubshelves,
-							);
-			$template->param(	pubtotal		=> $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
-		}
-		if (defined($barshelves)) {
-        	$template->param(	barshelves     	=> scalar (@$barshelves),
-        						barshelvesloop 	=> $barshelves,
-							);
-			$template->param(	bartotal		=> $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar (@$barshelves));
-		}
+        my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
+        if (defined($pubshelves)) {
+            $template->param(   pubshelves      => scalar (@$pubshelves),
+                                pubshelvesloop  => $pubshelves,
+                            );
+            $template->param(   pubtotal        => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
+        }
+        if (defined($barshelves)) {
+            $template->param(   barshelves      => scalar (@$barshelves),
+                                barshelvesloop  => $barshelves,
+                            );
+            $template->param(   bartotal        => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar (@$barshelves));
+        }
 
         $borrowernumber = getborrowernumber($user);
         my ( $borr ) = GetMemberDetails( $borrowernumber );
@@ -229,7 +229,7 @@ sub get_template_and_user {
             }
         }
     }
-	else {	# if this is an anonymous session, setup to display public lists...
+    else {  # if this is an anonymous session, setup to display public lists...
 
         # load the template variables for stylesheets and JavaScript
         $template->param( css_libs => $in->{'css_libs'} );
@@ -243,16 +243,16 @@ sub get_template_and_user {
         $template->param( js_widgets => $in->{'js_widgets'} );
 
         $template->param( sessionID        => $sessionID );
-		
-		my ($total, $pubshelves) = C4::Context->get_shelves_userenv();	# an anonymous user has no 'barshelves'...
-		if (defined(($pubshelves))) {
-        	$template->param(	pubshelves     	=> scalar (@$pubshelves),
-        						pubshelvesloop 	=> $pubshelves,
-							);
-			$template->param(	pubtotal		=> $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
-		}
+        
+        my ($total, $pubshelves) = C4::Context->get_shelves_userenv();  # an anonymous user has no 'barshelves'...
+        if (defined(($pubshelves))) {
+            $template->param(   pubshelves      => scalar (@$pubshelves),
+                                pubshelvesloop  => $pubshelves,
+                            );
+            $template->param(   pubtotal        => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
+        }
 
-	}
+    }
 
     # these template parameters are set the same regardless of $in->{'type'}
     $template->param(
@@ -269,22 +269,24 @@ sub get_template_and_user {
             'item-level_itypes'          => C4::Context->preference('item-level_itypes'),
             patronimages                 => C4::Context->preference("patronimages"),
             singleBranchMode             => C4::Context->preference("singleBranchMode"),
-			SyndeticsClientCode			 => C4::Context->preference("SyndeticsClientCode"),
-		    SyndeticsEnabled			 => C4::Context->preference("SyndeticsEnabled"),
-			SyndeticsCoverImages	     => C4::Context->preference("SyndeticsCoverImages"),
-			SyndeticsTOC			     => C4::Context->preference("SyndeticsTOC"),
-			SyndeticsSummary			 => C4::Context->preference("SyndeticsSummary"),
-			SyndeticsEditions		 => C4::Context->preference("SyndeticsEditions"),
-			SyndeticsExcerpt		     => C4::Context->preference("SyndeticsExcerpt"),
-			SyndeticsReviews			 => C4::Context->preference("SyndeticsReviews"),
-			SyndeticsAuthorNotes		 => C4::Context->preference("SyndeticsAuthorNotes"),
-			SyndeticsAwards				 => C4::Context->preference("SyndeticsAwards"),
-			SyndeticsSeries				 => C4::Context->preference("SyndeticsSeries"),
+            SyndeticsClientCode          => C4::Context->preference("SyndeticsClientCode"),
+            SyndeticsEnabled             => C4::Context->preference("SyndeticsEnabled"),
+            SyndeticsCoverImages         => C4::Context->preference("SyndeticsCoverImages"),
+            SyndeticsTOC                 => C4::Context->preference("SyndeticsTOC"),
+            SyndeticsSummary             => C4::Context->preference("SyndeticsSummary"),
+            SyndeticsEditions            => C4::Context->preference("SyndeticsEditions"),
+            SyndeticsExcerpt             => C4::Context->preference("SyndeticsExcerpt"),
+            SyndeticsReviews             => C4::Context->preference("SyndeticsReviews"),
+            SyndeticsAuthorNotes         => C4::Context->preference("SyndeticsAuthorNotes"),
+            SyndeticsAwards              => C4::Context->preference("SyndeticsAwards"),
+            SyndeticsSeries              => C4::Context->preference("SyndeticsSeries"),
+			SyndeticsCoverImageSize		 => C4::Context->preference("SyndeticsCoverImageSize"),
                  );
 
     if ( $in->{'type'} eq "intranet" ) {
         $template->param(
-            AmazonContent               => C4::Context->preference("AmazonContent"),
+            AmazonEnabled               => C4::Context->preference("AmazonEnabled"),
+            AmazonCoverImages           => C4::Context->preference("AmazonCoverImages"),
             AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
             AutoLocation                => C4::Context->preference("AutoLocation"),
             "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
@@ -313,12 +315,13 @@ sub get_template_and_user {
         $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
         $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
         $template->param(
-            AmazonContent             => "" . C4::Context->preference("AmazonContent"),
             AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
             AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
             LibraryName               => "" . C4::Context->preference("LibraryName"),
             LibraryNameTitle          => "" . $LibraryNameTitle,
             LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
+            OPACAmazonEnabled         => C4::Context->preference("OPACAmazonEnabled"),
+            OPACAmazonCoverImages     => C4::Context->preference("OPACAmazonCoverImages"),
             OPACAmazonSimilarItems    => "" . C4::Context->preference("OPACAmazonSimilarItems"),
             OPACFRBRizeEditions       => C4::Context->preference("OPACFRBRizeEditions"),
             OPACItemHolds             => C4::Context->preference("OPACItemHolds"),
@@ -444,11 +447,11 @@ sub _version_check ($$) {
     my $version;
     # If Version syspref is unavailable, it means Koha is beeing installed,
     # and so we must redirect to OPAC maintenance page or to the WebInstaller
-	# also, if OpacMaintenance is ON, OPAC should redirect to maintenance
-	if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') {
-		warn "OPAC Install required, redirecting to maintenance";
-		print $query->redirect("/cgi-bin/koha/maintenance.pl");
-	}
+    # also, if OpacMaintenance is ON, OPAC should redirect to maintenance
+    if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') {
+        warn "OPAC Install required, redirecting to maintenance";
+        print $query->redirect("/cgi-bin/koha/maintenance.pl");
+    }
     unless ($version = C4::Context->preference('Version')) {    # assignment, not comparison
       if ($type ne 'opac') {
         warn "Install required, redirecting to Installer";
@@ -491,7 +494,7 @@ sub _session_log {
 
 sub checkauth {
     my $query = shift;
-	$debug and warn "Checking Auth";
+    $debug and warn "Checking Auth";
     # $authnotrequired will be set for scripts which will run without authentication
     my $authnotrequired = shift;
     my $flagsrequired   = shift;
@@ -541,19 +544,19 @@ sub checkauth {
             $ip       = $session->param('ip');
             $lasttime = $session->param('lasttime');
             $userid   = $session->param('id');
-			$sessiontype = $session->param('sessiontype');
+            $sessiontype = $session->param('sessiontype');
         }
    
-   		if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) {
-			#if a user enters an id ne to the id in the current session, we need to log them in...
-			#first we need to clear the anonymous session...
-			$debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id');
+        if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) {
+            #if a user enters an id ne to the id in the current session, we need to log them in...
+            #first we need to clear the anonymous session...
+            $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id');
             $session->flush;      
             $session->delete();
             C4::Context->_unset_userenv($sessionID);
-			$sessionID = undef;
-			$userid = undef;
-		}
+            $sessionID = undef;
+            $userid = undef;
+        }
         elsif ($logout) {
             # voluntary logout the user
             $session->flush;      
@@ -563,205 +566,205 @@ sub checkauth {
             $sessionID = undef;
             $userid    = undef;
         }
-		elsif ( $lasttime < time() - $timeout ) {
-			# timed logout
-			$info{'timed_out'} = 1;
-			$session->delete();
-			C4::Context->_unset_userenv($sessionID);
-			_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime);
-			$userid    = undef;
-			$sessionID = undef;
-		}
-		elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
-			# Different ip than originally logged in from
-			$info{'oldip'}        = $ip;
-			$info{'newip'}        = $ENV{'REMOTE_ADDR'};
-			$info{'different_ip'} = 1;
-			$session->delete();
-			C4::Context->_unset_userenv($sessionID);
-			_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'});
-			$sessionID = undef;
-			$userid    = undef;
-		}
-		else {
-			$cookie = $query->cookie( CGISESSID => $session->id );
-			$session->param('lasttime',time());
-			unless ( $sessiontype eq 'anon' ) {	#if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
-				$flags = haspermission( $dbh, $userid, $flagsrequired );
-				if ($flags) {
-					$loggedin = 1;
-				} else {
-					$info{'nopermission'} = 1;
-				}
-			}
-		}
+        elsif ( $lasttime < time() - $timeout ) {
+            # timed logout
+            $info{'timed_out'} = 1;
+            $session->delete();
+            C4::Context->_unset_userenv($sessionID);
+            _session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,localtime);
+            $userid    = undef;
+            $sessionID = undef;
+        }
+        elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
+            # Different ip than originally logged in from
+            $info{'oldip'}        = $ip;
+            $info{'newip'}        = $ENV{'REMOTE_ADDR'};
+            $info{'different_ip'} = 1;
+            $session->delete();
+            C4::Context->_unset_userenv($sessionID);
+            _session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,localtime, $info{'newip'});
+            $sessionID = undef;
+            $userid    = undef;
+        }
+        else {
+            $cookie = $query->cookie( CGISESSID => $session->id );
+            $session->param('lasttime',time());
+            unless ( $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
+                $flags = haspermission( $dbh, $userid, $flagsrequired );
+                if ($flags) {
+                    $loggedin = 1;
+                } else {
+                    $info{'nopermission'} = 1;
+                }
+            }
+        }
     }
     unless ($userid || $sessionID) {
         #we initiate a session prior to checking for a username to allow for anonymous sessions...
-		my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
+        my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
         my $sessionID = $session->id;
-       	C4::Context->_new_userenv($sessionID);
+        C4::Context->_new_userenv($sessionID);
         $cookie = $query->cookie(CGISESSID => $sessionID);
-		if ( $userid    = $query->param('userid') ) {
-        	my $password = $query->param('password');
-        	my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password );
-        	if ($return) {
-            	_session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
-            	if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) {
-					$loggedin = 1;
-            	}
-           		else {
-                	$info{'nopermission'} = 1;
-                	C4::Context->_unset_userenv($sessionID);
-            	}
-
-				my ($borrowernumber, $firstname, $surname, $userflags,
-					$branchcode, $branchname, $branchprinter, $emailaddress);
-
-            	if ( $return == 1 ) {
-                	my $select = "
-                	SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode, 
-                    	    branches.branchname    as branchname, 
-                        	branches.branchprinter as branchprinter, 
-                        	email 
-                	FROM borrowers 
-                	LEFT JOIN branches on borrowers.branchcode=branches.branchcode
-                	";
-                	my $sth = $dbh->prepare("$select where userid=?");
-                	$sth->execute($userid);
-					unless ($sth->rows) {
-                		$debug and print STDERR "AUTH_1: no rows for userid='$userid'\n";
-						$sth = $dbh->prepare("$select where cardnumber=?");
-                   		$sth->execute($cardnumber);
-						unless ($sth->rows) {
-                			$debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n";
-                    		$sth->execute($userid);
-							unless ($sth->rows) {
-                				$debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n";
-							}
-						}
-					}
-                	if ($sth->rows) {
-                    	($borrowernumber, $firstname, $surname, $userflags,
-                    		$branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow;
-						$debug and print STDERR "AUTH_3 results: " .
-							"$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n";
-					} else {
-						print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n";
-					}
+        if ( $userid    = $query->param('userid') ) {
+            my $password = $query->param('password');
+            my ( $return, $cardnumber ) = checkpw( $dbh, $userid, $password );
+            if ($return) {
+                _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},localtime);
+                if ( $flags = haspermission( $dbh, $userid, $flagsrequired ) ) {
+                    $loggedin = 1;
+                }
+                else {
+                    $info{'nopermission'} = 1;
+                    C4::Context->_unset_userenv($sessionID);
+                }
+
+                my ($borrowernumber, $firstname, $surname, $userflags,
+                    $branchcode, $branchname, $branchprinter, $emailaddress);
+
+                if ( $return == 1 ) {
+                    my $select = "
+                    SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode, 
+                            branches.branchname    as branchname, 
+                            branches.branchprinter as branchprinter, 
+                            email 
+                    FROM borrowers 
+                    LEFT JOIN branches on borrowers.branchcode=branches.branchcode
+                    ";
+                    my $sth = $dbh->prepare("$select where userid=?");
+                    $sth->execute($userid);
+                    unless ($sth->rows) {
+                        $debug and print STDERR "AUTH_1: no rows for userid='$userid'\n";
+                        $sth = $dbh->prepare("$select where cardnumber=?");
+                        $sth->execute($cardnumber);
+                        unless ($sth->rows) {
+                            $debug and print STDERR "AUTH_2a: no rows for cardnumber='$cardnumber'\n";
+                            $sth->execute($userid);
+                            unless ($sth->rows) {
+                                $debug and print STDERR "AUTH_2b: no rows for userid='$userid' AS cardnumber\n";
+                            }
+                        }
+                    }
+                    if ($sth->rows) {
+                        ($borrowernumber, $firstname, $surname, $userflags,
+                            $branchcode, $branchname, $branchprinter, $emailaddress) = $sth->fetchrow;
+                        $debug and print STDERR "AUTH_3 results: " .
+                            "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n";
+                    } else {
+                        print STDERR "AUTH_3: no results for userid='$userid', cardnumber='$cardnumber'.\n";
+                    }
 
 # launch a sequence to check if we have a ip for the branch, i
 # if we have one we replace the branchcode of the userenv by the branch bound in the ip.
 
-					my $ip       = $ENV{'REMOTE_ADDR'};
-					# if they specify at login, use that
-					if ($query->param('branch')) {
-						$branchcode  = $query->param('branch');
-						$branchname = GetBranchName($branchcode);
-					}
-					my $branches = GetBranches();
-					if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){
-						# we have to check they are coming from the right ip range
-						my $domain = $branches->{$branchcode}->{'branchip'};
-						if ($ip !~ /^$domain/){
-							$loggedin=0;
-							$info{'wrongip'} = 1;
-						}
-					}
-
-					my @branchesloop;
-					foreach my $br ( keys %$branches ) {
-						#     now we work with the treatment of ip
-						my $domain = $branches->{$br}->{'branchip'};
-						if ( $domain && $ip =~ /^$domain/ ) {
-							$branchcode = $branches->{$br}->{'branchcode'};
-
-							# new op dev : add the branchprinter and branchname in the cookie
-							$branchprinter = $branches->{$br}->{'branchprinter'};
-							$branchname    = $branches->{$br}->{'branchname'};
-						}
-					}
-					$session->param('number',$borrowernumber);
-					$session->param('id',$userid);
-					$session->param('cardnumber',$cardnumber);
-					$session->param('firstname',$firstname);
-					$session->param('surname',$surname);
-					$session->param('branch',$branchcode);
-					$session->param('branchname',$branchname);
-					$session->param('flags',$userflags);
-					$session->param('emailaddress',$emailaddress);
-					$session->param('ip',$session->remote_addr());
-					$session->param('lasttime',time());
-					$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ;
-				}
-				elsif ( $return == 2 ) {
-					#We suppose the user is the superlibrarian
-					$borrowernumber = 0;
-					$session->param('number',0);
-					$session->param('id',C4::Context->config('user'));
-					$session->param('cardnumber',C4::Context->config('user'));
-					$session->param('firstname',C4::Context->config('user'));
-					$session->param('surname',C4::Context->config('user'));
-					$session->param('branch','NO_LIBRARY_SET');
-					$session->param('branchname','NO_LIBRARY_SET');
-					$session->param('flags',1);
-					$session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress'));
-					$session->param('ip',$session->remote_addr());
-					$session->param('lasttime',time());
-				}
-				C4::Context::set_userenv(
-					$session->param('number'),       $session->param('id'),
-					$session->param('cardnumber'),   $session->param('firstname'),
-					$session->param('surname'),      $session->param('branch'),
-					$session->param('branchname'),   $session->param('flags'),
-					$session->param('emailaddress'), $session->param('branchprinter')
-				);
-
-				# Grab borrower's shelves and public shelves and add them to the session
-				# $row_count determines how many records are returned from the db query
-				# and the number of lists to be displayed of each type in the 'Lists' button drop down
-				my $row_count = 10; # FIXME:This probably should be a syspref
-				my ($total, $totshelves, $barshelves, $pubshelves);
-				($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber);
-				$total->{'bartotal'} = $totshelves;
-				($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
-				$total->{'pubtotal'} = $totshelves;
-				$session->param('barshelves', $barshelves->[0]);
-				$session->param('pubshelves', $pubshelves->[0]);
-				$session->param('totshelves', $total);
-				
-				C4::Context::set_shelves_userenv('bar',$barshelves->[0]);
-				C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
-				C4::Context::set_shelves_userenv('tot',$total);
-			}
-        	else {
-            	if ($userid) {
-                	$info{'invalid_username_or_password'} = 1;
-                	C4::Context->_unset_userenv($sessionID);
-            	}
-			}
-        }	# END if ( $userid    = $query->param('userid') )
-		elsif ($type eq "opac") {	
+                    my $ip       = $ENV{'REMOTE_ADDR'};
+                    # if they specify at login, use that
+                    if ($query->param('branch')) {
+                        $branchcode  = $query->param('branch');
+                        $branchname = GetBranchName($branchcode);
+                    }
+                    my $branches = GetBranches();
+                    if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){
+                        # we have to check they are coming from the right ip range
+                        my $domain = $branches->{$branchcode}->{'branchip'};
+                        if ($ip !~ /^$domain/){
+                            $loggedin=0;
+                            $info{'wrongip'} = 1;
+                        }
+                    }
+
+                    my @branchesloop;
+                    foreach my $br ( keys %$branches ) {
+                        #     now we work with the treatment of ip
+                        my $domain = $branches->{$br}->{'branchip'};
+                        if ( $domain && $ip =~ /^$domain/ ) {
+                            $branchcode = $branches->{$br}->{'branchcode'};
+
+                            # new op dev : add the branchprinter and branchname in the cookie
+                            $branchprinter = $branches->{$br}->{'branchprinter'};
+                            $branchname    = $branches->{$br}->{'branchname'};
+                        }
+                    }
+                    $session->param('number',$borrowernumber);
+                    $session->param('id',$userid);
+                    $session->param('cardnumber',$cardnumber);
+                    $session->param('firstname',$firstname);
+                    $session->param('surname',$surname);
+                    $session->param('branch',$branchcode);
+                    $session->param('branchname',$branchname);
+                    $session->param('flags',$userflags);
+                    $session->param('emailaddress',$emailaddress);
+                    $session->param('ip',$session->remote_addr());
+                    $session->param('lasttime',time());
+                    $debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map {$session->param($_)} qw(cardnumber firstname surname branch) ;
+                }
+                elsif ( $return == 2 ) {
+                    #We suppose the user is the superlibrarian
+                    $borrowernumber = 0;
+                    $session->param('number',0);
+                    $session->param('id',C4::Context->config('user'));
+                    $session->param('cardnumber',C4::Context->config('user'));
+                    $session->param('firstname',C4::Context->config('user'));
+                    $session->param('surname',C4::Context->config('user'));
+                    $session->param('branch','NO_LIBRARY_SET');
+                    $session->param('branchname','NO_LIBRARY_SET');
+                    $session->param('flags',1);
+                    $session->param('emailaddress', C4::Context->preference('KohaAdminEmailAddress'));
+                    $session->param('ip',$session->remote_addr());
+                    $session->param('lasttime',time());
+                }
+                C4::Context::set_userenv(
+                    $session->param('number'),       $session->param('id'),
+                    $session->param('cardnumber'),   $session->param('firstname'),
+                    $session->param('surname'),      $session->param('branch'),
+                    $session->param('branchname'),   $session->param('flags'),
+                    $session->param('emailaddress'), $session->param('branchprinter')
+                );
+
+                # Grab borrower's shelves and public shelves and add them to the session
+                # $row_count determines how many records are returned from the db query
+                # and the number of lists to be displayed of each type in the 'Lists' button drop down
+                my $row_count = 10; # FIXME:This probably should be a syspref
+                my ($total, $totshelves, $barshelves, $pubshelves);
+                ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber);
+                $total->{'bartotal'} = $totshelves;
+                ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
+                $total->{'pubtotal'} = $totshelves;
+                $session->param('barshelves', $barshelves->[0]);
+                $session->param('pubshelves', $pubshelves->[0]);
+                $session->param('totshelves', $total);
+                
+                C4::Context::set_shelves_userenv('bar',$barshelves->[0]);
+                C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
+                C4::Context::set_shelves_userenv('tot',$total);
+            }
+            else {
+                if ($userid) {
+                    $info{'invalid_username_or_password'} = 1;
+                    C4::Context->_unset_userenv($sessionID);
+                }
+            }
+        }   # END if ( $userid    = $query->param('userid') )
+        elsif ($type eq "opac") {   
             # if we are here this is an anonymous session; add public lists to it and a few other items...
             # anonymous sessions are created only for the OPAC
-			$debug and warn "Initiating an anonymous session...";
-
-			# Grab the public shelves and add to the session...
-			my $row_count = 20; # FIXME:This probably should be a syspref
-			my ($total, $totshelves, $pubshelves);
-			($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
-			$total->{'pubtotal'} = $totshelves;
-			$session->param('pubshelves', $pubshelves->[0]);
-			$session->param('totshelves', $total);
-			C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
-			C4::Context::set_shelves_userenv('tot',$total);
-			
-			# setting a couple of other session vars...
-			$session->param('ip',$session->remote_addr());
-			$session->param('lasttime',time());
-			$session->param('sessiontype','anon');
-		}
-    }	# END unless ($userid)
+            $debug and warn "Initiating an anonymous session...";
+
+            # Grab the public shelves and add to the session...
+            my $row_count = 20; # FIXME:This probably should be a syspref
+            my ($total, $totshelves, $pubshelves);
+            ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef);
+            $total->{'pubtotal'} = $totshelves;
+            $session->param('pubshelves', $pubshelves->[0]);
+            $session->param('totshelves', $total);
+            C4::Context::set_shelves_userenv('pub',$pubshelves->[0]);
+            C4::Context::set_shelves_userenv('tot',$total);
+            
+            # setting a couple of other session vars...
+            $session->param('ip',$session->remote_addr());
+            $session->param('lasttime',time());
+            $session->param('sessiontype','anon');
+        }
+    }   # END unless ($userid)
     my $insecure = C4::Context->boolean_preference('insecure');
 
     # finished authentification, now respond
@@ -791,7 +794,7 @@ sub checkauth {
     my $branches = GetBranches();
     my @branch_loop;
     for my $branch_hash (sort keys %$branches) {
-		push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
+        push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
     }
 
     my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
@@ -821,14 +824,14 @@ sub checkauth {
         TagsEnabled                  => C4::Context->preference("TagsEnabled"),
         OPACUserCSS           => C4::Context->preference("OPACUserCSS"),
         intranetcolorstylesheet =>
-								C4::Context->preference("intranetcolorstylesheet"),
+                                C4::Context->preference("intranetcolorstylesheet"),
         intranetstylesheet => C4::Context->preference("intranetstylesheet"),
         IntranetNav        => C4::Context->preference("IntranetNav"),
         intranetuserjs     => C4::Context->preference("intranetuserjs"),
         TemplateEncoding   => C4::Context->preference("TemplateEncoding"),
         IndependantBranches=> C4::Context->preference("IndependantBranches"),
         AutoLocation       => C4::Context->preference("AutoLocation"),
-		wrongip            => $info{'wrongip'}
+        wrongip            => $info{'wrongip'}
     );
     
     $template->param( loginprompt => 1 ) unless $info{'nopermission'};
diff --git a/C4/External/Amazon.pm b/C4/External/Amazon.pm
index f86e197..7d0c1b5 100644
--- a/C4/External/Amazon.pm
+++ b/C4/External/Amazon.pm
@@ -21,6 +21,7 @@ use XML::Simple;
 use LWP::Simple;
 use LWP::UserAgent;
 use HTTP::Request::Common;
+use C4::Koha;
 
 use strict;
 use warnings;
@@ -60,11 +61,10 @@ Get editorial reviews, customer reviews, and similar products using Amazon Web S
 sub get_amazon_details {
     my ( $isbn, $record, $marcflavour ) = @_;
 
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
-
-    my $upc = _get_amazon_upc($record,$marcflavour);
-    my $ean = _get_amazon_ean($record,$marcflavour);
+    # Normalize the fields
+    $isbn = GetNormalizedISBN($isbn);
+    my $upc = GetNormalizedUPC($record,$marcflavour);
+    my $ean = GetNormalizedEAN($record,$marcflavour);
 
     # warn "ISBN: $isbn | UPC: $upc | EAN: $ean";
 
@@ -155,64 +155,6 @@ sub check_search_inside {
         return $available;
 }
 
-sub _get_amazon_upc {
-	my ($record,$marcflavour) = @_;
-	my (@fields,$upc);
-
-	if ($marcflavour eq 'MARC21') {
-		@fields = $record->field('024');
-		foreach my $field (@fields) {
-			my $indicator = $field->indicator(1);
-			my $upc = _normalize_match_point($field->subfield('a'));
-			if ($indicator == 1 and $upc ne '') {
-				return $upc;
-			}
-		}
-	}
-	else { # assume unimarc if not marc21
-		@fields = $record->field('072');
-		foreach my $field (@fields) {
-			my $upc = _normalize_match_point($field->subfield('a'));
-			if ($upc ne '') {
-				return $upc;
-			}
-		}
-	}
-}
-
-sub _get_amazon_ean {
-	my ($record,$marcflavour) = @_;
-	my (@fields,$ean);
-
-	if ($marcflavour eq 'MARC21') {
-		@fields = $record->field('024');
-		foreach my $field (@fields) {
-			my $indicator = $field->indicator(1);
-			my $upc = _normalize_match_point($field->subfield('a'));
-			if ($indicator == 3 and $upc ne '') {
-				return $upc;
-			}
-		}
-	}
-	else { # assume unimarc if not marc21
-		@fields = $record->field('073');
-		foreach my $field (@fields) {
-			my $upc = _normalize_match_point($field->subfield('a'));
-			if ($upc ne '') {
-				return $upc;
-			}
-		}
-	}
-}
-
-sub _normalize_match_point {
-	my $match_point = shift;
-	(my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
-	$normalized_match_point =~ s/-//g;
-
-	return $normalized_match_point;
-}
-
 1;
 __END__
 
diff --git a/C4/External/Syndetics.pm b/C4/External/Syndetics.pm
index b54a6d5..3be2a29 100644
--- a/C4/External/Syndetics.pm
+++ b/C4/External/Syndetics.pm
@@ -54,7 +54,7 @@ This module provides facilities for retrieving Syndetics.com content in Koha
 
 =over 4
 
-my $syndetics_summary= &get_syndetics_summary( $xisbn );
+my $syndetics_summary= &get_syndetics_summary( $isbn );
 
 =back
 
@@ -63,10 +63,7 @@ Get Summary data from Syndetics
 =cut
 
 sub get_syndetics_index {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -98,10 +95,7 @@ sub get_syndetics_index {
 }
 
 sub get_syndetics_summary {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -130,10 +124,7 @@ sub get_syndetics_summary {
 }
 
 sub get_syndetics_toc {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -162,10 +153,7 @@ sub get_syndetics_toc {
 }
 
 sub get_syndetics_excerpt {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -193,10 +181,7 @@ sub get_syndetics_excerpt {
 }
 
 sub get_syndetics_reviews {
-    my ( $isbn, $syndetics_elements ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc,$syndetics_elements ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -260,10 +245,7 @@ sub get_syndetics_reviews {
 }
 
 sub get_syndetics_editions {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc ) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -293,10 +275,7 @@ sub get_syndetics_editions {
 }
 
 sub get_syndetics_anotes {
-    my ( $isbn ) = @_;
-
-    #normalize the ISBN
-    $isbn = _normalize_match_point ($isbn);
+    my ( $isbn,$upc,$oclc) = @_;
 
     # grab the AWSAccessKeyId: mine is '0V5RRRRJZ3HR2RQFNHR2'
     my $syndetics_client_code = C4::Context->preference('SyndeticsClientCode');
@@ -336,14 +315,6 @@ sub get_syndetics_anotes {
     return \@anotes;
 }
 
-sub _normalize_match_point {
-    my $match_point = shift;
-    (my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
-    $normalized_match_point =~ s/-//g;
-
-    return $normalized_match_point;
-}
-
 1;
 __END__
 
diff --git a/C4/Koha.pm b/C4/Koha.pm
index b5e87f6..23c1727 100644
--- a/C4/Koha.pm
+++ b/C4/Koha.pm
@@ -53,6 +53,10 @@ BEGIN {
 		&GetKohaAuthorisedValues
 		&GetAuthValCode
 		&GetManagedTagSubfields
+		&GetNormalizedUPC
+		&GetNormalizedISBN
+		&GetNormalizedEAN
+		&GetNormalizedOCLCNumber
 
 		$DEBUG
 	);
@@ -1132,6 +1136,131 @@ sub display_marc_indicators {
     return $indicators;
 }
 
+sub GetNormalizedUPC {
+ my ($record,$marcflavour) = @_;
+    my (@fields,$upc);
+
+    if ($marcflavour eq 'MARC21') {
+        @fields = $record->field('024');
+        foreach my $field (@fields) {
+            my $indicator = $field->indicator(1);
+            my $upc = _normalize_match_point($field->subfield('a'));
+            if ($indicator == 1 and $upc ne '') {
+                return $upc;
+            }
+        }
+    }
+    else { # assume unimarc if not marc21
+        @fields = $record->field('072');
+        foreach my $field (@fields) {
+            my $upc = _normalize_match_point($field->subfield('a'));
+            if ($upc ne '') {
+                return $upc;
+            }
+        }
+    }
+}
+
+# Normalizes and returns the first valid ISBN found in the record
+sub GetNormalizedISBN {
+    my ($isbn,$record,$marcflavour) = @_;
+    my @fields;
+    if ($isbn) {
+        return _isbn_cleanup($isbn);
+    }
+    return undef unless $record;
+
+    if ($marcflavour eq 'MARC21') {
+        @fields = $record->field('020');
+        foreach my $field (@fields) {
+            $isbn = $field->subfield('a');
+            if ($isbn) {
+                return _isbn_cleanup($isbn);
+            } else {
+                return undef;
+            }
+        }
+    }
+    else { # assume unimarc if not marc21
+        @fields = $record->field('010');
+        foreach my $field (@fields) {
+            my $isbn = $field->subfield('a');
+            if ($isbn) {
+                return _isbn_cleanup($isbn);
+            } else {
+                return undef;
+            }
+        }
+    }
+
+}
+
+sub GetNormalizedEAN {
+    my ($record,$marcflavour) = @_;
+    my (@fields,$ean);
+
+    if ($marcflavour eq 'MARC21') {
+        @fields = $record->field('024');
+        foreach my $field (@fields) {
+            my $indicator = $field->indicator(1);
+            $ean = _normalize_match_point($field->subfield('a'));
+            if ($indicator == 3 and $ean ne '') {
+                return $ean;
+            }
+        }
+    }
+    else { # assume unimarc if not marc21
+        @fields = $record->field('073');
+        foreach my $field (@fields) {
+            $ean = _normalize_match_point($field->subfield('a'));
+            if ($ean ne '') {
+                return $ean;
+            }
+        }
+    }
+}
+sub GetNormalizedOCLCNumber {
+    my ($record,$marcflavour) = @_;
+    my (@fields,$oclc);
+
+    if ($marcflavour eq 'MARC21') {
+        @fields = $record->field('035');
+        foreach my $field (@fields) {
+            $oclc = $field->subfield('a');
+            if ($oclc =~ /OCoLC/) {
+                $oclc =~ s/\(OCoLC\)//;
+                return $oclc;
+            } else {
+                return undef;
+            }
+        }
+    }
+    else { # TODO: add UNIMARC fields
+    }
+}
+
+sub _normalize_match_point {
+    my $match_point = shift;
+    (my $normalized_match_point) = $match_point =~ /([\d-]*[X]*)/;
+    $normalized_match_point =~ s/-//g;
+
+    return $normalized_match_point;
+}
+
+sub _isbn_cleanup ($) {
+    my $normalized_isbn = shift;
+    $normalized_isbn =~/([0-9]{1,})/;
+    $normalized_isbn = $1;
+    if (
+        $normalized_isbn =~ /\b(\d{13})\b/ or
+        $normalized_isbn =~ /\b(\d{10})\b/ or
+        $normalized_isbn =~ /\b(\d{9}X)\b/i
+    ) { 
+        return $1;
+    }
+    return undef;
+}
+
 1;
 
 __END__
diff --git a/C4/Search.pm b/C4/Search.pm
index 8bcf238..5a3a3a6 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1263,6 +1263,7 @@ sub searchResults {
         $times = $hits;	 # FIXME: if $hits is undefined, why do we want to equal it?
     }
 
+	my $marcflavour = C4::Context->preference("marcflavour");
     # loop through all of the records we've retrieved
     for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
         my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] );
@@ -1274,9 +1275,10 @@ sub searchResults {
         $oldbiblio->{imageurl} = getitemtypeimagelocation( 'opac', $itemtypes{ $oldbiblio->{itemtype} }->{imageurl} );
 
         $oldbiblio->{'authorised_value_images'}  = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{'biblionumber'}, $marcrecord ) );
-        (my $aisbn) = $oldbiblio->{isbn} =~ /([\d-]*[X]*)/;
-        $aisbn =~ s/-//g;
-        $oldbiblio->{amazonisbn} = $aisbn;
+		$oldbiblio->{normalized_upc} = GetNormalizedUPC($marcrecord,$marcflavour);
+		$oldbiblio->{normalized_ean} = GetNormalizedEAN($marcrecord,$marcflavour);
+		$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour);
+		$oldbiblio->{normalized_isbn} = GetNormalizedISBN(undef,$marcrecord,$marcflavour);
 		$oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description};
  # Build summary if there is one (the summary is defined in the itemtypes table)
  # FIXME: is this used anywhere, I think it can be commented out? -- JF
@@ -1527,8 +1529,6 @@ s/\[(.?.?.?.?)$tagsubf(.*?)]/$1$subfieldvalue$2\[$1$tagsubf$2]/g;
         $oldbiblio->{damagedcount}         = $itemdamaged_count;
         $oldbiblio->{intransitcount}       = $item_in_transit_count;
         $oldbiblio->{orderedcount}         = $ordered_count;
-        $oldbiblio->{isbn} =~
-          s/-//g;    # deleting - in isbn to enable amazon content
         push( @newresults, $oldbiblio );
     }
     return @newresults;
diff --git a/C4/XISBN.pm b/C4/XISBN.pm
index 58a75b5..8e97b6a 100644
--- a/C4/XISBN.pm
+++ b/C4/XISBN.pm
@@ -21,6 +21,7 @@ use XML::Simple;
 #use LWP::Simple;
 use C4::Biblio;
 use C4::Items;
+use C4::Koha;
 use C4::External::Syndetics qw(get_syndetics_editions);
 use LWP::UserAgent;
 use HTTP::Request::Common;
@@ -34,16 +35,13 @@ BEGIN {
 	@ISA = qw(Exporter);
 	@EXPORT_OK = qw(
 		&get_xisbns
-		&get_biblio_from_xisbn
         &get_biblionumber_from_isbn
 	);
 }
 
 sub get_biblionumber_from_isbn {
     my $isbn = shift;
-     if ($isbn =~ /(\d{9,}[X]*)/) {
-    	$isbn = $1.'%';
-    }
+   	$isbn.='%';
     my @biblionumbers;
     my $dbh=C4::Context->dbh;
     my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ? LIMIT 10";
@@ -61,9 +59,9 @@ This module provides facilities for retrieving ThingISBN and XISBN content in Ko
 
 =cut
 
-sub get_biblio_from_xisbn {
+sub _get_biblio_from_xisbn {
     my $xisbn = shift;
-    $xisbn .='%' if ($xisbn =~ /(\d{9,}[X]*)/);
+    $xisbn.='%';
     my $dbh = C4::Context->dbh;
     my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ?";
     my $sth = $dbh->prepare($query);
@@ -72,8 +70,7 @@ sub get_biblio_from_xisbn {
     my $xbiblio;
     if ($xbib_data->{biblionumber}) {
         $xbiblio = GetBiblioData($xbib_data->{biblionumber});
-        $xbiblio->{isbn} =~ /(\d{9,}[X]*)/;
-        $xbiblio->{amazonisbn} = $1;
+        $xbiblio->{normalized_isbn} = GetNormalizedISBN($xbiblio->{isbn});
         $xbiblio->{items} = GetItemsByBiblioitemnumber($xbib_data->{biblionumber});
     }
     return ($xbiblio);
@@ -88,8 +85,6 @@ sub get_biblio_from_xisbn {
 sub get_xisbns {
     my ( $isbn ) = @_;
     my ($response,$thing_response,$xisbn_response,$gapines_response,$syndetics_response);
-    $isbn =~ /(\d{9,}[X]*)/;
-    $isbn = $1;
     # THINGISBN
     if ( C4::Context->preference('ThingISBN') ) {
         my $url = "http://www.librarything.com/api/thingISBN/".$isbn;
@@ -132,8 +127,8 @@ sub get_xisbns {
         next if $isbn eq $response_data;
         next if $unique_xisbns->{ $response_data->{content} };
         $unique_xisbns->{ $response_data->{content} }++;
-        my $xbiblio= get_biblio_from_xisbn($response_data->{content});
-        push @xisbns, $xbiblio if $xbiblio; #response_data->{xbiblio}; #->{biblionumber}; # if $xbiblionumber;
+        my $xbiblio= _get_biblio_from_xisbn($response_data->{content});
+        push @xisbns, $xbiblio if $xbiblio;
     }
     return \@xisbns;
 }
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 32693d7..5a4f3e5 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -216,12 +216,14 @@ $tabsysprefs{QueryRemoveStopwords}    = "Searching";
 $tabsysprefs{AdvancedSearchTypes}     = "Searching";
 
 # EnhancedContent
-$tabsysprefs{AmazonContent}          = "EnhancedContent";
+$tabsysprefs{AmazonEnabled}          = "EnhancedContent";
+$tabsysprefs{OPACAmazonEnabled}      = "EnhancedContent";
+$tabsysprefs{AmazonCoverImages}      = "EnhancedContent";
+$tabsysprefs{OPACAmazonCoverImages}  = "EnhancedContent";
 $tabsysprefs{AWSAccessKeyID}         = "EnhancedContent";
 $tabsysprefs{AmazonLocale}           = "EnhancedContent";
 $tabsysprefs{AmazonAssocTag}         = "EnhancedContent";
 $tabsysprefs{AmazonSimilarItems}     = "EnhancedContent";
-$tabsysprefs{OPACAmazonContent}      = "EnhancedContent";
 $tabsysprefs{OPACAmazonSimilarItems} = "EnhancedContent";
 
 # Baker & Taylor
@@ -242,6 +244,7 @@ $tabsysprefs{SyndeticsReviews}        = 'EnhancedContent';
 $tabsysprefs{SyndeticsAuthorNotes}    = 'EnhancedContent';
 $tabsysprefs{SyndeticsAwards}         = 'EnhancedContent';
 $tabsysprefs{SyndeticsSeries}         = 'EnhancedContent';
+$tabsysprefs{SyndeticsCoverImageSize} = 'EnhancedContent';
 
 
 # FRBR
diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index 363f2dc..bdc935c 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -32,7 +32,7 @@ use C4::Branch;
 use C4::Reserves;
 use C4::Members;
 use C4::Serials;
-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn get_biblio_from_xisbn);
+use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
 use C4::External::Amazon;
 
 # use Smart::Comments;
@@ -55,6 +55,21 @@ my $fw = GetFrameworkCode($biblionumber);
 my $marcflavour      = C4::Context->preference("marcflavour");
 my $record           = GetMarcBiblio($biblionumber);
 
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+    normalized_upc => $upc,
+    normalized_ean => $ean,
+    normalized_oclc => $oclc,
+    normalized_isbn => $isbn,
+);
+
 unless (defined($record)) {
     print $query->redirect("/cgi-bin/koha/errors/404.pl");
 	exit;
@@ -195,21 +210,17 @@ $template->param(
 # $debug and $template->param(debug_display => 1);
 
 # XISBN Stuff
-my $xisbn=$dat->{'isbn'};
-$xisbn =~ /(\d*[X]*)/ if ( $xisbn );
-$template->param(amazonisbn => $1);		# FIXME: so it is OK if the ISBN = 'XXXXX' ?
 if (C4::Context->preference("FRBRizeEditions")==1) {
     eval {
         $template->param(
-            xisbn => $xisbn,
-            XISBNS => get_xisbns($xisbn)
+            XISBNS => get_xisbns($isbn)
         );
     };
     if ($@) { warn "XISBN Failed $@"; }
 }
-if ( C4::Context->preference("AmazonContent") == 1 ) {
+if ( C4::Context->preference("AmazonEnabled") == 1 ) {
     my $similar_products_exist;
-    my $amazon_details = &get_amazon_details( $xisbn, $record, $marcflavour );
+    my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
     my $item_attributes = \%{$amazon_details->{Items}->{Item}->{ItemAttributes}};
     my $customer_reviews = \@{$amazon_details->{Items}->{Item}->{CustomerReviews}->{Review}};
     my @similar_products;
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 47a0c4b..df58b7d 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -1,8 +1,8 @@
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('acquisitions','normal','Choose Normal, budget-based acquisitions, or Simple bibliographic-data acquisitions','simple|normal','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor',0,'If ON, the MARC editor won\'t display field/subfield descriptions','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonContent',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems',0,'Turn ON Amazon Similar Items feature  - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonContent',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems',0,'Turn ON Amazon Similar Items feature  - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web Services','US|CA|DE|FR|JP|UK','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See:  http://aws.amazon.com','','free');
@@ -214,3 +214,17 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('OPACDisplayRequestPriority','0','','Show patrons the priority level on holds in the OPAC','YesNo');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldPolicyOverride', '0', 'Allow staff to override hold policies when placing holds',NULL,'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 47da596..00afb84 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -1,8 +1,8 @@
 set NAMES 'utf8';
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor', '0', 'Si ce paramètre est mis à 1, l''éditeur MARC n''affichera pas les libellés des champs/sous-champs, seulement leur code. Devrait être à 0 dans la plupart des cas.', '', '');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonContent', '0', 'Ce paramètre active la récupération des images de couverture sur Amazon. Vous DEVEZ positionner AmazonDevKey AmazonAssocTag si vous activez cette option', '', 'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled', '0', 'Ce paramètre active la récupération des images de couverture sur Amazon. Vous DEVEZ positionner AmazonDevKey AmazonAssocTag si vous activez cette option', '', 'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems','0','Active ou non les fonctions Amazon ''les lecteurs ayant acheté...'' - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonContent','0','Active ou non l''affichage du contenu Amazon à l''OPAC. - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled','0','Active ou non l''affichage du contenu Amazon à l''OPAC. - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems','0','Active ou non les fonctions Amazon ''Les lecteurs ayant acheté...'' - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web Services','US|CA|DE|FR|JP|UK','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AWSAccessKeyID','','See:  http://aws.amazon.com','','free');
@@ -216,4 +216,18 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('OPACDisplayRequestPriority','0','','Afficher l\'ordre des réservation pour les adhérents á l\'opac','YesNo');
 INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'UseBranchTransferLimits', '0', '', 'If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.', 'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldPolicyOverride', '0', "Autorise le personnel á outrepasser la politique de réservation au moment d'une réservation",NULL,'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImages', '0', 'Display Cover Images from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsTOC', '0', 'Display Table of Content information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSummary', '0', 'Display Summary Information from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEditions', '0', 'Display Editions from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsExcerpt', '0', 'Display Excerpts and first chapters on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsReviews', '0', 'Display Reviews on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAuthorNotes', '0', 'Display Notes about the Author on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsAwards', '0', 'Display Awards on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
 
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 231c949..ec27361 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2220,8 +2220,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     print "Upgrade to $DBversion done (data for Email Checkout Slips project)\n";
 	 SetVersion ($DBversion);
 	 }
-	 $DBversion = '3.01.00.013';
-	 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+$DBversion = '3.01.00.014';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsClientCode', '0', 'Client Code for using Syndetics Solutions content','','free')");
 
 	$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsEnabled', '0', 'Turn on Syndetics Enhanced Content','','YesNo')");
@@ -2244,6 +2244,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 
     $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsSeries', '0', 'Display Series information on OPAC from Syndetics','','YesNo')");
 
+	$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice')");
+
+	$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo')");
+
+	$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo')");
+
+	$dbh->do("UPDATE systempreferences SET variable='AmazonEnabled' WHERE variable = 'AmazonContent'");
+
+	$dbh->do("UPDATE systempreferences SET variable='OPACAmazonEnabled' WHERE variable = 'OPACAmazonContent'");
+
     print "Upgrade to $DBversion done (added Syndetics Enhanced Content system preferences)\n";
     SetVersion ($DBversion);
 }
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 eed7536..194da80 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl
@@ -32,7 +32,7 @@ function verify_images() {
      $(document).ready(function() {
         $('#bibliodetails > ul').tabs();
      });
-     <!-- TMPL_IF NAME="AmazonContent" -->$(window).load(function() {
+     <!-- TMPL_IF NAME="AmazonEnabled" -->$(window).load(function() {
         verify_images();
      });<!-- /TMPL_IF -->
 //]]>
@@ -53,7 +53,7 @@ function verify_images() {
     <div class="yui-b">
 
 <!-- TMPL_INCLUDE NAME="cat-toolbar.inc" -->
-    <!-- TMPL_IF NAME="AmazonContent" --><div class="yui-gb"><!-- TMPL_ELSE --><div class="yui-g"><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="AmazonEnabled" --><div class="yui-gb"><!-- TMPL_ELSE --><div class="yui-g"><!-- /TMPL_IF -->
     <div id="catalogue_detail_biblio" class="yui-u first">
         
     <h3><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" --></h3> 
@@ -98,13 +98,13 @@ function verify_images() {
         </ul>
         </div>
         
-<!-- TMPL_IF NAME="AmazonContent" --><div class="yui-u" id="bookcoverimg">
-        <a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="" /></a></div><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonCoverImages" --><div class="yui-u" id="bookcoverimg">
+        <a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="" /></a></div><!-- /TMPL_IF --><!-- /TMPL_IF -->
         
         <div class="yui-u" style="margin-top: 1em;">
         <ul>
-        <!-- TMPL_IF name="isbn" -->
-            <li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn" --></li>
+        <!-- TMPL_IF name="normalized_isbn" -->
+            <li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="normalized_isbn" --></li>
         <!-- /TMPL_IF -->
         <!-- TMPL_IF name="issn" -->
             <li><strong>ISSN:</strong><!-- TMPL_VAR NAME="issn" --></li>
@@ -291,7 +291,7 @@ function verify_images() {
     
 <div id="description">
 <div class="content_set">
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="AmazonEnabled" -->
 <!-- TMPL_LOOP NAME="AMAZON_EDITORIAL_REVIEWS" -->
     <!-- TMPL_IF NAME="Content" -->
     <h4>From <!-- TMPL_VAR NAME="Source" -->:</h4>
@@ -314,7 +314,7 @@ function verify_images() {
 <!-- TMPL_IF NAME="FRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" -->
 <div id="editions"><h2>Editions</h2>
 <table>
-<!-- TMPL_LOOP NAME="XISBNS" --><tr><!-- TMPL_IF NAME="AmazonContent" --><td><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn" -->.01._AA75_PU_PU-5_.jpg" /></a></td><!-- /TMPL_IF --><td><!-- TMPL_IF NAME="noItemTypeImages" --><!-- TMPL_VAR NAME="description" --><!-- TMPL_ELSE --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->"><!-- /TMPL_IF --></td><td>
+<!-- TMPL_LOOP NAME="XISBNS" --><tr><!-- TMPL_IF NAME="AmazonEnabled" --><td><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._AA75_PU_PU-5_.jpg" /></a></td><!-- /TMPL_IF --><td><!-- TMPL_IF NAME="noItemTypeImages" --><!-- TMPL_VAR NAME="description" --><!-- TMPL_ELSE --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->"><!-- /TMPL_IF --></td><td>
 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> by <!-- TMPL_VAR NAME="author" --> &copy;<!-- TMPL_VAR NAME="copyrightdate" -->
   <!-- TMPL_IF name="publishercode" -->
 <!-- TMPL_VAR NAME="publishercode" --> <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR NAME="place"-->)<!--/TMPL_IF--> <!-- TMPL_IF NAME="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionstatement" --><!-- TMPL_VAR NAME="editionstatement" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="editionresponsability" --><!-- TMPL_VAR NAME="editionresponsability" --><!-- /TMPL_IF -->
@@ -327,7 +327,7 @@ function verify_images() {
 </table></div><!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="AmazonSimilarItems" -->
+<!-- TMPL_IF NAME="AmazonEnabled" --><!-- TMPL_IF NAME="AmazonSimilarItems" -->
 <div id="related">
 <h4>Similar Items</h4>
 <ul>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
index 3609e26..06729e6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
@@ -1,7 +1,7 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <title>Koha &rsaquo; Catalog &rsaquo; <!-- TMPL_IF NAME="searchdesc" -->Results of Search <!-- TMPL_IF NAME="query_desc" -->for '<!-- TMPL_VAR NAME="query_desc" -->'<!-- /TMPL_IF --><!-- TMPL_IF NAME="limit_desc" -->&nbsp;with limit(s):&nbsp;'<!-- TMPL_VAR NAME="limit_desc" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->You did not specify any search criteria<!-- /TMPL_IF --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_IF NAME="AmazonContent" --><script type="text/javascript">
+<!-- TMPL_IF NAME="AmazonEnabled" --><script type="text/javascript">
 //<![CDATA[
 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
 function verify_images() {
@@ -235,17 +235,18 @@ $(window).load(function() {
 
                 <table>
                     <tr>
-                        <!-- TMPL_IF NAME="AmazonContent" --><th>&nbsp;</th><!-- /TMPL_IF -->
+                        <!-- TMPL_IF NAME="AmazonEnabled" --><th>&nbsp;</th><!-- /TMPL_IF -->
                         <th>Results</th>
                         <th>Location</th>
                     </tr>
                         <!-- Actual Search Results -->
                         <!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
                          <!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
-                            <!-- TMPL_IF NAME="AmazonContent" -->
+                            <!-- TMPL_IF NAME="AmazonEnabled" -->
                                 <td>
                                     <a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
-                                        <img src="<!-- TMPL_IF NAME="isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" />
+									<!-- TMPL_IF NAME="AmazonCoverImages" -->
+                                        <img src="<!-- TMPL_IF NAME="normalized_isbn" -->http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.TZZZZZZZ.jpg<!-- TMPL_ELSE -->http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif<!-- /TMPL_IF -->" alt="image" class="thumbnail" /> <!-- /TMPL_IF -->
                                     </a></td>                           
                             <!-- /TMPL_IF -->
                             <td>
@@ -298,7 +299,7 @@ $(window).load(function() {
 										<!-- TMPL_IF name="publicationyear" -->, <!-- TMPL_VAR name="publicationyear" -->
 										<!-- TMPL_ELSIF name="copyrightdate"-->, <!-- TMPL_VAR name="copyrightdate" --><!-- /TMPL_IF -->
                                         <!-- TMPL_IF name="pages" -->: <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
-                                        <!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="isbn" -->ISBN: <!-- TMPL_VAR NAME="isbn" --><!-- /TMPL_IF -->
+                                        <!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="normalized_isbn" -->ISBN: <!-- TMPL_VAR NAME="normalized_isbn" --><!-- /TMPL_IF -->
                                         <!-- TMPL_VAR name="description" -->
                                         <!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
                                         <!-- TMPL_IF name="cn_class" -->[<a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:<!-- TMPL_VAR NAME="cn_class" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="cn_class" --></a>]<!-- /TMPL_IF -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
index c70d1dd..7ebd8a8 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
@@ -18,7 +18,7 @@
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hoverIntent.minified.js"></script>
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.dropshadow-min.js"></script>
 <script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/script.js"></script>
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" -->
 <script type="text/javascript" language="javascript">//<![CDATA[
 		var NO_AMAZON_IMAGE = _("No cover image available");
 	//]]>
@@ -46,7 +46,7 @@
     var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
     var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
     var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");<!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="AmazonContent" -->$(window).load(function() {
+	<!-- TMPL_IF NAME="OPACAmazonCoverImages" -->$(window).load(function() {
 		 	verify_images();
 		 });<!-- /TMPL_IF -->
 	<!-- TMPL_IF NAME="SyndeticsCoverImages" -->$(window).load(function() {
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl
index a48ef1c..fb0b647 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl
@@ -31,7 +31,7 @@
 	            <a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-subscriptions">Subscriptions</a>
 	    </li><!-- /TMPL_IF -->
 	<!-- TMPL_IF NAME="reviewson" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#comments">Comments</a></li><!-- /TMPL_IF -->
-	 	<!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
+	 	<!-- TMPL_IF NAME="OPACAmazonEnabled" --><li><a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#opac-isbd-amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
 	</ul>
 
 		<div id="opac-isbd-subscriptions">    <!-- TMPL_IF name="subscriptionsnumber" -->
@@ -108,13 +108,13 @@
 
 	<!-- /TMPL_IF -->
 
-	<!-- TMPL_IF NAME="AmazonContent" -->
+	<!-- TMPL_IF NAME="OPACAmazonEnabled" -->
 	<!-- Amazon Reviews -->
 	<div id="opac-isbd-amazonreviews">
 
 	    <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-	    <!-- TMPL_IF NAME="isbn" -->
-	        <h4><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="isbn" -->&amp;store=books">Add your own review</a></h4>
+	    <!-- TMPL_IF NAME="normalized_isbn" -->
+	        <h4><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;store=books">Add your own review</a></h4>
 	    <!-- /TMPL_IF -->
 	    <!-- /TMPL_LOOP --><br/>
 
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index 920406e..cb5e09a 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -52,12 +52,10 @@
     <div id="catalogue_detail_biblio">
 
     <div id="bookcover">
-    <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
-
-<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/MC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-
-    <!-- TMPL_IF NAME="GoogleJackets" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail"></div><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" target="_blank"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._PIdp-schmooS,TopRight,7,-26_SCMZZZZZZZ_.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/<!-- TMPL_VAR NAME="SyndeticsCoverImageSize" -->.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&amp;type=xw10" alt="" class="thumbnail" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="GoogleJackets" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail"></div><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" target="_blank"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
     </div>
 
     <!-- TMPL_IF NAME="XSLTDetailsDisplay" -->
@@ -114,10 +112,10 @@
     <!-- TMPL_IF NAME="pages" --><span class="results_summary"><span class="label">Physical details:</span> <!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></span><!-- /TMPL_IF -->
     <!-- COinS / OpenURL -->
     <!-- TMPL_IF NAME="ocoins_format" -->
-    <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&amp;rft.au=<!-- TMPL_VAR NAME="author" -->&amp;rft.btitle=<!-- TMPL_VAR NAME="title" -->&amp;rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&amp;rft.pages=<!-- TMPL_VAR NAME="pages" -->&amp;rft.isbn=<!-- TMPL_VAR NAME=amazonisbn -->&amp;rft.aucorp=&amp;rft.place=<!-- TMPL_VAR NAME="place" -->&amp;rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&amp;rft.edition=<!-- TMPL_VAR NAME="edition" -->&amp;rft.series=<!-- TMPL_VAR NAME="series" -->&amp;rft.genre="></span><!-- /TMPL_IF -->
-    <!-- TMPL_IF name="isbn" -->
+    <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&amp;rft.au=<!-- TMPL_VAR NAME="author" -->&amp;rft.btitle=<!-- TMPL_VAR NAME="title" -->&amp;rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&amp;rft.pages=<!-- TMPL_VAR NAME="pages" -->&amp;rft.isbn=<!-- TMPL_VAR NAME=normalized_isbn -->&amp;rft.aucorp=&amp;rft.place=<!-- TMPL_VAR NAME="place" -->&amp;rft.pub=<!-- TMPL_VAR NAME="publishercode" -->&amp;rft.edition=<!-- TMPL_VAR NAME="edition" -->&amp;rft.series=<!-- TMPL_VAR NAME="series" -->&amp;rft.genre="></span><!-- /TMPL_IF -->
+    <!-- TMPL_IF name="normalized_isbn" -->
     <!-- unAPI <abbr/> tag -->
-    <span class="results_summary"><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" --></abbr></span><!-- /TMPL_IF -->
+    <span class="results_summary"><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="normalized_isbn" -->"><!-- TMPL_VAR NAME="normalized_isbn" --></abbr></span><!-- /TMPL_IF -->
     <!-- TMPL_IF name="issn" -->
     <span class="results_summary"><span class="label">ISSN:</span><!-- TMPL_VAR NAME="issn" --></span>
     <!-- /TMPL_IF -->
@@ -216,12 +214,12 @@
 
         <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsSeries" --><!-- TMPL_IF NAME="SyndeticsSERIES1Exists" -->
         <span class="results_summary">
-        <span class="label">Series Information:</span> <a target="_blank" href="http://syndetics.com/ffseries.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->&type=series&num=1&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->">Click to open in new window</a>
+        <span class="label">Series Information:</span> <a target="_blank" href="http://syndetics.com/ffseries.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;type=series&amp;num=1&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->">Click to open in new window</a>
         </span>
         <!-- /TMPL_IF --><!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="SyndeticsAwards" --><!-- TMPL_IF NAME="SyndeticsAWARDS1Exists" -->
         <span class="results_summary">
-        <span class="label">Awards:</span> <a target="_blank" href="http://syndetics.com/ffawards.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->&type=awards&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->">Click to open in new window</a>
+        <span class="label">Awards:</span> <a target="_blank" href="http://syndetics.com/ffawards.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;type=awards&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->">Click to open in new window</a>
         </span>
         <!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
@@ -260,7 +258,7 @@
 
     <!-- TMPL_IF NAME="OPACFRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#editions">Editions</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
     
-    <!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="OPACAmazonEnabled" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
 
 </ul>
 
@@ -340,12 +338,12 @@
 <!-- TMPL_LOOP NAME="PREVIOUS_SHELF_BROWSE" -->
         <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">
 
-    <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="isbn" -->
-    <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="isbn" -->
-    <img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+    <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="browser_normalized_isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="browser_normalized_isbn" -->/SC.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="browser_normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="browser_normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="browser_normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="browser_normalized_oclc" --><!-- /TMPL_IF -->&amp;type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="browser_normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="browser_normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+    <img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="browser_normalized_isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
 </a></td>
 <!-- /TMPL_LOOP -->
@@ -353,12 +351,12 @@
 <!-- TMPL_LOOP NAME="NEXT_SHELF_BROWSE" -->
        <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#shelfbrowser">
 
-    <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="isbn" -->
-    <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
-	<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="isbn" -->
-    <img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+    <img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="browser_normalized_isbn"-->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img border="0" src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="browser_normalized_isbn" -->/SC.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="browser_normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="browser_normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="browser_normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="browser_normalized_oclc" --><!-- /TMPL_IF -->&amp;type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="browser_normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="browser_normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="browser_normalized_isbn" -->
+    <img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="browser_normalized_isbn" -->" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
 </a></td>
 <!-- /TMPL_LOOP -->
@@ -384,11 +382,11 @@
 
 <div id="descriptions">
 <div class="content_set">
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" -->
 <!-- TMPL_LOOP NAME="AMAZON_EDITORIAL_REVIEWS" -->
     <!-- TMPL_IF NAME="Content" -->
     <h4>From <!-- TMPL_VAR NAME="Source" -->:</h4>
-    <p><!-- TMPL_VAR NAME="Content" --></p>
+    <div><!-- TMPL_VAR NAME="Content" --></div>
     <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
 <!-- /TMPL_IF-->
@@ -396,7 +394,7 @@
 <!-- TMPL_IF NAME="SyndeticsSummary" --><!-- TMPL_IF NAME="SyndeticsSUMMARYExists" -->
 <!-- TMPL_LOOP NAME="SYNDETICS_SUMMARY" -->
     <!-- TMPL_IF NAME="a" -->
-    <h4>Enhanced Description:</h4>
+    <h4>Enhanced Descriptions from Syndetics:</h4>
     <p><!-- TMPL_VAR NAME="a" --></p>
     <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
@@ -414,10 +412,13 @@
 <!-- /TMPL_IF -->
 </div>
 </div>
+
 <!-- TMPL_IF NAME="SyndeticsEnabled" -->
+
+<!-- TMPL_IF NAME="SyndeticsTOC" --><!-- TMPL_IF NAME="SYNDETICS_TOC" -->
 <div id="toc">
 <div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsTOC" --><!-- TMPL_IF NAME="SYNDETICS_TOC" -->
+<h3>Table of Contents provided by Syndetics</h3>
 <ul>
 <!-- TMPL_LOOP NAME="SYNDETICS_TOC" -->
     <!-- TMPL_IF NAME="p" -->
@@ -425,21 +426,23 @@
     <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
 </ul>
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
 </div>
 </div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
 
+<!-- TMPL_IF NAME="SyndeticsExcerpt" --><!-- TMPL_IF NAME="SYNDETICS_EXCERPT" -->
 <div id="excerpt">
 <div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsExcerpt" -->
+<h3>Excerpt provided by Syndetics</h3>
 <!-- TMPL_VAR NAME="SYNDETICS_EXCERPT" -->
-<!-- /TMPL_IF -->
 </div>
 </div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
 
+<!-- TMPL_IF NAME="SyndeticsReviews" --><!-- TMPL_IF NAME="SYNDETICS_REVIEWS" -->
 <div id="reviews">
 <div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsReviews" --><!-- TMPL_IF NAME="SYNDETICS_REVIEWS" -->
+<h3>Reviews provided by Syndetics</h3>
 <!-- TMPL_LOOP NAME="SYNDETICS_REVIEWS" -->
     <!-- TMPL_IF NAME="title" -->
     <h4><!-- TMPL_VAR NAME="title" --></h4>
@@ -452,23 +455,24 @@
 	<!-- /TMPL_LOOP -->
     <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
 </div>
 </div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
 
+<!-- TMPL_IF NAME="SyndeticsAuthorNotes" --><!-- TMPL_IF NAME="SYNDETICS_ANOTES" -->
 <div id="anotes">
 <div class="content_set">
-<!-- TMPL_IF NAME="SyndeticsAuthorNotes" --><!-- TMPL_IF NAME="SYNDETICS_ANOTES" -->
+<h3>Author Notes provided by Syndetics</h3>
 <!-- TMPL_LOOP NAME="SYNDETICS_ANOTES" -->
     <!-- TMPL_IF NAME="content" -->
         <!-- TMPL_VAR NAME="content" -->
     <!-- /TMPL_IF -->
 <!-- /TMPL_LOOP -->
-<!-- /TMPL_IF --><!-- /TMPL_IF -->
 </div>
 </div>
+<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- /TMPL_IF --> <!-- /SyndeticsEnabled -->
 
-<!-- /TMPL_IF -->
 <!-- TMPL_IF name="subscriptionsnumber" -->
 <div id="subscriptions">
     <h2>This is a serial subscription</h2>
@@ -568,10 +572,9 @@
 <!-- TMPL_LOOP NAME="XISBNS" -->
 <tr>
 <td>
-<!-- TMPL_IF NAME="AmazonContent" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01._AA75_PU_PU-5_.jpg" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" />
-<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&amp;type=xw10" alt="" class="thumbnail" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
 </td>
 <td><!-- TMPL_VAR NAME="description" --></td><td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" ESCAPE="HTML" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="copyrightdate" --> &copy;<!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->
@@ -588,11 +591,11 @@
 <!-- /TMPL_LOOP -->
 </table>
 </div><!-- /TMPL_IF --><!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="AmazonContent" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" -->
 <!-- Amazon Reviews -->
 <div id="amazonreviews">
         <!-- TMPL_IF NAME="amazon_average_rating" -->
-            <div class="clearfix"><h3 style="float: left;">Average Rating (from Amazon.com): </h3><span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:<!-- TMPL_VAR EXPR="amazon_average_rating / 2" -->px"></span></span> <!-- TMPL_IF NAME="isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="amazonisbn" -->&amp;store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="amazonisbn" -->&amp;store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
+            <div class="clearfix"><h3 style="float: left;">Average Rating (from Amazon.com): </h3><span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:<!-- TMPL_VAR EXPR="amazon_average_rating / 2" -->px"></span></span> <!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
 
         <!-- TMPL_LOOP NAME="AMAZON_CUSTOMER_REVIEWS" -->
             <div class="content_set">
@@ -604,7 +607,7 @@
         <!-- /TMPL_LOOP -->
         <!-- TMPL_ELSE -->
 
-    <p> Sorry, there are no reviews available for this title. <!-- TMPL_IF NAME="isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="amazonisbn" -->&amp;store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="amazonisbn" -->&amp;store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></p>
+    <p> Sorry, there are no reviews available for this title. <!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;store=books" target="_blank">Add your own review</a><!-- TMPL_ELSE --><a href="http://www.amazon.com/gp/customer-reviews/write-a-review.html/002-2970817-7876066?%5Fencoding=UTF8&amp;asin=<!-- TMPL_VAR NAME="normalized_isbn" -->&amp;store=books">Add your own review</a><!-- /TMPL_IF --><!-- /TMPL_IF --></p>
 
         <!-- /TMPL_IF -->
 </div>
@@ -643,13 +646,16 @@
         </a></li><!-- /TMPL_IF -->
 </ul>
 
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="OPACAmazonSimilarItems" --><!-- TMPL_IF NAME="AMAZON_SIMILAR_PRODUCTS" -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonSimilarItems" --><!-- TMPL_IF NAME="AMAZON_SIMILAR_PRODUCTS" -->
 <div id="similars">
 <h4>Similar Items</h4>
 <ul>
 <!-- TMPL_LOOP NAME="AMAZON_SIMILAR_PRODUCTS" -->
 <!-- TMPL_LOOP NAME="similar_biblionumbers" -->
-<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><img alt="" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="ASIN"-->.01._SS50_.jpg" /></a> <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML" --></a> </li>
+<li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><img alt="" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="ASIN"-->.01._SS50_.jpg" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="ASIN"-->/SC.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&amp;type=xw10" alt="" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="HTML" --></a>
 <!-- /TMPL_LOOP -->
 <!-- /TMPL_LOOP -->
 </ul>
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
index 4a9aa0e..687633c 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
@@ -49,11 +49,13 @@ TMPL_ELSE -->Title<!-- /TMPL_UNLESS --></th>
 
 <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="AmazonContent" --><td><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><td><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-    <!-- TMPL_IF NAME="GoogleJackets" --><td><!-- TMPL_IF NAME="amazonisbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="GoogleJackets" --><td><!-- TMPL_IF NAME="normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
 
-    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><td><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><td><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><td><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt=""/></td><!-- /TMPL_IF -->
 
 <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
                     <span class="item-details">
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl
index 4571863..9a07f2a 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl
@@ -172,7 +172,7 @@ $(document).ready(function(){
             <!-- TMPL_ELSE -->
                 <tr>
             <!-- /TMPL_IF -->
-                    <td><!-- TMPL_IF NAME="AmazonContent" -->
+                    <td><!-- TMPL_IF NAME="OPACAmazonEnabled" -->
                         <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_IF NAME="isbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><img src="http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" /><!-- /TMPL_IF -->
                         </a>
                         <!-- TMPL_ELSE -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
index 7d28cf4..6853d0d 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
@@ -223,7 +223,7 @@ $(document).ready(function(){
                         <!-- TMPL_IF name="size" --> <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
                         <!-- TMPL_IF name="timestamp" --> <i>(modified on <!-- TMPL_VAR name="timestamp" -->)</i><!-- /TMPL_IF -->
                 </span>
-                <!-- TMPL_IF NAME="copyrightdate" --><span class="results_summary"><span class="label">Date:</span><!-- TMPL_VAR NAME="copyrightdate" --></span><!-- COinS / OpenURL --><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=<!-- TMPL_VAR NAME="author_nospan" -->&amp;rft.btitle=<!-- TMPL_VAR NAME="title_nospan" ESCAPE="url" -->&amp;rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&amp;rft.tpages=<!-- TMPL_VAR NAME="size" -->&amp;rft.isbn=<!-- TMPL_VAR NAME="isbn"  ESCAPE="url" -->&amp;rft.aucorp=&amp;rft.place=<!-- TMPL_VAR NAME="place" -->&amp;rft.pub=<!-- TMPL_VAR NAME="publisher" ESCAPE="url" -->&amp;rft.edition=<!-- TMPL_VAR NAME="edition" -->&amp;rft.series=<!-- TMPL_VAR NAME="series" -->&amp;rft.genre="></span><!-- /TMPL_IF -->
+                <!-- TMPL_IF NAME="copyrightdate" --><span class="results_summary"><span class="label">Date:</span><!-- TMPL_VAR NAME="copyrightdate" --></span><!-- COinS / OpenURL --><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=<!-- TMPL_VAR NAME="author_nospan" -->&amp;rft.btitle=<!-- TMPL_VAR NAME="title_nospan" ESCAPE="url" -->&amp;rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&amp;rft.tpages=<!-- TMPL_VAR NAME="size" -->&amp;rft.isbn=<!-- TMPL_VAR NAME="normalized_isbn"  ESCAPE="url" -->&amp;rft.aucorp=&amp;rft.place=<!-- TMPL_VAR NAME="place" -->&amp;rft.pub=<!-- TMPL_VAR NAME="publisher" ESCAPE="url" -->&amp;rft.edition=<!-- TMPL_VAR NAME="edition" -->&amp;rft.series=<!-- TMPL_VAR NAME="series" -->&amp;rft.genre="></span><!-- /TMPL_IF -->
 
 				<span class="results_summary">
                 <span class="label">Availability:</span>
@@ -296,13 +296,13 @@ $(document).ready(function(){
 				</span>
 				</td><td>
 					<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
-                    <!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+                    <!-- TMPL_IF NAME="OPACAmazonEnabled" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.TZZZZZZZ.jpg" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-					<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="amazonisbn" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="amazonisbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+					<!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&type=xw10<!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-                    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+                    <!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR name="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
                     </a>
-                    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR name="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR name="clean_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR name="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR name="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+                    <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR name="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR name="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR name="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR name="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
 				</td>
                 </tr>
                 <!-- /TMPL_LOOP -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
index 6a754fd..05e18b8 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
@@ -1,7 +1,7 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Library Home for
 <!-- TMPL_LOOP name="BORROWER_INFO" -->
-    <!-- TMPL_VAR name="firstname" --><!-- TMPL_VAR name="surname" -->
+    <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" -->
 <!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
@@ -200,11 +200,13 @@ $.tablesorter.addParser({
 
 <!-- TMPL_IF NAME="JacketImages" --><td class="jacketcell">
 
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- BakerTaylor needs clean_isbn! --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail"/><!-- /TMPL_IF -->
 
 </td><!-- /TMPL_IF -->
 
@@ -266,12 +268,16 @@ $.tablesorter.addParser({
 <tr>
 <!-- TMPL_IF NAME="JacketImages" --><td class="jacketcell">
 
-<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="amazonisbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="amazonisbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="amazonisbn" -->.01.THUMBZZZ.jpg" alt="" class="thumbnail" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="http://www.amazon.com/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="normalized_isbn" -->.01.THUMBZZZ.jpg" alt="" class="thumbnail" /></a><!-- TMPL_ELSE --><a href="#"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="normalized_isbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="GoogleJackets" --><!-- TMPL_IF NAME="amazonisbn" --><div style="display:block;" title="Click to view in Google Books" class="<!-- TMPL_VAR NAME="amazonisbn" -->" id="gbs-thumbnail<!--TMPL_VAR NAME="__counter__"-->"></div><!-- TMPL_ELSE --><a href="http://books.google.com/books?q=<!-- TMPL_VAR NAME="title" escape="url" -->"><span class="no-image">No cover image available</span></a><!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="SyndeticsCoverImages" --><img src="http://syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/SC.GIF&client=<!-- TMPL_VAR NAME="SyndeticsClientCode" --><!-- TMPL_IF NAME="normalized_upc" -->&upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->&type=xw10" alt="" class="thumbnail"/><!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="clean_isbn" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="clean_isbn" -->" /></a><!-- TMPL_ELSE --><!-- BakerTaylor needs clean_isbn! --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
 </td><!-- /TMPL_IF -->
+
 <td><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> <span class="item-details"><!-- TMPL_VAR NAME="author" --></span></td>
 
 <!-- TMPL_UNLESS NAME="item-level_itypes" --><td><!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR name="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_IF --> <!-- TMPL_VAR name="description" --></td><!-- /TMPL_UNLESS -->
diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index baaef43..3c5c27f 100755
--- a/opac/opac-ISBDdetail.pl
+++ b/opac/opac-ISBDdetail.pl
@@ -51,8 +51,9 @@ use C4::Biblio;
 use C4::Acquisition;
 use C4::Review;
 use C4::Serials;    # uses getsubscriptionfrom biblionumber
-use C4::Koha;       # use getitemtypeinfo
+use C4::Koha;
 use C4::Members;    # GetMember
+use C4::External::Amazon;
 
 my $query = new CGI;
 
@@ -65,6 +66,21 @@ my $tagslib      = &GetMarcStructure( 1, $itemtype );
 my $marcflavour      = C4::Context->preference("marcflavour");
 my $record = GetMarcBiblio($biblionumber);
 
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+    normalized_upc => $upc,
+    normalized_ean => $ean,
+    normalized_oclc => $oclc,
+    normalized_isbn => $isbn,
+);
+
 #coping with subscriptions
 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
 my $dat                 = TransformMarcToKoha( $dbh, $record );
@@ -228,14 +244,9 @@ $template->param(
 
 ## Amazon.com stuff
 #not used unless preference set
-if ( C4::Context->preference("AmazonContent") == 1 ) {
-    use C4::External::Amazon;
-    $dat->{'amazonisbn'} = $dat->{'isbn'};
-    $dat->{'amazonisbn'} =~ s|-||g;
-
-    $template->param( amazonisbn => $dat->{amazonisbn} );
+if ( C4::Context->preference("OPACAmazonEnabled") == 1 ) {
 
-    my $amazon_details = &get_amazon_details( $dat->{amazonisbn}, $record, $marcflavour );
+    my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
 
     foreach my $result ( @{ $amazon_details->{Details} } ) {
         $template->param( item_description => $result->{ProductDescription} );
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 0a46fa7..b2e2129 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -31,7 +31,7 @@ use C4::Items;
 use C4::Circulation;
 use C4::Tags qw(get_tags);
 use C4::Dates qw/format_date/;
-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn get_biblio_from_xisbn);
+use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
 use C4::External::Amazon;
 use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
 use C4::Review;
@@ -188,6 +188,21 @@ foreach ( keys %{$dat} ) {
     $template->param( "$_" => $dat->{$_} . "" );
 }
 
+# some useful variables for enhanced content;
+# in each case, we're grabbing the first value we find in
+# the record and normalizing it
+my $upc = GetNormalizedUPC($record,$marcflavour);
+my $ean = GetNormalizedEAN($record,$marcflavour);
+my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
+my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+
+$template->param(
+	normalized_upc => $upc,
+	normalized_ean => $ean,
+	normalized_oclc => $oclc,
+	normalized_isbn => $isbn,
+);
+
 # COinS format FIXME: for books Only
 my $coins_format;
 my $fmt = substr $record->leader(), 6,2;
@@ -229,44 +244,19 @@ $template->param(
     loggedincommenter   => $loggedincommenter
 );
 
-sub isbn_cleanup ($) {
-	my $isbn=shift;
-    ($isbn) = $isbn =~ /([\d-]*[X]*)/;
-    $isbn =~ s/-//g;
-	if (
-		$isbn =~ /\b(\d{13})\b/ or
-		$isbn =~ /\b(\d{10})\b/ or 
-		$isbn =~ /\b(\d{9}X)\b/i
-	) {
-		return $1;
-	}
-	return undef;
-}
-
 # XISBN Stuff
-my $xisbn=$dat->{'isbn'};
-(my $aisbn) = $xisbn =~ /([\d-]*[X]*)/;
-$aisbn =~ s/-//g;
-$template->param(amazonisbn => $aisbn);		# FIXME: so it is OK if the ISBN = 'XXXXX' ?
-my ($clean,$clean2);
-# these might be overkill, but they are better than the regexp above.
-if ($clean = isbn_cleanup($xisbn)){
-	$template->param(clean_isbn => $clean);
-}
-
 if (C4::Context->preference("OPACFRBRizeEditions")==1) {
     eval {
         $template->param(
-            xisbn => $xisbn,
-            XISBNS => get_xisbns($xisbn)
+            XISBNS => get_xisbns($isbn)
         );
     };
     if ($@) { warn "XISBN Failed $@"; }
 }
 # Amazon.com Stuff
-if ( C4::Context->preference("OPACAmazonContent") == 1 ) {
+if ( C4::Context->preference("OPACAmazonEnabled") && C4::Context->preference("OPACAmazonSimilarItems") ) {
     my $similar_products_exist;
-    my $amazon_details = &get_amazon_details( $xisbn, $record, $marcflavour );
+    my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour );
     my $item_attributes = \%{$amazon_details->{Items}->{Item}->{ItemAttributes}};
     my $customer_reviews = \@{$amazon_details->{Items}->{Item}->{CustomerReviews}->{Review}};
     for my $one_review (@$customer_reviews) {
@@ -292,9 +282,10 @@ if ( C4::Context->preference("OPACAmazonContent") == 1 ) {
 }
 
 my $syndetics_elements;
+
 if ( C4::Context->preference("SyndeticsEnabled") ) {
 	eval {
-    $syndetics_elements = &get_syndetics_index($xisbn);
+    $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc);
 	for my $element (values %$syndetics_elements) {
 		$template->param("Syndetics$element"."Exists" => 1 );
 		#warn "Exists: "."Syndetics$element"."Exists";
@@ -307,7 +298,7 @@ if ( C4::Context->preference("SyndeticsEnabled")
         && C4::Context->preference("SyndeticsSummary")
         && $syndetics_elements->{'SUMMARY'} =~ /SUMMARY/) {
 	eval {
-	my $syndetics_summary = &get_syndetics_summary($xisbn);
+	my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc);
 	$template->param( SYNDETICS_SUMMARY => $syndetics_summary );
 	};
 	warn $@ if $@;
@@ -318,7 +309,7 @@ if ( C4::Context->preference("SyndeticsEnabled")
         && C4::Context->preference("SyndeticsTOC")
         && $syndetics_elements->{'TOC'} =~ /TOC/) {
 	eval {
-    my $syndetics_toc = &get_syndetics_toc($xisbn);
+    my $syndetics_toc = &get_syndetics_toc($isbn,$upc,$oclc);
     $template->param( SYNDETICS_TOC => $syndetics_toc );
 	};
 	warn $@ if $@;
@@ -328,7 +319,7 @@ if ( C4::Context->preference("SyndeticsEnabled")
     && C4::Context->preference("SyndeticsExcerpt")
     && $syndetics_elements->{'DBCHAPTER'} =~ /DBCHAPTER/ ) {
     eval {
-    my $syndetics_excerpt = &get_syndetics_excerpt($xisbn);
+    my $syndetics_excerpt = &get_syndetics_excerpt($isbn,$upc,$oclc);
     $template->param( SYNDETICS_EXCERPT => $syndetics_excerpt );
     };
 	warn $@ if $@;
@@ -337,7 +328,7 @@ if ( C4::Context->preference("SyndeticsEnabled")
 if ( C4::Context->preference("SyndeticsEnabled")
     && C4::Context->preference("SyndeticsReviews")) {
     eval {
-    my $syndetics_reviews = &get_syndetics_reviews($xisbn,$syndetics_elements);
+    my $syndetics_reviews = &get_syndetics_reviews($isbn,$upc,$oclc,$syndetics_elements);
     $template->param( SYNDETICS_REVIEWS => $syndetics_reviews );
     };
 	warn $@ if $@;
@@ -347,7 +338,7 @@ if ( C4::Context->preference("SyndeticsEnabled")
     && C4::Context->preference("SyndeticsAuthorNotes")
 	&& $syndetics_elements->{'ANOTES'} =~ /ANOTES/ ) {
     eval {
-    my $syndetics_anotes = &get_syndetics_anotes($xisbn);
+    my $syndetics_anotes = &get_syndetics_anotes($isbn,$upc,$oclc);
     $template->param( SYNDETICS_ANOTES => $syndetics_anotes );
     };
     warn $@ if $@;
@@ -388,12 +379,11 @@ if (C4::Context->preference("OPACShelfBrowser")) {
         my $sth_get_biblio = $dbh->prepare("SELECT biblio.*,biblioitems.isbn AS isbn FROM biblio LEFT JOIN biblioitems ON biblio.biblionumber=biblioitems.biblionumber WHERE biblio.biblionumber=?");
         $sth_get_biblio->execute($this_item->{biblionumber});
         while (my $this_biblio = $sth_get_biblio->fetchrow_hashref()) {
-            $this_item->{'title'} = $this_biblio->{'title'};
-            if ($clean2 = isbn_cleanup($this_biblio->{'isbn'})) {
-                $this_item->{'isbn'} = $clean2;
-            } else { 
-                $this_item->{'isbn'} = $this_biblio->{'isbn'};
-            }
+			$this_item->{'title'} = $this_biblio->{'title'};
+			my $this_record = GetMarcBiblio($this_biblio->{'biblionumber'});
+			$this_item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
+			$this_item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
+			$this_item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
         }
         unshift @previous_items, $this_item;
     }
@@ -414,11 +404,10 @@ if (C4::Context->preference("OPACShelfBrowser")) {
         $sth_get_biblio->execute($this_item->{biblionumber});
         while (my $this_biblio = $sth_get_biblio->fetchrow_hashref()) {
             $this_item->{'title'} = $this_biblio->{'title'};
-            if ($clean2 = isbn_cleanup($this_biblio->{'isbn'})) {
-                $this_item->{'isbn'} = $clean2;
-            } else { 
-                $this_item->{'isbn'} = $this_biblio->{'isbn'};
-            }
+			my $this_record = GetMarcBiblio($this_biblio->{'biblionumber'});
+            $this_item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
+            $this_item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
+            $this_item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
         }
         push @next_items, $this_item;
     }
@@ -448,14 +437,14 @@ if (C4::Context->preference("BakerTaylorEnabled")) {
 		BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
 	);
 	my ($bt_user, $bt_pass);
-	if ($clean and
+	if ($isbn and
 		$bt_user = C4::Context->preference('BakerTaylorUsername') and
 		$bt_pass = C4::Context->preference('BakerTaylorPassword')    )
 	{
 		$template->param(
 		BakerTaylorContentURL   =>
 		sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
-				$bt_user,$bt_pass,$clean)
+				$bt_user,$bt_pass,$isbn)
 		);
 	}
 }
diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl
index 489e64b..7377c76 100755
--- a/opac/opac-readingrecord.pl
+++ b/opac/opac-readingrecord.pl
@@ -73,13 +73,10 @@ else {
 
 my ( $count, $issues ) = GetAllIssues( $borrowernumber, $order2, $limit );
 
-# add the row parity
-#my $num = 0;
-#foreach my $row (@$issues) {
-#    $row->{'even'} = 1 if $num % 2 == 0;
-#    $row->{'odd'} = 1 if $num % 2 == 1;
-#    $num++;
-#}
+my $borr = GetMemberDetails( $borrowernumber );
+my @bordat;
+$bordat[0] = $borr;
+$template->param( BORROWER_INFO => \@bordat );
 
 my @loop_reading;
 
@@ -90,25 +87,11 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
     }
 	
 	# XISBN Stuff
-	my $xisbn=$issues->[$i]->{'isbn'};
-	$xisbn =~ /(\d*[X]*)/;
-	$line{amazonisbn} = $1;		# FIXME: so it is OK if the ISBN = 'XXXXX' ?
-	my ($clean, $amazonisbn);
-	$amazonisbn = $1;
-	# these might be overkill, but they are better than the regexp above.
-	if (
-		$amazonisbn =~ /\b(\d{13})\b/ or
-		$amazonisbn =~ /\b(\d{10})\b/ or 
-		$amazonisbn =~ /\b(\d{9}X)\b/i
-	) {
-		$clean = $1;
-		$line{clean_isbn} = $1;
-	}
-	
+	my $isbn = GetNormalizedISBN($issues->[$i]->{'isbn'});
+	$line{normalized_isbn} = $isbn;
     $line{biblionumber}   = $issues->[$i]->{'biblionumber'};
     $line{title}          = $issues->[$i]->{'title'};
     $line{author}         = $issues->[$i]->{'author'};
-    $line{isbn}           = $issues->[$i]->{'isbn'};
     $line{itemcallnumber} = $issues->[$i]->{'itemcallnumber'};
     $line{date_due}       = format_date( $issues->[$i]->{'date_due'} );
     $line{returndate}     = format_date( $issues->[$i]->{'returndate'} );
@@ -136,7 +119,7 @@ BEGIN {
 	}
 }
 
-for(qw(AmazonContent GoogleJackets)) {	# BakerTaylorEnabled handled above
+for(qw(AmazonCoverImages GoogleJackets)) {	# BakerTaylorEnabled handled above
 	C4::Context->preference($_) or next;
 	$template->param($_=>1);
 	$template->param(JacketImages=>1);
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index c973bc0..3a4c616 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -431,17 +431,6 @@ for (my $i=0;$i<=@servers;$i++) {
 										limit=>$tag_quantity });
 			}
 		}
-		foreach (@newresults) {
-			my $clean = $_->{isbn} or next;
-			unless (
-				$clean =~ /\b(\d{13})\b/ or
-				$clean =~ /\b(\d{10})\b/ or 
-				$clean =~ /\b(\d{9}X)\b/i
-			) {
-				next;
-			}
-			$_ ->{'clean_isbn'} = $1;
-		}
         $total = $total + $results_hashref->{$server}->{"hits"};
         ## If there's just one result, redirect to the detail page
         if ($total == 1) {         
diff --git a/opac/opac-user.pl b/opac/opac-user.pl
index 807fdbf..fe8179e 100755
--- a/opac/opac-user.pl
+++ b/opac/opac-user.pl
@@ -35,10 +35,10 @@ use C4::Branch; # GetBranches
 my $query = new CGI;
 
 BEGIN {
-	if (C4::Context->preference('BakerTaylorEnabled')) {
-		require C4::External::BakerTaylor;
-		import C4::External::BakerTaylor qw(&image_url &link_url);
-	}
+    if (C4::Context->preference('BakerTaylorEnabled')) {
+        require C4::External::BakerTaylor;
+        import C4::External::BakerTaylor qw(&image_url &link_url);
+    }
 }
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
@@ -100,7 +100,7 @@ my @overdues;
 my @issuedat;
 my $itemtypes = GetItemTypes();
 foreach my $issue ( @issue_list ) {
-	if($count%2 eq 0){ $issue->{'toggle'} = 1; } else { $issue->{'toggle'} = 0; }
+    if($count%2 eq 0){ $issue->{'toggle'} = 1; } else { $issue->{'toggle'} = 0; }
     # check for reserves
     my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} );
     if ( $restype ) {
@@ -126,7 +126,7 @@ foreach my $issue ( @issue_list ) {
 
     # check if item is renewable
     my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
-	($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
+    ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
 
     $issue->{'status'} = $status;
 
@@ -147,23 +147,9 @@ foreach my $issue ( @issue_list ) {
     $issue->{date_due} = format_date($issue->{date_due});
     push @issuedat, $issue;
     $count++;
-	
-		# XISBN Stuff
-	my $xisbn=$issue->{'isbn'};
-	$xisbn =~ /(\d*[X]*)/;
-	$issue->{amazonisbn} = $1;		# FIXME: so it is OK if the ISBN = 'XXXXX' ?
-	my ($clean, $amazonisbn);
-	$amazonisbn = $1;
-	# these might be overkill, but they are better than the regexp above.
-	if (
-		$amazonisbn =~ /\b(\d{13})\b/ or
-		$amazonisbn =~ /\b(\d{10})\b/ or 
-		$amazonisbn =~ /\b(\d{9}X)\b/i
-	) {
-		$clean = $1;
-		$issue->{clean_isbn} = $1;
-	}
-	
+    
+    my $isbn = GetNormalizedISBN($issue->{'isbn'});
+    $issue->{normalized_isbn} = $isbn;
 }
 
 $template->param( ISSUES       => \@issuedat );
@@ -196,9 +182,9 @@ foreach my $res (@reserves) {
     $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
     my $biblioData = GetBiblioData($res->{'biblionumber'});
     $res->{'reserves_title'} = $biblioData->{'title'};
-	if ($OPACDisplayRequestPriority) {
-		$res->{'priority'} = '' if $res->{'priority'} eq '0';
-	}
+    if ($OPACDisplayRequestPriority) {
+        $res->{'priority'} = '' if $res->{'priority'} eq '0';
+    }
 }
 
 # use Data::Dumper;
@@ -225,9 +211,9 @@ foreach my $res (@reserves) {
             $res->{'wait'}= 1; 
             $res->{'holdingbranch'}=$item->{'holdingbranch'};
             $res->{'biblionumber'}=$item->{'biblionumber'};
-            $res->{'barcodenumber'}	= $item->{'barcode'};
+            $res->{'barcodenumber'} = $item->{'barcode'};
             $res->{'wbrcode'} = $res->{'branchcode'};
-            $res->{'itemnumber'}	= $res->{'itemnumber'};
+            $res->{'itemnumber'}    = $res->{'itemnumber'};
             $res->{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'};
             if($res->{'holdingbranch'} eq $res->{'wbrcode'}){
                 $res->{'atdestination'} = 1;
@@ -257,27 +243,28 @@ foreach ( @$alerts ) {
 }
 
 if (C4::Context->preference('BakerTaylorEnabled')) {
-	$template->param(
-		BakerTaylorEnabled  => 1,
-		BakerTaylorImageURL => &image_url(),
-		BakerTaylorLinkURL  => &link_url(),
-		BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
-	);
+    $template->param(
+        BakerTaylorEnabled  => 1,
+        BakerTaylorImageURL => &image_url(),
+        BakerTaylorLinkURL  => &link_url(),
+        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
+    );
 }
 
-if (C4::Context->preference("AmazonContent"     ) or 
-	C4::Context->preference("GoogleJackets"     ) or
-	C4::Context->preference("BakerTaylorEnabled")   ) {
-		$template->param(JacketImages=>1);
+if (C4::Context->preference("OPACAmazonCoverImages") or 
+    C4::Context->preference("GoogleJackets") or
+    C4::Context->preference("BakerTaylorEnabled") or
+	C4::Context->preference("SyndeticsCoverImages")) {
+        $template->param(JacketImages=>1);
 }
 
 $template->param(
     waiting_count      => $wcount,
     textmessaging      => $borr->{textmessaging},
-	patronupdate => $patronupdate,
-	OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
-	userview => 1,
-	dateformat    => C4::Context->preference("dateformat"),
+    patronupdate => $patronupdate,
+    OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
+    userview => 1,
+    dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
-- 
1.5.6.5



More information about the Koha-patches mailing list