The following instructions will allow you to adjust the order in which your product attributes are displayed in your Netfirms Commerce Pro store:
A. File Configurations:
1. Using an FTP tool (eg. Filezilla), ftp to your Commerce Pro installation and modify the files below:
For product_info.php find:
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
and replace with:
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort");
For ../admin/includes/functions/general.php add (anywhere) the following lines of code:
function tep_attributes_sort($attributes_id) {
global $languages_id;
$attributes_sort = tep_db_query("select attribute_sort from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . (int)$attributes_id . "'");
$attributes_sort_values = tep_db_fetch_array($attributes_sort);
return $attributes_sort_values['attribute_sort'];
}
For ../catalog/admin/products_attributes.php, replace the entire file with the one attached to this FAQ (the attached file is called products_attributes.zip which you will have to unzip before uploading to your web account). B. Identify the Database Netfirms Commerce Pro store is using:
2. Using an FTP tool (eg. Filezilla), open the configure.php file found in ../catalog/admin/includes/
3. Note the database information (database, username, and password) is indicated under the section //define our database connection
Database Modification:
4. Login to the Netfirms Members Control Panel at https://controlpanel.netfirms.com
5. Click Hosting
6. Choose Databases
7. Click MySQL
8. Find the database (as per step #4 above) and login to the corresponding phpMyAdmin link
9. Click the Databases link
10. Link to the database number
11. Click the SQL tab
12. Run the following SQL query:
ALTER TABLE products_attributes ADD COLUMN attribute_sort INT UNSIGNED NOT NULL DEFAULT '0';
13. Logout of phpMyAdmin
C. Adjust Display Order of Product Attributes:
14. Login to the Members Control Panel https://controlpanel.netfirms.com
15. Click Application
16. Click Commerce Pro
17. For the store you wish to administer, click the corresponding Admin link to login to the Netfirms Commerce Pro Administration Panel
18. Click Catalog
19. Click Products Attributes
19. The following column now is included in the Products Attributes section: Attrib Sort
IMPORTANT: The lower the value of the Attrib Sort value, the earlier the product attribute will be displayed.
The above was based on an osCommerce contribution found at: http://www.oscommerce.com/community/contributions,1690/category,3/search,product+attributes
NOTE: Contributions are provided by the community in the form of
project add-ons, feature updates, language packs, and extended modules.
Support
for the contributions are not provided; however you may post questions
to the oscommerce forum at: http://forums.oscommerce.com/