
Originally Posted by
treblesand
I'm having a small issue that probably has a really easy fix I just can't see... I would love some help if anyone has a moment. I'm running ZC 1.5.0 and Snap Affiliates 2.2.0
I managed to get a few banner images up and displaying for affiliates to use. My issue is that in their code, the path to the image location is a relative path, not the full path, so it does not display in their pages (so it says something like /images/referrers/ref.207.207.jpg instead of
http://mysite.com/zencart/images/ref...ef.207.207.jpg) Is there a way to change this path so it works?
Also, is there a way to choose which page each image points to? So I might have one image point to the main cart page, but another image point to a particular product?
I LOVE this mod, by the way, and I can see how many many hours have gone into it. Thank you, developers, for all the time you've put into it! And thank you in advance for any help you can give me on this :)
Here's a patch to the get_referrer_image function located in /includes/templates/YOUR_TEMPLATE/templates/tpl_referrer_tools_default.php to correct the relative path issue:
Code:
function get_referrer_image($width, $height, $filename) {
$image_html = '';
$alt = TEXT_IMAGE_ALT_TEXT;
$filename = HTTP_SERVER . DIR_WS_CATALOG . $filename; /*v2.3.0a*/
$image_html .= '<div class="imagewrap">';
$image_html .= '<div class="imagetitle">' . sprintf(TEXT_X_BY_Y_PIXELS, $width, $height) . '</div>';
$image_html .= "<img class=\"referrer_image\" src=\"$filename\" width=\"$width\" height=\"$height\" alt=\"$alt\" /><br />";
$image_html .= '<textarea rows="3" cols="1"><a href="' . get_referrer_link(FILENAME_DEFAULT) . "\"><img src=\"$filename\" width=\"$width\" height=\"$height\" alt=\"$alt\" /></a></textarea><br />";
$image_html .= '</div>';
return $image_html;
}
That update will be included in v2.3.0 of the plugin. Choosing the page (and presumedly alt-text) that a particular image references will take a bit of thinking ...
Bookmarks