1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Amazon.com Affiliate Direct to Cart Auto Embed [Deleted]

Discussion in 'Add-on Releases' started by Chris D, Jun 8, 2012.

  1. Chris D

    Chris D XenForo Developer Staff Member

    Yorick submitted a new resource:

    Amazon.com Affiliate Direct to Cart Auto Embed (version 1.3) - Automatically convert Amazon.com URLs into affiliate links with 90 day cookies

    Read more about this resource...
    RobinHood and TheVisitors like this.
  2. Kevin

    Kevin Well-Known Member

    Will this change existing affiliate IDs in posted links to the one specified in the ACP?

    (And, yes, I mean in new posts going forward, no expectation of already posted links. ;))
  3. Chris D

    Chris D XenForo Developer Staff Member

    Any new posts containing Amazon.com links will contain the affiliate ID from the one specified in the ACP.

    As this is set up as a "media site" (just like YouTube and Vimeo etc.) XenForo will convert the links to something like this: [media=amazon]productcode[/media].

    That won't happen to existing links (as you've pointed out) unless someone edits the post and saves it again. As the post contains the URL formatted as above, I believe that if the affiliate ID changes in the future, any past links that are in this format [media=amazon]productcode[/media] actually will get updated automatically.
  4. Kevin

    Kevin Well-Known Member

    Ah, nice method of dealing with it!
    Yorick likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    I have an idea too that might be able to get it to work for all Amazon.com links you already have...

    There's an add-on by Kier called "Replace in Posts".

    Technically, it should be possible to find all references of an Amazon.com link on your site, extract the product ID and format it in the correct format for this add-on [media=amazon]productcode[/media].

    I'd just need to work out what the correct regular expression is to find these links and convert them to the right format.
  6. Andy.N

    Andy.N Well-Known Member

    it also means this can be used with the other URL rewriter addon :)
  7. principia

    principia Well-Known Member

    Nice Addon, but i need it for Amazon.de :whistle:
    bogus likes this.
  8. Crazyfruitbat

    Crazyfruitbat Well-Known Member

    Yeah this looks like a great addon. I think one thing I have always wanted with these type of systems is to have it multi-region. I have accounts for UK and USA so I'd love to be able to have a system like this and plug both amazon stores in but somehow show only amazon.com links in the US and amazon.co.uk like in the uk.

    I don't know if that is even possible - just me thinking out loud :whistle:
  9. Chris D

    Chris D XenForo Developer Staff Member

    It's a good idea.

    I am actually just about to release an update that supports Amazon.de and Amazon.co.uk.

    It will allow you to input your .com and .co.uk affiliate ID (and .de in this version) but if someone posts a .com link it will appear as .com for everyone, regardless of what country they're browsing in.

    Unfortunately getting the links to display in the region of your visitor is theoretically possible - but the problem is what if an Amazon.com product doesn't exist on Amazon.co.uk?
    Crazyfruitbat and principia like this.
  10. Chris D

    Chris D XenForo Developer Staff Member

    Yorick updated Amazon.com Affiliate Direct to Cart Auto Embed with a new update entry:

    Adds support for Amazon.co.uk and Amazon.de links

    Read the rest of this update entry...
  11. Andy.N

    Andy.N Well-Known Member

    Would it possible to update the addon so that it will work with this format
    [URL='http://www.amazon.com/gp/product/0470580844']Reminiscences of a Stock Operator (Wiley Investment Classics)[/URL]
    That is the member first enter the title of the book Reminiscences of a Stock Operator (Wiley Investment Classics) and then highlight it and add url to it.
    In this case, your addon won't need to pull the title but just change the link.
  12. Chris D

    Chris D XenForo Developer Staff Member

    Hi Andy.N,

    No it can't work like that, unfortunately.

    You could kind of describe it as a bit of a conflict of interests between BB Code Media Sites and BB Code.

    BB Code Media sites' job is to convert a standard URL into a BB Code of this format: [media=Amazon]productcode[/media] and then the BB Code job is to take a BB Code and convert it into whatever it's supposed to be converted into.
  13. Andy.N

    Andy.N Well-Known Member

    Ah, got it.
    I also run into a 10 max media limit per post. I have a post with 100+ amazon links
  14. Chris D

    Chris D XenForo Developer Staff Member

    You can change that limit in the Admin CP, but 100+ Amazon links concerns me.

    The title fetching works exactly the same as Ragtek's add-on, by the way, which uses default XenForo helpers to go and fetch the content and get the title. I don't know how it's going to handle going to fetch 100+ amazon links...
  15. principia

    principia Well-Known Member

    Thanks, i have installed this and will test it out. :)
    Yorick likes this.
  16. Andy.N

    Andy.N Well-Known Member

    That will bomb out as i just found out. I have a master reading list which has 150+ books on it. I had to go to sql and edit the post manually to remove the amazon bbcode ;)
  17. Chris D

    Chris D XenForo Developer Staff Member


    I can make the title fetching a configurable option, so you can turn it off. But that means fetching the title automatically will just never work... though I will look into it a little bit more.
  18. Andy.N

    Andy.N Well-Known Member

    Take a look at this thread Yorick. This is where my master reading list is.
    I imagine if every link is turned into media bbcode, it will slow down a lot. Right now, i have less than 10 in the first post. The rest is hardcoded url
    Is there anyway we can improve the performance of this addon?
  19. Chris D

    Chris D XenForo Developer Staff Member

    Yes, as I've said, the performance degradation is due to it having to go and fetch the title. The solution is that I release a version where the title isn't fetched. That means the URLs will, instead of appearing like this:

    Amazon.com: The Complete Guide to Capital Markets for Quantitative Professionals (McGraw-Hill Library of Investment and Finance) (9780071468299): Alex Kuznetsov: Books

    It will have to appear like this:


    Or something like this

    Amazon.com product 0071468293

    I will update it now with the ability to turn title fetching off.
  20. Crazyfruitbat

    Crazyfruitbat Well-Known Member

    ohh that's great news - thanks very much.

    I never thought about the difference of products between stores...

Share This Page