Contributions
Product Attributes Sort Order v1.0
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 specificaly selected by the user, this mod adds a sort_order field to the product_atributes table and to the products_attributes.php, and product_info.php pages to allow user ordering of these attributes.
Expand All / Collapse All
Version multi-langues (Anglais et Français)
Package complet
Installation en Français
Screenshots inclus
Visible ici : http://www.oscommerce-screenshots.com/attributes-sort-order-with-attributes-clone-p-237.html
***********************************************************************
Version multi-languages (English and French)
Full Package
Installation in French
Screenshots included
Visible here: http://www.oscommerce-screenshots.com/attributes-sort-order-with-attributes-clone-p-237.html
In the file admin/products_attributes.php
Bug is fixed to clone products attributes
Find:
case 'clone_attributes':
$clone_product_id_from = $HTTP_POST_VARS['clone_products_id_from'];
$clone_product_id_to = $HTTP_POST_VARS['clone_products_id_to'];
tep_db_query("delete from ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id='".$clone_product_id_to."'");
$attributes = tep_db_query("select products_id, options_id, options_values_id, options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES ." where products_id='".$clone_product_id_from."'");
while($attributes_values = tep_db_fetch_array($attributes)) {
tep_db_query("INSERT INTO " . TABLE_PRODUCTS_ATTRIBUTES . " ( products_id, options_id, options_values_id, options_values_price, price_prefix ) VALUES (".$clone_product_id_to.", ".$attributes_values['options_id'].", ".$attributes_values['options_values_id'].", ".$attributes_values['options_values_price'].", '".$attributes_values['price_prefix']."')");
}
break;
Replace with:
case 'clone_attributes':
$clone_product_id_from = $HTTP_POST_VARS['clone_products_id_from'];
$clone_product_id_to = $HTTP_POST_VARS['clone_products_id_to'];
tep_db_query("delete from ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id='".$clone_product_id_to."'");
$attributes = tep_db_query("select products_id, options_id, options_values_id, options_values_price, price_prefix, attribute_sort from " . TABLE_PRODUCTS_ATTRIBUTES ." where products_id='".$clone_product_id_from."'");
while($attributes_values = tep_db_fetch_array($attributes)) {
tep_db_query("INSERT INTO " . TABLE_PRODUCTS_ATTRIBUTES . " ( products_id, options_id, options_values_id, options_values_price, price_prefix, attribute_sort) VALUES (".$clone_product_id_to.", ".$attributes_values['options_id'].", ".$attributes_values['options_values_id'].", ".$attributes_values['options_values_price'].", '".$attributes_values['price_prefix']."' , ".$attributes_values['attribute_sort'].")");
}
tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
break;
That's all.
Full Package is included.
(The file(products_attributes) is concordant with version RC2a.)
(Products Attributes Sort Order + Products Attributes Clone Tool)
+Working Perfect...
Notice: if someone wants to install this manually, must check my previous packages
2 Updates for Product Attributes Sort Order v1.6
and
I fixed my 2 bugs in the /admin/products_attributes.php file of Product Attributes sort order v1.6 contribution which I added before.
Turkish
Product Attributes ile ilgili product_attributes.php dosyasini ilgilendiren onca contribution'a karsin , burdaki guncel versiyonlarda manual installation
dosyalarinin bulunmamasi buyuk kayip. Bende buna karsilik product attributes sort order contribution yuklemesi icin products_attributes.php sayfasindaki
tum degisiklikleri adim adim anlatan bir manual installation dosyasi olusturdum. (OsCommerce'nin son cikardigi oscommerce v2.2rc2a uzerinde denenmistir.)
v1.6 Degisiklikler
Bunun disinda eklemis oldugum admin/products_attributes.php (oscommerce v2.2rc2a icin) dosyasinda http://www.oscommerce.com/community/contributions,4550 sayfasindaki
bir diger products attributes'leri duzenlemenizde isine yarayabilecek bir contirbution olan "Product Attributes Clone tool" hazir halde install edilmistir.
product_info ve products_attributes.php sayfalarindan screenshots eklenmistir.
Eklemis oldugum admin/product_attributes.php dosyasi "product type option" icin uyarli oldugu icin product_type_option.sql dosyasindaki sql query'yi calistirilmasini gerektirir,
Bu sql query'nin calistirilmasi diger fonksiyonlarin calismasini etkilemez, sadece siralamadaki hatanin cikmasini onler boylelikle "product type option" install yapmis olan ya da install yapmis olmayan herkes kullanabilir.
English
Although there are many contributions related to Product Attributes in product_attributes.php file ,it is a big lost that there is
no manual installation on updated versions. So that to be able to install product attributes sort order contribution I created
a new manual installation file that shows and explains step by step all the changes in products_attributes.php page.
(It has been tested on last version of oscommerce v2.2rc2a)
v1.6 ChangeLog
Rather then this in admin/products_attributes.php file (for oscommerce v2.2rc2a) the http://www.oscommerce.com/community/contributions,4550 page which I added,
there is "Product Attributes Clone tool" has already been intalled which will help you to prepare other product attributies.
Screenshots has been added from product_info and products_attributes.php pages.The admin/product_attributes.php file
that I added is conformably to ''product type option'' so that it needs to run the sql query in product_type_option.sql file.
To run this sql query will not affect other fonctions it will only hide the error on listing to not be shown
so that everybody (who installed the ''product type option'' or who didn't install it) can use it.
Somente a correcção do products_atributes.php para quando der este erro:
1136 - Column count doesn't match value count at row 1
insert into products_attributes values ('', '91', '21', '122', '', '+', '1')
[TEP STOP]
versão traduzida para o português,não coloquei nenhum adicional apenas fiz a tradução e adicionei screenshoot que mostra o admin e mostra a product_info como será mostrado na loja
todos os créditos são dos caras abaixo eu apenas fiz a tradução
This is an update from v1.2. I just added a new function which sorts the attribs by its ID, this is the order in which they were made. Until now, it was just ordered by the product name, but the products which had many different attributes were a mess.
Now it's even easier to sort all attirbs! :D
This integrates Product Tabs 1.5 with Product Attributes Sort Order v.1.11
Product tabs 1.5 can be downloaded here: http://www.oscommerce.com/community/contributions,2610/category,all/search,product+tabs
Follow the installation then the updates for it if needed for your store
This is only the admin/categories.php file to make it easy to integrate these 2 contributions which, in my opinion, are a must for any site. This file will make installation easy as long as you have no other mods on the categories.php file.
1.2 |
Yari Gio |
29 Mar 2005 |
|
Minor change, updated installation file and zip file contents.
Version 1.2 had everything you need to add a Attribute sorting box to your attributes area and only modifies attribute based files (with a few small changes to other files detailed in the installation intructions).
This contribution will no longer edit the new product based files as to not clash with product based contributions (like the product sorting contribution).
You gotta have the attribute sorting working...
All you have to do to make it work with options is find this line... "$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");" ... in the product_info.php file and replace it with ... "$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' group by patrib.attribute_sort order by patrib.attribute_sort");" ... now your options will use the same ordering as your attributes ... enjoy
First of all, the last 2 contributions below this do not belong here because they have nothing to do with the original contribution. They in fact belong here in Forrest Miller's contribution: http://www.oscommerce.com/community/contributions,1690/category,all/search,attr+sort
The contribution 29 Feb 2004 - Product Attributes Sort Order v.1.0.1 is nothing more than Forrest Miller's 28 Nov 2003 - Products Attributes Sort v1.0. The files are all exactly the same and are no improvement. Someone please delete this.
The contribution 24 Mar 2004 - Product Attributes Sort Order v.1.11 has an extra file and 2 different lines in the readme file, but all other files are identical to Forrest Miller's 28 Nov 2003 - Products Attributes Sort v1.0. Someone please move it there.
First, all credit to the original author and the people who've done such a great job cleaning and extending this product.
This mod builds on v1.0.1 by integrating code from the Alternative Attribute Manager (which I love) to provide a grid-based attribute manager at the bottom of the product entry/updating page. (categories.php)
This is a must for sites which are attribute heavy but use non-alphabetic sorting - in my client's case, clothing.
This module contains all the files from v1.0.1 plus the "categories.php" file.
I've tested this on my client's site, let me know if you find any problems!
All credit to the original author here. Just cleaned up a few things:
Made 1 or 2 changes in the install instructions;
Cleaned up provided files by starting with a "clean" OS2 MS2.2 install version, rather than original author's already well-loaded files :)
Basically, this package includes all the files you'll need to install the mod over a clean OSComm install. Will prevent problems with calls to functions and etc. that are not there.
Let me know if you have questions :) Great module! I love it!
V1.03 03/01/2004 Janis Carper and separately Jon Hillenbrand let me know about issues they experienced in the installation process which I have used to hopefully improve this installation
Mod: v1.02 01/31/2004 Corrected typo's in the instructions thanks to Jay Saeger
Added directions for editing product_info.php which were left out of the original release. This is a full re-release of the package, not an incremental update.
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 specificaly selected by the user, this mod adds a sort_order field to the product_atributes table and to the products_attributes.php, and product_info.php pages to allow user ordering of these attributes.
Note: Contributions are used at own risk.