Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Products Attributes for MS2.2


kinetek

Recommended Posts

Does anyone know how to order the product attributes on the product_attributes.php page in the admin section? i have 534 attributes and they are all listed in some random order. You would think that they would be listed by the id but they're not.

Link to comment
Share on other sites

The default order is on the product's name. You can change the order to the products attributes id by changing the ORDER BY clause in the query pulling this data. This occurs in or around line 640 of the products_attributes.php file.

 

The line reads:

$attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";

 

 

To change it to products attributes id order use this:

$attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pa.products_attributes_id";

 

Hope this helps.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...