Guest Posted August 18, 2005 Posted August 18, 2005 Is there is some ready code around that I could use to convert internal regular links I place for a product description or with an article so I can pass the session id during site navigation? So for instance I will parse the dbase on a product description and find a link... <a href="http://www.mysite.com/index.php">some link</a> and then use the string as an argument to tep_href_link() function. Is there a reference I can look for in the forums or contributions? Thanks in advance
Wendy James Posted August 19, 2005 Posted August 19, 2005 This is one example of the link going to My Account... maybe this would help you. <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation2"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> Now if you wanted to link to a product you would change it to something like <a href="<?php echo tep_href_link('product_info.php', 'pName=test1&cName=test-test-folder1'); ?>" class="headerNavigation">Link Name</a> the pName=test1&cName=test-test-folder1 part will be whatever is in your web address after the product_info.php? Hope that makes sense. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Guest Posted August 19, 2005 Posted August 19, 2005 Hello wendy thanks for the reply. So the <a href="<?php echo tep_href_link('product_info.php', 'pName=test1&cName=test-test-folder1'); ?>" class="headerNavigation">Link Name</a> will be stored in the dbase as a string/text. Because it has to be part of the description. So now I dont understand how it will be converted to html eventually because there is code that will treat the entire product description as a string including the example above. In other words how the "<?php echo ..." will be executed if it is treated as a string? Again thanks for your time.
Wendy James Posted August 19, 2005 Posted August 19, 2005 hmm... I am not sure how this would work in a description. I think it might mess it up but I believe I have seen other threads about this topic so it has been solved before. If you can't find the thread hopefully someone will come along that knows the answer. If you are trying to add links to an item in your store from certain items there is a very easy to install contribution that does that. It's kind of like the cross sell but waaaay easier to install and use. http://www.oscommerce.com/community/contributions,2293 Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
♥Monika in Germany Posted August 19, 2005 Posted August 19, 2005 hmm... I am not sure how this would work in a description. I think it might mess it up but I believe I have seen other threads about this topic so it has been solved before. If you can't find the thread hopefully someone will come along that knows the answer. If you are trying to add links to an item in your store from certain items there is a very easy to install contribution that does that. It's kind of like the cross sell but waaaay easier to install and use. http://www.oscommerce.com/community/contributions,2293 <{POST_SNAPBACK}> this should help you: http://www.oscommerce.com/forums/index.php?showtopic=157369 :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Guest Posted August 19, 2005 Posted August 19, 2005 Thanks Monica, I'll try the eval function see how it goes in terms of server hits. Hopefully should be ok otherwise I would try with a regular parser.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.