PDA

View Full Version : Product Extra Fields



michael_s
04-09-2008, 06:50 AM
In:

$extra_fields_query = tep_db_query("
SELECT 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_fi elds_id
WHERE ptf.products_id=". (int) $listing['products_id'] ." and ptf.products_extra_fields_value'' and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
ORDER BY products_extra_fields_order");

Find:

ORDER BY products_extra_fields_order");

After products_extra_fields_order and before " put: DESC LIMIT 5

Where 5 = no. of extra fields to show




More... (http://addons.oscommerce.com/info/2202)