Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort Product Attributes in Administration?


trusted

Recommended Posts

Posted

On the Product Attributes screen in the Product Attributes table on the bottom,

Need to sort alphabetically by:

Primary key) Product Name

secondary) Option Name

terciary) Option Value

 

I know it is in product_attributes.php but not sure about the field names and the "order by" syntax.

 

I appreciate any ideas.

Posted

I think its in this code:

$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";

 

What do you think? What should I add to the "order by"?

Posted

Hi

Just a thought, but have you tried the latest version of Easypopulate with the mod by VJ? It now handles attributes and you enter them in the order you want them displayed, fantastic contribution.

thanks

Rich

"May the seam be with you"

Posted

My suggest is to check out the Contributes section for a module to install - I think there might be something there to help you.

Posted

Thanks but these contributions change the order of how they are displayed in the shopping cart, but I need them sorted in the admin screen. I am dealing with dozens of attributes for dozens of options.

 

Any other ideas?

Posted

No, I jumped too soon, there again that contribution just changed the shopping cart order.

 

This is what I finally did:

in admin/products_attributes.php

 

replaced all occurance of:

order by pd.products_name

with:

order by pd.products_name, pa.options_id, pa.options_values_id

 

It worked, now all the product name, option name and option value are in alpha order! Yeah! :)

Archived

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

×
×
  • Create New...