biohazardbill Posted January 7, 2005 Share Posted January 7, 2005 How can I add a hyperlink to the categories box... I tried adding it in the box but it puts it either above or below the box.... or how could you add a product so that it shows up in the categories box? I have a couple items that dont need to be in a category because the category and product name would be the same therefore a prospective customer should not have to click twice... Link to comment Share on other sites More sharing options...
Guest Posted January 7, 2005 Share Posted January 7, 2005 In /catalog/includes/boxes/catagories.php around line 131 maybe find this code $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); add this with your link after it $info_box_contents [] = array('align' => 'left', 'text' => '<a href="http://YOUR LINK.com"target="_blank">YOUR TEXT</a>') Link to comment Share on other sites More sharing options...
redhotbargains Posted January 9, 2005 Share Posted January 9, 2005 In /catalog/includes/boxes/catagories.php around line 131 maybe find this code $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); add this with your link after it $info_box_contents [] = array('align' => 'left', 'text' => '<a href="http://YOUR LINK.com"target="_blank">YOUR TEXT</a>') <{POST_SNAPBACK}> Can anyone tell me what i need to add to the code to make my hyperlink show in the middle section of the site instead of the hyperlink opening a new page? Thanks Andy Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 9, 2005 Share Posted January 9, 2005 Remove the target="_blank" from the supplied link. However, if you are linking to to a page in oyur site, you need to be using the tep_href_link function. A standard html link will cause you to lose sessions. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
redhotbargains Posted January 9, 2005 Share Posted January 9, 2005 Thanks for your reply can you tell what the tep_href_link function is please ? Thanks Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 10, 2005 Share Posted January 10, 2005 It's part of the built in code that is designed to be used for this purpose. The basic structure is <?php echo tep_href_link('some_page.php', '', 'NONSSL'); ?> If you search your files for it, you will find many examples. Or post here if you need help creating the link. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
biohazardbill Posted January 10, 2005 Author Share Posted January 10, 2005 Remove the target="_blank" from the supplied link. However, if you are linking to to a page in oyur site, you need to be using the tep_href_link function. A standard html link will cause you to lose sessions. Jack <{POST_SNAPBACK}> Ok glad this was covered because I didnt even think of that.... how would i create the link to a specific product so that I don't lose the session? Link to comment Share on other sites More sharing options...
biohazardbill Posted January 10, 2005 Author Share Posted January 10, 2005 Ok glad this was covered because I didnt even think of that.... how would i create the link to a specific product so that I don't lose the session? <{POST_SNAPBACK}> This is the link to the actual product in my oscommerce application: http://www.mydomain.com/product_info.php?p...7396f86b9bb0ef4 I would like the word inspections to show up in the category infobox... Also how would you create more than one link as well? Link to comment Share on other sites More sharing options...
biohazardbill Posted January 10, 2005 Author Share Posted January 10, 2005 Ok now I am confused... this is what I have... $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); $info_box_contents[] = array('align' => 'left', 'text' => '<br><a href="' . tep_href_link('product_info.php?products_id=6&', '', 'NONSSL') . '">' . Inspections . '</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- categories_eof //--> It shows up in the info box... yay... however there is a space between the regular categorries and the one i entered... how do I get rid of that... This is where I am confused... when you hover over the link with the mouse, you know how you get the preview of the link you are about to go to on the bottom of Internet Explorer, well I got it to match the link that also shows when I hover over the item in the New Items for January Box. When I click the link in the infobox it goes back to the index page... when I click the one in the new products for january box it goes to the product... if the links match... including session id... why doesnt it work? Link to comment Share on other sites More sharing options...
biohazardbill Posted January 10, 2005 Author Share Posted January 10, 2005 New Development: I removed: ?products_id=6& and it works sorta... It goes to the products page.... it has the session id... but no product... How can I get it to reference a certain product? I am trying to figure it out... but having a hard time... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.