Andy
05-05-07, 16:30
Hi
We've all been mightily p**sed off about the lack of merchant logo's in our api's.
This issue is holding the launch of our API back, we can't sell if we have a crap looking feed.
So, in desperation I have created this workaround. It is not a fix, and introduces another slight problem, but it's better than a page full of the default nologo image. I'd be interested to know what AffWin think of this fix and the inherent "leeching" it creates.
In includes/elements/product_display_list.php find: $oProduct->sMerchantLogoUrl = $aMerchants[$oProd->iMerchantId]->sLogoUrl;
Directly below it add:
############### merchant logo Workaround ###########
if($oProduct->sMerchantLogoUrl ==""){
$oProduct->sMerchantLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oProd->iMerchantId.'/logo.gif';
}
############## END merchant logo workaround #########
In includes/elements/featured_merchants.php find:
$oNewMerchant= new stdClass();
$oNewMerchant->iId= $oMerchant->iId;
$oNewMerchant->sName= $oMerchant->sName;
$oNewMerchant->sLogoUrl= $oMerchant->sLogoUrl;
Directly below it add:
############### merchant logo Workaround ###########
if($oNewMerchant->sLogoUrl == ""){
$oNewMerchant->sLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oMerchant->iId.'/logo.gif';
}
############## END merchant logo workaround #########
In includes/elements/product_display.php find:
################################################
# SMARTY ASSIGN
Directly ABOVE that add:
############### merchant logo Workaround ###########
if($oMerchant->sLogoUrl ==""){
$oMerchant->sLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oProduct->iMerchantId.'/logo.gif';
}
############## END merchant logo workaround #########
Save and upload.
i think Ive got all instances of logos in there, if not, ill post again
It's pretty obvious what is going on with the code.
if the merchant logo isnt in the feed, therefore equals NULL (=="") then the merchant logo URL should be the logo image that you see in your AffWin account next to the merchant descriptions.
As you can see, you will now be Leeching the image from AffWin instead of where it was supposed to be coming from.
Leeching isn't a good practice, but at the end of the day, this is the best I think we can all do.
I'm sure a few of you out there will find this workaround useful
We've all been mightily p**sed off about the lack of merchant logo's in our api's.
This issue is holding the launch of our API back, we can't sell if we have a crap looking feed.
So, in desperation I have created this workaround. It is not a fix, and introduces another slight problem, but it's better than a page full of the default nologo image. I'd be interested to know what AffWin think of this fix and the inherent "leeching" it creates.
In includes/elements/product_display_list.php find: $oProduct->sMerchantLogoUrl = $aMerchants[$oProd->iMerchantId]->sLogoUrl;
Directly below it add:
############### merchant logo Workaround ###########
if($oProduct->sMerchantLogoUrl ==""){
$oProduct->sMerchantLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oProd->iMerchantId.'/logo.gif';
}
############## END merchant logo workaround #########
In includes/elements/featured_merchants.php find:
$oNewMerchant= new stdClass();
$oNewMerchant->iId= $oMerchant->iId;
$oNewMerchant->sName= $oMerchant->sName;
$oNewMerchant->sLogoUrl= $oMerchant->sLogoUrl;
Directly below it add:
############### merchant logo Workaround ###########
if($oNewMerchant->sLogoUrl == ""){
$oNewMerchant->sLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oMerchant->iId.'/logo.gif';
}
############## END merchant logo workaround #########
In includes/elements/product_display.php find:
################################################
# SMARTY ASSIGN
Directly ABOVE that add:
############### merchant logo Workaround ###########
if($oMerchant->sLogoUrl ==""){
$oMerchant->sLogoUrl = 'http://www.affiliatewindow.com/logos/'.$oProduct->iMerchantId.'/logo.gif';
}
############## END merchant logo workaround #########
Save and upload.
i think Ive got all instances of logos in there, if not, ill post again
It's pretty obvious what is going on with the code.
if the merchant logo isnt in the feed, therefore equals NULL (=="") then the merchant logo URL should be the logo image that you see in your AffWin account next to the merchant descriptions.
As you can see, you will now be Leeching the image from AffWin instead of where it was supposed to be coming from.
Leeching isn't a good practice, but at the end of the day, this is the best I think we can all do.
I'm sure a few of you out there will find this workaround useful