shasidi Posted May 7, 2007 Share Posted May 7, 2007 Hi everyone I am using some modification of oscommerce. I need a small help in php code below: <?php if ($banner = tep_banner_exists('dynamic', 'top_3')) { ?> <?php echo tep_display_banner('static', $banner); ?> <?php } this code is for showing banners, works fine when it is in header.php page, but now I need to put it to the new_products.php when I put it, it doesn't work I think there is a problem of php syntax here. Should I change something here in syntax? Could you help me to solve this problem? Best regards, Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 Hi everyone I am using some modification of oscommerce. I need a small help in php code below: <?php if ($banner = tep_banner_exists('dynamic', 'top_3')) { ?> <?php echo tep_display_banner('static', $banner); ?> <?php } this code is for showing banners, works fine when it is in header.php page, but now I need to put it to the new_products.php when I put it, it doesn't work I think there is a problem of php syntax here. Should I change something here in syntax? Could you help me to solve this problem? Best regards, It looks like you just need to add a ?> at the end to close the final php tag. Link to comment Share on other sites More sharing options...
shasidi Posted May 7, 2007 Author Share Posted May 7, 2007 It looks like you just need to add a ?> at the end to close the final php tag. Actually I have used with that tag also, but still doesn't work I should put this code: <?php if ($banner = tep_banner_exists('dynamic', 'top_1')) { ?> <?php echo tep_display_banner('static', $banner); ?> <?php } ?> instead of this block of the code(red bold): echo ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td height="5"></td></tr> <tr> <a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . tep_image(DIR_WS_IMAGES . 'm13.jpg', 'KOSMETIK', '281', '226', 'border=0') . tep_image(DIR_WS_IMAGES . 'm14.jpg', 'KOSMETIK', '245', '226', 'border=0') . '</a> </td> </tr> <tr><td class="brand"></td></tr> </table> I am sure it should be some small fix in syntax and everything will work fine, may be someone knows that. Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 7, 2007 Share Posted May 7, 2007 echo ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td height="5"></td></tr> <tr>'; if ($banner = tep_banner_exists('dynamic', 'top_1')) { echo tep_display_banner('static', $banner); } echo ' </td> </tr> <tr><td class="brand"></td></tr> </table> Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
shasidi Posted May 8, 2007 Author Share Posted May 8, 2007 echo ' <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td height="5"></td></tr> <tr>'; if ($banner = tep_banner_exists('dynamic', 'top_1')) { echo tep_display_banner('static', $banner); } echo ' </td> </tr> <tr><td class="brand"></td></tr> </table> Thank you too much again Babygurgles :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.