rojna Posted October 27, 2013 Posted October 27, 2013 By default items in store are sorted by PRODUCT NAME, how and where can I change this to sort by MODEL (item number)
tgely Posted October 27, 2013 Posted October 27, 2013 It is a very freqvently request from community so I think this would be nice to do a settings for it. Find in index.php if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_name"; break; } change to: if ($column_list[$i] == 'PRODUCT_LIST_MODEL') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by pd.products_model"; break; } osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.
rojna Posted October 27, 2013 Author Posted October 27, 2013 getting this code on the page : 1054 - Unknown column 'pd.products_model' in 'order clause' select p.products_image, p.products_model, pd.products_name, p.products_quantity, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '30' order by pd.products_model limit 0, 20 [TEP STOP]
♥kymation Posted October 28, 2013 Posted October 28, 2013 Change pd.products_model to p.products_model in the above code. Regards Jim See my profile for a list of my addons and ways to get support.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.