---- Reported by matted-34813@mypacks.net 2010-05-06 14:43:33 ---- Though koha enables usage of Amazon's AssociateID tag, in the enhanced content configuration. No code currently uses it when generating links to Amazon. Thus if a person searching the catalog clicks on a link taking them to Amazon for a purchase, Amazon doesn't have the tag and cannot associate the account accordingly. Thus, any possible revenue is lost. Places where the tag might be able to be appended: - When viewing the item details, the book cover art link might be able to have the tag appended. - The same might be true for other Amazon related links that koha generates. See: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=636 for more info to help integrate. Usually &tag= with the associate id following it is what is needed, but further investigation will be needed. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:27 UTC --- This bug was previously known as _bug_ 4460 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4460 Actual time not defined. Setting to 0.0 The original reporter of this bug does not have an account here. Reassigning to the person who moved it here: chris@bigballofwax.co.nz. Previous reporter was matted-34813@mypacks.net. Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Created attachment 2165 [details] [review] probably fix for this issue, hard to test fully
Patch add tag value to the Amazon reader URL. I was unable to find any documentation relating to passing the tag in there. The normal method uses the product page. I suspect it will work. But, needs testing. Worst case is it's merely harmless and doesn't solve the problem of money not changing hands. I couldn't figure out what "The same might be true for other Amazon related links that koha generates." relates to. I was unable to find a similar Amazon link in the templates. So, nothing done to address that.
Does not apply: Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y Applying bug 4460 : - Amazon's AssociateID tag not used in links so referred revenue lost error: patch failed: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl:413 error: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl: patch does not apply Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merged C4/Auth.pm Auto-merged C4/External/Amazon.pm Auto-merged koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl Auto-merged koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl Auto-merged koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl Auto-merged koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl Failed to merge in the changes. Patch failed at 0001. When you have resolved this problem run "git-am -i -3 --resolved". If you would prefer to skip this patch, instead run "git-am -i -3 --skip". nengard@debian:~/kohaclone$
Created attachment 10024 [details] [review] Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue lost Rewrite of patch authored by Reed Wade <reed@catalyst.net.nz>
Created attachment 10110 [details] [review] Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue lost Rewrite of patch authored by Reed Wade <reed@catalyst.net.nz> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Typos and scoping issues: Scoping: global variable is locally scoped: XISBN.AmazonAssocTag Typo: READING>RECOR instead of READING_RECOR Easy fixes, but Failed QA until such is done.
Created attachment 10600 [details] [review] Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue lost - Followup
Created attachment 10686 [details] [review] Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue lost - Followup Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> All works properly as far as I can tell.
(In reply to comment #8) > Created attachment 10686 [details] [review] > Bug 4460 - Amazon's AssociateID tag not used in links so referred revenue > lost - Followup > > Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> > All works properly as far as I can tell. QA comments... passing QA, looks good all templates pass 'prove ./xt/tt_valid.t' test OK
I can't test the patch (no AmazonAssocTag), but it looks correct
This breaks the opac-user.tt template. Resulting in an internal server error. Software error: Template process failed: file error - parse error - /home/chrisc/git/catalyst-koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt line 214: unexpected token (ELSE) [% ELSE %] at /home/chrisc/git/catalyst-koha/C4/Templates.pm line 127. The tests of course pick this up not ok 672 - /home/chrisc/git/catalyst-koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt # Failed test '/home/chrisc/git/catalyst-koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt' # at xt/author/valid-templates.t line 62. # file error - parse error - /home/chrisc/git/catalyst-koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt line 214: unexpected token (ELSE) # [% ELSE %] Which is why we should always run the tests before we push! This needs to be reverted or a follow up pushed ASAP. OPAC logins currently broken
(In reply to comment #11) > This needs to be reverted or a follow up pushed ASAP. OPAC logins currently > broken I've reverted the patch on master too, it a bug that is really a BLO for anyone wanting to test/work on OPAC
Not only is this failed QA, but a full rewrite is needed to deal with with deprecation of the prog theme.
Mark, I think "Failed QA" is a stronger status than "Patch doesn't apply" - which normally just means that a rebase is needed. I'd prefer "Failed QA" in the cases where there were issues with the patch too.
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
Created attachment 52670 [details] [review] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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 "?tag={AAT}&ref..." 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 NOTE: Obsoleted old ones.
I tested and got follwoing results: Staff client - detail page: http://www.amazon.com/gp/reader/3257217358?tag=TEST&ref=sib_dp_pt/002-7879865-0184864#reader-link OPAC: Detail page: http://www.amazon.com/dp/3907142330?tag=TEST& Checked out: http://www.amazon.com/gp/reader/3907142330?tag=TEST&ref=sib_dp_pt/002-7879865-0184864#reader-link Reading history: http://www.amazon.com/gp/reader/3907142330?tag=TEST&ref=sib_dp_pt/002-7879865-0184864#reader-link Fazit: tag=TEST& added to all links, but on OPAC detail page the reminder of the link is missing.
(In reply to Marc Véron from comment #17) > Fazit: tag=TEST& added to all links, but on OPAC detail page the reminder of > the link is missing. Sucky. Will attempt to fix.
(In reply to Marc Véron from comment #17) > I tested and got following results: > OPAC: > Detail page: > http://www.amazon.com/dp/3907142330?tag=TEST& Missing ref=sib_dp_pt/002-7879865-0184864 is not the issue. The issue is the dangling ampersand. Though if you really think that adding the ref portion is the correct course of action, I could do that. What say you, Marc?
(In reply to M. Tompsett from comment #19) > (In reply to Marc Véron from comment #17) > > I tested and got following results: > > OPAC: > > Detail page: > > http://www.amazon.com/dp/3907142330?tag=TEST& > > Missing ref=sib_dp_pt/002-7879865-0184864 is not the issue. The issue is the > dangling ampersand. Though if you really think that adding the ref portion > is the correct course of action, I could do that. What say you, Marc? I did some research, it seems that http://www.amazon.com/dp/3907142330?tag=TEST will be OK. Trailing & is superfluous. It seems to do no harm but can we remove it anyway?
(In reply to Marc Véron from comment #20) > (In reply to M. Tompsett from comment #19) > > (In reply to Marc Véron from comment #17) > > > I tested and got following results: > > > OPAC: > > > Detail page: > > > http://www.amazon.com/dp/3907142330?tag=TEST& > > > > Missing ref=sib_dp_pt/002-7879865-0184864 is not the issue. The issue is the > > dangling ampersand. Though if you really think that adding the ref portion > > is the correct course of action, I could do that. What say you, Marc? > > I did some research, it seems that > http://www.amazon.com/dp/3907142330?tag=TEST will be OK. Trailing & is > superfluous. It seems to do no harm but can we remove it anyway? Re-tested with full test plan. Dangling ampersand does no harm. Will sign off.
Created attachment 54746 [details] [review] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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 "?tag={AAT}&ref..." 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>
I am not a real fan of the dangling '&' - instead of fixing it, does someone know of the ref parameter is required? It appears to be hardcoded to ref=sib_dp_pt/002-7879865-0184864, but links also appear to work without it?
It looks like Reed Wade removed the ref parameter in the first attempt to fix this bug: https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10024 Wasn't able to find out when and why it was added.
I ended up way back... where no bug numbers and explanations exist.
I searched for documentation up and down last night - didn't come up with much. We don't have a 'please give feedback' status - so I am setting 'Failed QA', please take a look and consider/comment.
(In reply to Katrin Fischer from comment #26) > I searched for documentation up and down last night - didn't come up with > much. > > We don't have a 'please give feedback' status - so I am setting 'Failed QA', > please take a look and consider/comment. My guess, and I'm assuming Amazon would be able to tell us, is that ref=... means that is the page it came from. In terms of generating revenue, I'm guessing that not just the tag but the ref is also paid. Only Amazon would know. And their documentation is not easily searched through.
I am not persuaded that the ref is really an important part - and if you are paid by it it would be interesting to know what our hardcoded value means. No mention of the ref parameter: https://affiliate-program.amazon.com/help/operating/linking https://affiliate-program.amazon.com/help/topic/t64/a1
So, Katrin, how are we fixing this?
My research suggests that the ref parameter is not needed - we could remove it and that would also solve the dangling & problem.
Created attachment 57688 [details] [review] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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>
I put this to "Needs Signoff" in case, Marc should retest it.
Created attachment 60127 [details] Error message on Amazon I tested some weeks ago and now again, the link to Amazon leads to an error message (see screenshot). Tested from Intranet detail page with "100 years of Canadian foreign policy / edited by Robert Bothwell and Jean Daudelin." Link to Amazon is: https://www.amazon.com/gp/reader/0773534342?tag=TEST#reader-link
Created attachment 62921 [details] [review] [SIGNED OFF] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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>
Created attachment 62922 [details] [review] [SIGNED OFF] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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.83@web.de>
(In reply to Marc Véron from comment #33) > Created attachment 60127 [details] > Error message on Amazon > > I tested some weeks ago and now again, the link to Amazon leads to an error > message (see screenshot). > Tested from Intranet detail page with "100 years of Canadian foreign policy > / edited by Robert Bothwell and Jean Daudelin." > Link to Amazon is: > https://www.amazon.com/gp/reader/0773534342?tag=TEST#reader-link Hm, I see the same problem without this patch as well - I think Amazon might have changed something. To me this appears to happen, when we have #reader-link attached and there is no 'reader link' (preview feature) available for the article on Amazon. Something else I noticed is that we open the Amazon page in the same tab, for external sources, it's better to always open in a new tab. Should we take those 2 issues to a new bug? I've signed off on those patches for fixing the problem with the AssociateID.
Created attachment 63328 [details] [review] Bug 4460: Amazon's AssociateID tag not used in links so referred revenue lost 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.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.05, thanks Mark!
This patch has been pushed to 16.11.x and will be in 16.11.08. Always glad to see this 4 digit bug numbers resolved.
Pushed to 3.22.x for 3.22.21
Pushed to 16.05.x, for 16.05.13 release