[CDB] Amazon Affiliate

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Amazon Affiliate

Post by HiFiKabin » Thu May 26, 2016 8:12 am

Glad that was an easy fix.

Swanny
Registered User
Posts: 444
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: [RC] Amazon Affiliate

Post by Swanny » Sat Jun 11, 2016 8:29 pm

This is so weird. I have this installed on 5 forums, 2 run with the latest version no problem. Two don't run using the latest version but if I use 1.0.0_rc4 they work fine. Very strange.

Update: I did a test. I updated to the latest 1.0.3_rc1 but I realized it could take a while to add the tracking code. On one site it takes like 2 minutes for the code to append to the URL. How can I fix that? Technically it adds the code but not right away like it did under 1.0.0_rc4.

Update: So I tested another amazon link and in Chrome it took 30 seconds for the tracking code to add itself. Then I tested the same page in Firefox and waited 2 mins and it never added the code. So strange. Do you have any ideas why it would be that way?

Swanny
Registered User
Posts: 444
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: [RC] Amazon Affiliate

Post by Swanny » Sat Jun 11, 2016 9:33 pm

OK so here's an update to my other update. Using the latest code, I've found I can duplicate the issues as follows:
- affiliate code is not appended for at least 30 seconds using Chrome
- affiliate code is not appended seemingly at all on Firefox
- if I switch to another tab and switch back the code is pretty much always there regardless of browser or how much time has passed

Everything worked fine before on 1.0.0_rc3 no problems at all.

So... why would switching tabs in the browser cause everything to magically work right all the time? When others visit the site and click the links, they don't know to click to another tab and come back right away, so the loss of affiliate revenue will happen very often.

Swanny
Registered User
Posts: 444
Joined: Sun Apr 14, 2002 2:11 am
Location: Canada

Re: [RC] Amazon Affiliate

Post by Swanny » Sun Jun 12, 2016 12:27 am

p.s. I've had some folks post links to smile.amazon.com recently. Does the latest version of the extension support that URL? I'm having issues with the affiliate ID being added on that forum so I can't really tell.

Here's an example of one posted today https://smile.amazon.com/Pioneer-AVH-X3 ... VS2Y1PYQ2J

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [RC] Amazon Affiliate

Post by HiFiKabin » Sun Jun 12, 2016 9:06 am

1) FF is my default browser and I haven't had any problems with the affiliate code appearing. Maybe its a FF add on issue? Try it with all add ons disabled to check.

2) I haven't tried it in Chrome, so can't comment

3) I have just tried it with smile.amazon and it works in my test environment.

Image

4) I have experiences slow loading on the first version of my timezone ext in its first loading so I suspect it how javascript is handled in some situations.

5) The basic code has changed a lot since rc3, but if that worked for you with just .com and .co.uk domains it is perfectly safe to return to that version with the proviso that that version does not strip existing affiliate codes. There are no known security issues with rc3

6) I am still looking for a better script to use as the core of this extension, but so far its proving hard to get what I would really like. (I am less of a coder, more of a hacker. In the best possible way of course :lol: )

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.1][3.2][RC] Amazon Affiliate

Post by HiFiKabin » Mon Jan 16, 2017 11:05 am

1.0.3_RC4 now available.

s9e/mediaembed users must read this

Update from previous version:
  • Download the latest release and unzip it.
  • Disable Amazon Affiliate in the ACP
  • Delete amazonaffiliate folder from the server
  • Upload the folder hifikabin to root/ext/ and enable it in the ACP

MaFeSa
Registered User
Posts: 174
Joined: Wed Feb 11, 2009 7:48 am

Re: [3.1][3.2][RC] Amazon Affiliate

Post by MaFeSa » Mon Jan 16, 2017 9:25 pm

Thanks 👍

User avatar
JoshyPHP
Code Contributor
Posts: 1006
Joined: Mon Jul 11, 2011 12:28 am

Re: [3.1][3.2][RC] Amazon Affiliate

Post by JoshyPHP » Mon Jan 16, 2017 9:53 pm

HiFiKabin wrote:
Mon Jan 16, 2017 11:05 am
s9e/mediaembed users must read this
The Amazon embed uses template parameters to configure Amazon affiliate tags. Listen to core.text_formatter_s9e_renderer_setup and run something like that:

Code: Select all

$event['renderer']->get_renderer()->setParameters([
	'AMAZON_ASSOCIATE_TAG'    => '',
	'AMAZON_ASSOCIATE_TAG_CA' => '',
	'AMAZON_ASSOCIATE_TAG_DE' => '',
	'AMAZON_ASSOCIATE_TAG_ES' => '',
	'AMAZON_ASSOCIATE_TAG_FR' => '',
	'AMAZON_ASSOCIATE_TAG_IT' => '',
	'AMAZON_ASSOCIATE_TAG_JP' => '',
	'AMAZON_ASSOCIATE_TAG_UK' => ''
]);
The first one is for amazon.com, the rest is for their respective TLD.
I wrote the thing that does BBCodes in 3.2.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.1][3.2][RC] Amazon Affiliate

Post by HiFiKabin » Tue Jan 17, 2017 9:55 am

JoshyPHP wrote:
Mon Jan 16, 2017 9:53 pm
HiFiKabin wrote:
Mon Jan 16, 2017 11:05 am
s9e/mediaembed users must read this
The Amazon embed uses template parameters to configure Amazon affiliate tags. Listen to core.text_formatter_s9e_renderer_setup and run something like that:

Code: Select all

$event['renderer']->get_renderer()->setParameters([
	'AMAZON_ASSOCIATE_TAG'    => '',
	'AMAZON_ASSOCIATE_TAG_CA' => '',
	'AMAZON_ASSOCIATE_TAG_DE' => '',
	'AMAZON_ASSOCIATE_TAG_ES' => '',
	'AMAZON_ASSOCIATE_TAG_FR' => '',
	'AMAZON_ASSOCIATE_TAG_IT' => '',
	'AMAZON_ASSOCIATE_TAG_JP' => '',
	'AMAZON_ASSOCIATE_TAG_UK' => ''
]);
The first one is for amazon.com, the rest is for their respective TLD.
Thanks, I'll have a look into that when the brain has recharged

alcaina7
Registered User
Posts: 1
Joined: Thu Jan 26, 2017 7:50 am

Re: [3.1][3.2][RC] Amazon Affiliate

Post by alcaina7 » Thu Jan 26, 2017 7:52 am

¿Is it working well on 3.2?

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.1][3.2][RC] Amazon Affiliate

Post by HiFiKabin » Thu Jan 26, 2017 11:59 am

alcaina7 wrote:
Thu Jan 26, 2017 7:52 am
¿Is it working well on 3.2?
Yes, the demo board is 3.2.0 and works correctly

https://phpbb.hifikabin.me.uk/viewtopic.php?f=15&t=57

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.1][3.2][RC] Amazon Affiliate

Post by HiFiKabin » Tue Mar 07, 2017 4:01 pm

1.0.4_RC1 now available.

s9e/mediaembed users must read this

Update from previous version:
  • Download the latest release and unzip it.
  • Disable Amazon Affiliate in the ACP
  • Delete amazonaffiliate folder from the server
  • Upload the folder hifikabin to root/ext/ and enable it in the ACP
Still to implement -> viewtopic.php?p=14618131#p14618131

rockmartin
Registered User
Posts: 28
Joined: Tue Apr 26, 2016 7:00 am

Re: [RC] Amazon Affiliate

Post by rockmartin » Tue Jun 27, 2017 12:13 pm

Swanny wrote:
Sat Jun 11, 2016 9:33 pm
OK so here's an update to my other update. Using the latest code, I've found I can duplicate the issues as follows:
- affiliate code is not appended for at least 30 seconds using Chrome
- affiliate code is not appended seemingly at all on Firefox
- if I switch to another tab and switch back the code is pretty much always there regardless of browser or how much time has passed

Everything worked fine before on 1.0.0_rc3 no problems at all.

So... why would switching tabs in the browser cause everything to magically work right all the time? When others visit the site and click the links, they don't know to click to another tab and come back right away, so the loss of affiliate revenue will happen very often.
I have the same problem with my Bord (phpBB 3.1.10) on the latest version (1.0.4_RC1)
Any solutions?

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3998
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.1][3.2][RC] Amazon Affiliate

Post by HiFiKabin » Tue Jun 27, 2017 3:14 pm

I am sorry but I had forgotten all about this. Can you try this.

Download and unzip the attached.

Disable the extension, upload the folder to replace the existing template directory of the extension, then enable and test.

It is working perfectly locally and on my test forum.

https://www.dropbox.com/s/wr0u0xk81cxsj ... e.zip?dl=0

rockmartin
Registered User
Posts: 28
Joined: Tue Apr 26, 2016 7:00 am

Re: [3.1][3.2][RC] Amazon Affiliate

Post by rockmartin » Wed Jun 28, 2017 5:21 am

Hi HiFiKabin, thank you, now it works perfectly. What have you changed now?

Locked

Return to “Extensions in Development”