Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

eCommerce Tycoon


You are currently viewing our eCommerce Tycoon as a guest. Please register to participate.
Login



Closed Thread
Way for Ecommerce website to redirect to affiliate website?
Old 12-09-2009, 11:45 AM Way for Ecommerce website to redirect to affiliate website?
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
I know it kinda sounds weird by the title, but let me explain. This is what I am wanting to do...

Rather than stocking products or finding a dropshipper, I want to make money just by selling products for other people through commission. I have joined up with commission junction (considering share a sale). If I find a company on there that has products to sell, I want to put those same products on my ecommerce website. Instead of the visitor buying the product from me - or through my shopping cart - is there a way to redirect the visitor to their website whenever they click "Add to cart" or "Buy".

This could be either redirect to their actual product page or redirect the visitor to the affiliates website with the product already in the cart - doesn't matter to me.

Is there any way of accomplishing this?
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
View Public Profile
 
 
Register now for full access!
Old 12-09-2009, 11:47 AM Re: Way for Ecommerce website to redirect to affiliate website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,377
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/php-fo...-redirect.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 12-09-2009, 11:59 AM Re: Way for Ecommerce website to redirect to affiliate website?
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
Thanks for the link. I checked this out, but don't understand how this is actually going to give me credit for the sale.

CJ uses an affiliate link like such.

Code:
DO NOT CLICK, THIS IS FOR DEMONSTRATION ONLY

http://www.dpbolvw.net/click-3589809-10408495
How does this script actually redirect it to a link such as that?

PHP Code:
<?php
$destname 
strtolower($_GET["name"]);

$Dests = array(
    
"crams"=>"http://www.cram-system.com",
    
"amazon"=>"http://www.amazon.co.uk",
    
"ebay"=>"http://www.ebay.co.uk",
    
"clickbank"=>"http://57erd.reseller.hop.clickbank.net",
    
"auctads"=>"http://www.auctionads.com/",
    
"cj"=>"http://www.cj.com/",
    
"yahoo"=>"http://www.yahoo.com/",
    
"goog"=>"http://www.google.com/",
    
"msn"=>"http://www.msn.com/"
    
);

// Code can be inserted in here to log the clickthrough into a database ;

header("HTTP/1.1 301 Moved Permanently");
// comment out the line above to send the default 302 redirect;
header("Location: " $Dests[$destname]);
exit();

?>
I see that this is using a get method. Wouldnt this actually redirect it to http://www.cj.com/? I'm guessing this means that I would have to change that link to my actual affiliate link for a particular product, but then it is just going to be pretty much static and I would be better off just using static html to put in every affiliate link. - although this would get pretty hard if I had something like 5000 products.
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.

Last edited by WebTraffic; 12-09-2009 at 12:04 PM..
WebTraffic is offline
View Public Profile
 
Old 12-09-2009, 12:02 PM Re: Way for Ecommerce website to redirect to affiliate website?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,377
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You just put the destination URI in the array.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 12-09-2009, 12:33 PM Re: Way for Ecommerce website to redirect to affiliate website?
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
I understand (somewhat)

If I had the uri as a static link, it would redirect to the same product every time whenever the script was ran.

I would need to do something like this then..

On my "Buy Now/whatever" button, have it instead of adding to cart to run this script. This script would then be something like this...

PHP Code:
 <?php
$destname 
strtolower($_GET["name"]);
$productid $_GET['osCsid'];

$get_product "SELECT affiliatelink FROM products WHERE productid='$_GET[osCsid]'";
    
$product mysql_fetch_assoc(mysql_query($get_product));

$Dest = array(

    
"cj"=>"$product['affiliatelink']",

    );

// Code can be inserted in here to log the clickthrough into a database ;

header("HTTP/1.1 301 Moved Permanently");
// comment out the line above to send the default 302 redirect;
header("Location: " $Dest[$destname]);
exit();

?>
Then put all of the affiliate links in my database to pull whenever a product is selected?

My buy now button would then redirect to something like... http://domainname.com/buyproduct.php...0b69fb05b27b2a
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.

Last edited by WebTraffic; 12-09-2009 at 12:37 PM..
WebTraffic is offline
View Public Profile
 
Old 12-20-2009, 06:55 PM Re: Way for Ecommerce website to redirect to affiliate website?
Junior Talker

Posts: 3
Trades: 0
Are you using Zen Cart for your shopping cart? If so, this post here runs through how they modified Zen Cart to work for affiliate sales.

http://www.internetmarketingkultch.c...-products.html

PS I have no connection to this blog and have not tested this myself.
__________________

Please login or register to view this content. Registration is FREE

k998 is offline
View Public Profile
 
Closed Thread     « Reply to Way for Ecommerce website to redirect to affiliate website?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.33826 seconds with 12 queries