Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  Product Attributes Sort Order v1.0

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
Nice simple little contribution.

As default this contribution orders everything however It wants. Until you set the order ID they remain in an unorganised way.

This little mod will sort the attributes by price unless an option ID is entered.

If the option id is the same (to start they are all 0) then the lowest price attribute is displayed.

Tested with v1.8.x

All you are doing is adding "pa.options_values_price" at the end. Its saying if the attribute sort is the same then order by price.

I cant really take much credit for this. My inspiration came from the "Sorting Attributes" contribution from way back in 05

I hope it helps someone out.

DamanC aka Daman


====================================================

Open /catalog/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 . "' order by pa.attribute_sort");

Replace:

$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, pa.options_values_price");

====================================================
GERMAN included

~duen
Hopefully multiple attribute cloner works now.

Scott
FULL PACKAGE

Same as below; however, I forgot to apply my fix on the forum that you can find here: http://forums.oscommerce.com/index.php?s=&showtopic=327276&view=findpost&p=1363928

If you have the below package:

Find this:

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

REPLACE with this:

// BOE: Attribute Sort with Clone Tool
tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . (float)tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "', '" . (int)$attributes_sort . "')");
// EOE: Attribute Sort with Clone Tool

Scott
FULL PACKAGE

Product Attributes are read out from the database and placed into a select box, however the top most attribute becomes the default, with no way to override or set the sort order of the options. This may result in a default item with a price different from the posted price. Operating on the assumption that price modifiers should be specifically selected by the user, this addon adds a sort field to the product_atributes table, products_attributes.php, and product_info.php pages to allow user ordering of these attributes.

The Product Attribute Clone Tool is included: http://addons.oscommerce.com/info/4550

Support Forum: http://forums.oscommerce.com/index.php?showtopic=68003

Since v1.7
----------
* Reformatted instructions
* Added database query file
* Removed extra, unnecessary database entry
* Added the multiple attribute clone option
* English and French included

Scott
   Posted on: 02/03/2009     See contribution details Request Installation with Paid service