Guest Posted January 27, 2011 Share Posted January 27, 2011 Hi. A new error (not so new, possibly since I installed Extra Product Fields_). When accessing price ranges from Shop By Price: http://www.magazinul-copiilor.ro/shop_by_price.php?osCsid=c83c8611603c0d48bc3773574f3d34f9&range=3&osCsid=c83c8611603c0d48bc3773574f3d34f9 I'm getting the following error on top of product listing: Warning: Invalid argument supplied for foreach()in /home/magcop/public_html/includes/modules/product_listing.php on line 118 The lines around 118, beggining with 116 are: // begin extra product fields $extra = ''; foreach ($epf as $e) { if ($e['listing']) { $mt = ($e['uses_list'] ? ($listing[$e['field']] == 0) : !tep_not_null($listing[$e['field']])); if (!$mt) { // only list fields that aren't empty $extra .= '<br><b>' . $e['label'] . ': </b>'; if ($e['uses_list']) { $extra .= tep_get_extra_field_list_value($listing[$e['field']],$e['show_chain'] == 1); } else { $extra .= $listing[$e['field']]; } } } } // end extra product fields I tried a solution I found, adding an extra & here: ($epf as $e). It becomes ($epf as &$e) but it doesn't seem to work. Could some one help? Thank you so much! Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 Roxana, You should read this post: http://www.oscommerce.com/forums/topic/369518-getting-a-foreach-error-and-cant-figure-it-out/page__p__1557923__hl__dunweb+foreach__fromsearch__1#entry1557923 Unfortunately, there was no fix for the error. Chris Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 |Thank you. Hopefully, somebody will find an answer, I rather like Extra Fields contrib... I could live with this error, but it's quite unprofessional looking... Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 Roxana, It's not a matter of living with it, the contribution does not function on the product_info.php with the error. As you can see, I made several code edits to correct the error, and after correcting that error, another error will appear and then another and another........unfortunately, it does not function as coded. Perhaps a prior version may work ? I never tried them all. Chris Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 I'll try, maybe that's the answer. Link to comment Share on other sites More sharing options...
Guest Posted January 27, 2011 Share Posted January 27, 2011 One more thging I discovered now. I have another shop copied exactly after the one above and there the error doesn't appear: http://www.electrokids.ro/shop_by_price.php?osCsid=041eb0fc5f169a672e77134d82bbf031&range=2&osCsid=041eb0fc5f169a672e77134d82bbf031 Which files do you think I shoulld compare? product_listing.php ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.