checks2you Posted March 20, 2004 Share Posted March 20, 2004 Hi :) First let me say there has been some amazing info on this forum which has fixed many of the issues I have had and also showed me how to do somethings I wasn't sure was even possible! B) I have worked for days on this issue and finally thought I better seek some help from those more technical than myself lol! :D I have osCommerce 2.2 with Product Listing Hack MS2 v.2.4. What I am trying to do is link to an off site url with the product name and image as opposed to going to the product_info.php page or shopping cart. I was able to figure out how to link the product name and image on the product info page to the same off site url used in "For more information please visit..." link: <script language="javascript"><!-- document.write('<?php echo '<a TARGET="new" href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="0"') . '<br>' . $product_info['products_name'] . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a TARGET="new" href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="0"') . '<br>' . $product_info['products_name'] . '</a>'; ?> </noscript> but when I try a similar approach on product_listing.php the link basically ends after 'action=url&goto=' and does not recognize urlencode($product_info['products_url']), 'NONSSL', true, false) . '">' I have tried to insert: case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a TARGET="new" href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false) . '"><FONT COLOR="#0000FF">' . $listing['products_name'] . '</FONT></a>'; } else { $lc_text = '<b><a TARGET="new" href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false) . '">' . $listing['products_name'] . '</FONT></a>:</b> '; } break; But again the link dies after 'action=url&goto=' :unsure: I assume this must be due to some database query but I have no idea how do call this... When you get a minute can you give this some thought and advise? Thanks in advance! Link to comment Share on other sites More sharing options...
checks2you Posted March 21, 2004 Author Share Posted March 21, 2004 Bumpety Bump Bump Bump... :) Link to comment Share on other sites More sharing options...
user99999999 Posted March 21, 2004 Share Posted March 21, 2004 The products_url is in the products_description table so you need to change your SQL to pull it from there. Link to comment Share on other sites More sharing options...
checks2you Posted March 21, 2004 Author Share Posted March 21, 2004 Hi user99999999 :D Hey thanks for the input! I was able to do exactly what I wanted to do in a very round about way by following the steps covered here. If I knew enough about PHP and MySQL I am sure I could have done it properly but basically I took the code discussed in that post and used the product url for the product image, product name, and price - then I removed any traces or the "link" from the extra column... works like a charm! Now if I only knew WHY it worked that way lol! :lol: Thanks again for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.