osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

affiliate link encoded

This is a discussion on affiliate link encoded within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; i just installed RC3 and the affiliate link generated looks like the following. the problem is the "<" and other ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 10-13-2006, 08:04 PM
New Member
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
jackxwu
Default affiliate link encoded

i just installed RC3 and the affiliate link generated looks like the following. the problem is the "<" and other html tags are encoded and when i paste those into webpages, the html source code shows up in the browser. wondering if any one know how to fix it. thanks.


<a href="http://www.nasalcleanse.com/shop/ind...id=2" target="_blank"><i mg src="http://www.nasalcleanse.com/shop/aff...id=2" border="0" alt="NasalCare Nasal Irrigator"></a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 01-19-2007, 07:18 AM
Member
 
Join Date: Oct 2006
Location: Cincinnati, ohio
Posts: 39
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
allwebnow
Default Re: affiliate link encoded

I'm finding this same problem, does anyone have any idea how to fix this? It's probably something wrong in the coding within
templates/fallback/content/affiliate_banners.tpl.php

Or, The html output. I just don't know and am not experienced enough to know how to fix something like this.

I'm running RC3.
__________________
Regards,

Ben Wade
www.AllWebNow.com - E-commerce Web Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-19-2007, 07:20 AM
Member
 
Join Date: Oct 2006
Location: Cincinnati, ohio
Posts: 39
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
allwebnow
Default Re: affiliate link encoded

My current string of code near the textarea code to copy and paste in templates/fallback/content/affiliate_banners.tpl.php
is:

Starting at line 60:

<?php
if (tep_db_num_rows($affiliate_banners_values)) {

while ($affiliate_banners = tep_db_fetch_array($affiliate_banners_values)) {
$affiliate_products_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $affiliate_banners['affiliate_products_id'] . "' and language_id = '" . $languages_id . "'");
$affiliate_products = tep_db_fetch_array($affiliate_products_query);
$prod_id = $affiliate_banners['affiliate_products_id'];
$ban_id = $affiliate_banners['affiliate_banners_id'];
switch (AFFILIATE_KIND_OF_BANNERS) {
case 1: // Link to Products
if ($prod_id > 0) {
$link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0" alt="' . $affiliate_products['products_name'] . '"></a>';
} else { // generic_link
$link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $affiliate_banners['affiliate_banners_image'] . '" border="0" alt="' . $affiliate_banners['affiliate_banners_title'] . '"></a>';
}
break;
case 2: // Link to Products
if ($prod_id > 0) {
$link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?ref=' . $affiliate_id . '&products_id=' . $prod_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0" alt="' . $affiliate_products['products_name'] . '"></a>';
} else { // generic_link
$link = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DEFAULT . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" target="_blank"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_AFFILIATE_SHOW_BANNER . '?ref=' . $affiliate_id . '&affiliate_banner_id=' . $ban_id . '" border="0" alt="' . $affiliate_banners['affiliate_banners_title'] . '"></a>';
}
break;
}
?>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="infoBoxHeading" align="center"><?php echo TEXT_AFFILIATE_NAME . ' ' . $affiliate_banners['affiliate_banners_title']; ?></td>
</tr>
<tr>
<td class="smallText" align="center"><br><?php echo $link; ?></td>
</tr>
<tr>
<td class="smallText" align="center"><?php echo TEXT_AFFILIATE_INFO; ?></td>
</tr>
<tr>
<td class="smallText" align="center">
<?php

$link = htmlspecialchars($link, ENT_QUOTES);
echo tep_draw_textarea_field('affiliate_banner', 'soft', '60', '6', $link);
?>
__________________
Regards,

Ben Wade
www.AllWebNow.com - E-commerce Web Hosting

Last edited by allwebnow; 01-19-2007 at 07:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 02-10-2007, 11:21 AM
New Member
 
Join Date: Sep 2006
Posts: 21
Thanks: 3
Thanked 12 Times in 5 Posts
Rep Power: 0
brendanl79
Default Re: affiliate link encoded

Ben's code did not, for me, address the problem of affiliate link code showing up with HTML escapes (i.e. &lt; for <).

Perhaps a version mismatch? I'm using RC3.

I solved it by commenting out both instances of the call to htmlspecialchars() in affiliate_banners.tpl.php. Now the affiliate link HTML appears un-escaped, so can immediately be cut-and-pasted into the affiliate's website code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to brendanl79 For This Useful Post:
aaanativearts (08-20-2007), michael_s (02-10-2007)
  #5  
Old 02-10-2007, 04:09 PM
Member
 
Join Date: Oct 2006
Location: Cincinnati, ohio
Posts: 39
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
allwebnow
Default Re: affiliate link encoded

Quote:
Originally Posted by brendanl79 View Post
Ben's code did not, for me, address the problem of affiliate link code showing up with HTML escapes (i.e. &lt; for <).

Perhaps a version mismatch? I'm using RC3.

I solved it by commenting out both instances of the call to htmlspecialchars() in affiliate_banners.tpl.php. Now the affiliate link HTML appears un-escaped, so can immediately be cut-and-pasted into the affiliate's website code.

That did it:

Change same code in 2 places around line 47 and then around line 100 from:

<?php
$link = htmlspecialchars($link, ENT_QUOTES);
echo tep_draw_textarea_field('affiliate_banner', 'soft', '60', '6', $link);
?>

To...

<?php
// $link = htmlspecialchars($link, ENT_QUOTES);
echo tep_draw_textarea_field('affiliate_banner', 'soft', '60', '6', $link);
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to allwebnow For This Useful Post:
aaanativearts (08-20-2007), brendanl79 (02-10-2007)
  #6  
Old 02-10-2007, 05:45 PM
New Member
 
Join Date: Sep 2006
Posts: 21
Thanks: 3
Thanked 12 Times in 5 Posts
Rep Power: 0
brendanl79
Default Re: affiliate link encoded

Glad to hear it Ben.

Sorry for the confusing words at the beginning of my post. I didn't realize your first and second posts were from the same person, and I mistook the latter for a proposed solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Affiliate link to entire store not single products? Lobotaman osCMax v2 Features Discussion 2 10-02-2006 03:49 AM
how do i set a link active, if the link links to actual page poschiman osCommerce 2.2 Modification Help 0 06-03-2006 04:10 PM
Affiliate Build-a-link Setup Hanuman71 osCMax v2 Features Discussion 1 05-20-2006 01:11 PM
Affiliate link secure non-secure kwiznoz osCMax v2 Installation issues 6 08-28-2005 01:08 PM
Affiliate build-a-Link mgrooten osCMax v1.7 Discussion 0 07-26-2005 07:47 PM


All times are GMT -8. The time now is 06:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax