quantrum Posted October 9, 2009 Posted October 9, 2009 Hi, I'm trying to place a help button onto a product page, but at the bottom, below the product attributes, I can get it to do this fine, however it displays on every page, i only need it on one page, the page has the product id of 63, I didn't know if there was an IF statement that I could use to state that if its on this page, then to display this button. I was thinking something along the lines of if ($products['id'] == 63) { <a href="help-63.html" rel="facebox"><img src="helpbutton63.png" border="0"></a> } can anybody help ? Thanks in advance
Guest Posted October 9, 2009 Posted October 9, 2009 Yes, and if is a perfect solution. But, where is that file help-63.html? If it's in your catalog, better use tep_href_link. It's good for the session. Find samples in the php files
quantrum Posted October 12, 2009 Author Posted October 12, 2009 Thanks for the reply, I think i did the tep_href_link bit right, but i'm not sure. I've saved and uploaded what I've tried and nothing is loading up, it just remains blank on product 63. below is the code i'm using <?php if ($products['id'] == 63) { echo '<tr><td class="main" colspan="2"><a href="' . tep_href_link('help-63.html') . '" rel="facebox"><img src="images/helpbutton63.png" border="0"></a></td></tr>' ;} ?> if anyone has any ideas it'd be hugely appreciated. thanks in advance
♥ecartz Posted October 12, 2009 Posted October 12, 2009 <?php if ( $product_info['products_id'] == '63' ) { echo '<tr><td class="main" colspan="2"><a href="' . tep_href_link('help-63.html') . '" rel="facebox"><img src="images/helpbutton63.png" border="0"></a></td></tr>' ; } ?> Also, I don't know that tep_href_link would help you with a static HTML page. However, if this only shows through a popup and has no links, it shouldn't really matter. I might add target="_blank" for the non-javascript case. Always back up before making changes.
quantrum Posted October 12, 2009 Author Posted October 12, 2009 thanks so much ecartz & AnisDelMono, that worked fantastically
Recommended Posts
Archived
This topic is now archived and is closed to further replies.