Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Invalid argument supplied for foreach()


Guest

Recommended Posts

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

|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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...