kelvin95 Posted March 27, 2017 Share Posted March 27, 2017 Hi, I am trying to reorder the products according to weight and I have had the code fixed as below. But it still doesn't working. if ( (!isset($HTTP_GET_VARS['sort'])) || (!preg_match('/^[1-8][ad]$/', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_WEIGHT') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_weight"; break; } } Any ideas? Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 28, 2017 Share Posted March 28, 2017 Is that new code you added, part of the shop you are using or from an addon? What does doesn't work mean? Does the code crash, give an error, not sort or something else? What version of oscommerce are you using? Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
kelvin95 Posted March 28, 2017 Author Share Posted March 28, 2017 Thanks anyway. The problem has now been fixed. Its just that I did not choose to display the weight in admin> product-listing Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.