Bugzilla – Attachment 62921 Details for
Bug 4460
Amazon's AssociateID tag not used in links so referred revenue lost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost
SIGNED-OFF-Bug-4460-Amazons-AssociateID-tag-not-us.patch (text/plain), 11.95 KB, created by
Katrin Fischer
on 2017-05-01 15:13:02 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-05-01 15:13:02 UTC
Size:
11.95 KB
patch
obsolete
>From edf8097851eee25684a8680d4f325c849bc1c5c3 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 21 Jun 2016 14:49:32 -0400 >Subject: [PATCH] [SIGNED OFF] Bug 4460: Amazon's AssociateID tag not used in > links so referred revenue lost >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Reworking based on output of: >git grep "gp\/reader" >Additionally, some changes might be in order though gp/reader works. >https://affiliate-program.amazon.com/help/topic/t64/a1 >suggests using dp >A dp was discovered, so that part of the URL was left unchanged. >The "/ref..." part was changed to just an Amazon tag ("?tag={AAT}") >if defined. > >TEST PLAN >--------- > 1) Added: > "100 years of Canadian foreign policy / > edited by Robert Bothwell and Jean Daudelin." > 2) Added a second book with the word foreign in the title. > 3) Waited for reindex > 4) Checked out the Canadian foreign policy book. > 5) Applied patch > 6) Made sure that: > - AmazonAssocTag was set to TEST (easy to notice) > - AmazonCoverImages was set to 'Show' > - OPACAmazonCoverImages was set to 'Show' > 7) Searched intranet for 'foreign' to find the detail page > -- hovering over picture shows URL with ?tag=TEST in it. > 8) Went to the OPAC Detail page > 9) Toggling OPACURLOpenInNewWindow, confirmed that URL for > the picture contained ?tag=TEST in it. >10) Logged into the OPAC >11) Confirmed the URL in the checked out list on your summary > page contained ?tag=TEST in it. >12) Confirmed the URL in the checked out list on your reading > history page contained ?tag=TEST in it. >13) Confirmed links worked (went to expected page) >14) run koha qa test tools > >Followed test plan. Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 12 +++++++++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 9 +++++++-- > .../opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 8 +++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 10 ++++++++-- > 4 files changed, 31 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 31f7723..e59fbae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -4,6 +4,12 @@ > [% USE Branches %] > [% USE Biblio %] > >+[% IF Koha.Preference('AmazonAssocTag') %] >+ [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >+[% ELSE %] >+ [% AmazonAssocTag = '' %] >+[% END %] >+ > [% ShowCourseReserves = 0 %] > [% IF UseCourseReserves %] > [% FOREACH item IN itemloop %] >@@ -434,7 +440,7 @@ function verify_images() { > [% END %] > [% IF ( AmazonCoverImages ) %] > <div id="amazon-bookcoverimg"> >- <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> >+ <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %][% AmazonAssocTag %]#reader-link"> > <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> > </a></div> > [% END %] >@@ -508,7 +514,7 @@ function verify_images() { > [% END %] > [% IF ( AmazonCoverImages ) %] > <div id="amazon-bookcoverimg"> >- <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> >+ <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %][% AmazonAssocTag %]#reader-link"> > <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> > </a> > </div> >@@ -1045,7 +1051,7 @@ function verify_images() { > [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %] > <div id="editions"><h4>Editions</h4> > <table> >-[% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %] >+[% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn %][% AmazonAssocTag %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %] > [% UNLESS ( item_level_itypes ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description %][% ELSE %]<img src="[% XISBN.imageurl %]" alt="[% XISBN.description %]" title="[% XISBN.description %]">[% END %]</td>[% END %] > <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber %]">[% XISBN.title |html %]</a> by [% XISBN.author | html %] ©[% XISBN.copyrightdate %] > [% IF ( XISBN.publishercode ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index b5066fe..e651b51 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -5,6 +5,11 @@ > [% USE AuthorisedValues %] > [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %] > [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %] >+[% IF Koha.Preference('AmazonAssocTag') %] >+ [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >+[% ELSE %] >+ [% AmazonAssocTag = '' %] >+[% END %] > > [% ShowCourseReservesHeader = 0 %] > [% IF Koha.Preference( 'UseCourseReserves' ) == 1 %] >@@ -55,9 +60,9 @@ > [% END %] > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( OPACURLOpenInNewWindow ) %] >- <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank" rel="noreferrer"> >+ <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %][% AmazonAssocTag %]#reader-link" target="_blank" rel="noreferrer"> > [% ELSE %] >- <a href="http://www.amazon[% AmazonTld %]/dp/[% normalized_isbn %]"> >+ <a href="http://www.amazon[% AmazonTld %]/dp/[% normalized_isbn %][% AmazonAssocTag %]"> > [% END %] > <img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="Cover image" /></a> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 86b0923..4647001 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -10,6 +10,12 @@ > [% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %] > [% INCLUDE 'masthead.inc' %] > >+[% IF Koha.Preference('AmazonAssocTag') %] >+ [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >+[% ELSE %] >+ [% AmazonAssocTag = '' %] >+[% END %] >+ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >@@ -89,7 +95,7 @@ > <td> > [% IF OPACAmazonCoverImages %] > [% IF issue.normalized_isbn %] >- <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a> >+ <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn %][% AmazonAssocTag %]#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a> > [% ELSE %] > <span class="no-image">No cover image available</span> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index cded80d..db24c95 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -15,6 +15,12 @@ > [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %] > [% INCLUDE 'masthead.inc' %] > >+[% IF Koha.Preference('AmazonAssocTag') %] >+ [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >+[% ELSE %] >+ [% AmazonAssocTag = '' %] >+[% END %] >+ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >@@ -197,7 +203,7 @@ Using this account is not recommended because some parts of Koha will not functi > > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( ISSUE.normalized_isbn ) %] >- <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail"/></a> >+ <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn %][% AmazonAssocTag %]#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail"/></a> > [% ELSE %] > <a href="#"><span class="no-image">No cover image available</span></a> > [% END %] >@@ -467,7 +473,7 @@ Using this account is not recommended because some parts of Koha will not functi > <td class="jacketcell"> > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( OVERDUE.normalized_isbn ) %] >- <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail" /></a> >+ <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %][% AmazonAssocTag %]#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail" /></a> > [% ELSE %] > <a href="#"><span class="no-image">No cover image available</span></a> > [% END %] >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4460
:
2165
|
10024
|
10110
|
10600
|
10686
|
52670
|
54746
|
57688
|
60127
|
62921
|
62922
|
63328