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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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. &lt;a href=&quot;http://www.nasalcleanse.com/shop/ind...id=2&quot; target=&quot;_blank&quot;&gt;&lt;i mg src=&quot;http://www.nasalcleanse.com/shop/aff...id=2&quot; border=&quot;0&quot; alt=&quot;NasalCare Nasal Irrigator&quot;&gt;&lt;/a&gt; |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| 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); ?> Last edited by allwebnow; 01-19-2007 at 08:30 AM. |
|
#4
| |||
| |||
| Ben's code did not, for me, address the problem of affiliate link code showing up with HTML escapes (i.e. < 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. |
| The Following 2 Users Say Thank You to brendanl79 For This Useful Post: | ||
aaanativearts (08-20-2007), michael_s (02-10-2007) | ||
|
#5
| |||
| |||
| Quote:
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); ?> |
| The Following 2 Users Say Thank You to allwebnow For This Useful Post: | ||
aaanativearts (08-20-2007), brendanl79 (02-10-2007) | ||
|
#6
| |||
| |||
| 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. |
| Thread Tools | |
| |
| ||||
| 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 |