Manuestaire Posted June 14, 2011 Share Posted June 14, 2011 (edited) Hello, I've installed the Product extra field module but i cannot show it in the product listing because the installer is older than my oscommerce version. Could someone help me? I'm using v2.3.1 http://www.oscommerce.com/community/contributions,2202 13. Extra Fields in product listing (optional) In catalog/includes/modules/product_listings.php FIND $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; REPLACE WITH //PRODUCT EXTRA FIELDS IN PRODUCT LISTING - BEGINING //PRODUCT EXTRA FIELDS IN PRODUCT LISTING - BEGINING //$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . //$listing['products_name'] . '</a> '; // } // break; $extra_fields_text = ''; $extra_fields_query = tep_db_query(" SELECT pef.languages_id, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int) $listing[$x]['products_id'] ." and pef.languages_id=" . (int)$languages_id . " and ptf.products_extra_fields_value<>'' ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) continue; $extra_fields_text = $extra_fields_text. '<font color="#000000">'.$extra_fields['name'].': </font>' . '<font color="#006600">' .$extra_fields['value'].'<BR></font>'; } $lc_text = ' <b><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . $listing[$x]['products_name'] . '</a></b><br> ' . $extra_fields_text . '<br>'; } break; // PRODUCT EXTRA FIELDS IN PRODUCT LISTING - END Edited June 14, 2011 by Manuestaire Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.