View Single Post
  #5  
Old January 31st, 2012, 02:41 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

These are the IDs for TradeDoubler Countries:

40 TradeDoubler UK
51 TradeDoubler Belgium
110 TradeDoubler Finland
64 TradeDoubler France
52 TradeDoubler Germany
111 TradeDoubler Ireland
66 TradeDoubler Italy
53 TradeDoubler Netherlands
65 TradeDoubler Spain
112 TradeDoubler Sweden
113 TradeDoubler Denmark

So a function like this is needed
PHP Code:
function dfr_url_sub($product) { 
    
    
// Add your affiliate IDs here
    
$tradedoubler_be_affiliate_id 'X'
    
$tradedoubler_dk_affiliate_id 'X'
    
$tradedoubler_fi_affiliate_id 'X'
    
$tradedoubler_fr_affiliate_id 'X'
    
$tradedoubler_de_affiliate_id 'X'
    
$tradedoubler_ir_affiliate_id 'X'
    
$tradedoubler_it_affiliate_id 'X'
    
$tradedoubler_nl_affiliate_id 'X'
    
$tradedoubler_es_affiliate_id 'X'
    
$tradedoubler_se_affiliate_id 'X'
    
$tradedoubler_uk_affiliate_id 'X'
     
    if (
$product->net_id == 40) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_uk_affiliate_id$product->url); 
    } elseif (
$product->net_id == 51) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_be_affiliate_id$product->url); 
    } elseif (
$product->net_id == 110) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_fi_affiliate_id$product->url); 
    } elseif (
$product->net_id == 64) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_fr_affiliate_id$product->url); 
    } elseif (
$product->net_id == 52) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_de_affiliate_id$product->url); 
    } elseif (
$product->net_id == 111) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_ir_affiliate_id$product->url); 
    } elseif (
$product->net_id == 66) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_it_affiliate_id$product->url); 
    } elseif (
$product->net_id == 53) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_nl_affiliate_id$product->url); 
    } elseif (
$product->net_id == 65) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_es_affiliate_id$product->url); 
    } elseif (
$product->net_id == 112) { 
        
$url str_replace($tradedoubler_dk_affiliate_id$tradedoubler_se_affiliate_id$product->url); 
    } else { 
        
$url $product->url
    } 
    return 
$url

Eric