Guest Posted January 5, 2009 Share Posted January 5, 2009 I have recently added a Back Button function to my website and i have noticed that on certain occasions the following message is displayed in my product_info page above my new Back Button, Warning: implode() [function.implode]: Invalid arguments passed in /home/ds1602/public_html/catalog/includes/functions/general.php on line 239 The message only seems to be displayed when the user enters the screen via the Manufacturer search route, all other routes into the product_info page the message is not displayed and all is fine, I have done some investigation and it seems to be related to the variable current_category_id not being set, can anyone shed some light on this particular problem? I've added the code from product_info with refrence to the code added for the new Back Button coding, <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="blankBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" align="left"><?php echo '<a href="' .tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">'. tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> </tr> </table></td> </tr> </table></td> </tr> Kind Regards Link to comment Share on other sites More sharing options...
♥FWR Media Posted January 5, 2009 Share Posted January 5, 2009 Well because the file hasn't been accessed via a category $cPath_array has not been set. $current_category_id is also manually hardcoded to "" via your code. Perhaps try the following: - <tr> <td> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="blankBox"> <tr class="infoBoxContents"> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <?php if( isset($cPath_array) && is_array($cPath_array) ){ echo ' <td class="main" align="left"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">'. tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></td>' . "\n"; } else { echo ' <td class="main" align="left"><a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></td>' . "\n"; } ?> </tr> </table> </td> </tr> </table> </td> </tr> 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...
Guest Posted January 6, 2009 Share Posted January 6, 2009 Well because the file hasn't been accessed via a category $cPath_array has not been set. $current_category_id is also manually hardcoded to "" via your code. Perhaps try the following: - <tr> <td> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="blankBox"> <tr class="infoBoxContents"> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <?php if( isset($cPath_array) && is_array($cPath_array) ){ echo ' <td class="main" align="left"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">'. tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></td>' . "\n"; } else { echo ' <td class="main" align="left"><a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></td>' . "\n"; } ?> </tr> </table> </td> </tr> </table> </td> </tr> Robert Thank You, I've added the additional code i.e the new If condition and it solved the problem i was experiencing, Once again thank you for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.