ErnieMcFarlane Posted May 25, 2011 Share Posted May 25, 2011 How can I process php script in the products_description field on the products_info.php page? For example I would like to be able to have a tep_href_link inside the products_description field. I have used cross sell and it does some of what I am looking for, but I would rather be able to code the links directly into the product description. Is there anyway to do this? I've tried putting <?php echo '<a href="' . tep_href_link('index.php?cPath=21_23', '', 'NONSSL') . '">' . ' Click here to view all items.' . '</a>'; ?> But it does not process into an html link. Thank you. Ernie Link to comment Share on other sites More sharing options...
NodsDorf Posted May 25, 2011 Share Posted May 25, 2011 Why not just use a straight html link since its in the product description...? <a href="index.php?cPath=21_23">Click here to view all items.</a> Link to comment Share on other sites More sharing options...
ErnieMcFarlane Posted May 25, 2011 Author Share Posted May 25, 2011 Won't that lose the session ID information? And thereby possible lose the cart? Link to comment Share on other sites More sharing options...
NodsDorf Posted May 25, 2011 Share Posted May 25, 2011 No, you're still staying inside oscommerce. Link to comment Share on other sites More sharing options...
ErnieMcFarlane Posted May 25, 2011 Author Share Posted May 25, 2011 Excellent. Thank you! Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 25, 2011 Share Posted May 25, 2011 Actually it will cause a loss of the session id. The correct way to do it is to install the embed link contribution. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
NodsDorf Posted May 25, 2011 Share Posted May 25, 2011 Actually it will cause a loss of the session id. The correct way to do it is to install the embed link contribution. Ahh yes, I did test it before I answered the question. My test site didn't have SSL turned on and I was able to click around just fine without losing items. Just turned on SSL and soon as I logged in I lost my cart. Apologies for the wrong answer. Guess you'll need this: http://addons.oscommerce.com/info/2905 Link to comment Share on other sites More sharing options...
Baddesley Posted February 28, 2012 Share Posted February 28, 2012 I also need to add a few extra links to my site, yet preserve the session ID (to existing products/pages; one to product_info.php cPath=33_118). How can I do this without using this contribution? Surely it's just a matter of using the correct syntax, so what's the big secret? I've looked and looked and nowhere have I been able to find any information on how to correctly code a link using tep_href_link or similar code. This is obviously an OsCommerce special, as it is not even referenced on php.net. Anyone willing to spill the beans? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.