Contributions
AJAX Attribute Manager
AJAX Attribute Manager v1.4 beta
What is this contribution??
The idea of this contribution is to make the administration of product options, option values and attributes much quicker and easier.
It uses a technology known as AJAX (Asynchronous JavaScript And XML). This enables us to do is make page sub-reqests without refreshing a page.
In this case, it enables us to make a attribute manager that sits on the product addition page. From which, you can do everything (ish - see notes) that the product attributes page does but in a much more convenient and tidy way.
* Installation takes < 5 mins
* Screen shots and full documentation in package
Expand All / Collapse All
Added tooltips to the sort buttons.
update guide included
COMPLETE PACKAGE
THe English Language file was missing <?php at the top, and the main file attributeManager.php had some errors where I had to change a lot of <?= to <?php and add the ending ;
Added installation instruction for osCommerce 2.3.1
http://www.safara.it
This update fix:
- Various Notice in arrays managment in of the script in Oscommerce v2.3.1
- Fixed bug of default configuration of QT-Pro (disabled)
- Some minor script
All Credits to original developers.
supported by: http://www.safara.it
The CSS-File has a bug which causes a change of the admin-layout (noticeable e.g. when using Mindsparx-Admin).
Simply replace line:
#attributeManager td, div {
With:
#attributeManager td,
#attributeManager div {
Notive the ",div". This statement overwrites previous CSS-definitions for div.
Update the portuguese language (portugues.php) for full QTpro support.
Fixed the problem with QTPro support (don´t track the stock).
Add 2 lines in language files...
Please read the changelog.txt in the package.
Até aqui nos Ajudou o Senhor!
Valmy Gomes - www.legalloja.com.br
Based on 2.8.7 by RusNN on 12 Jan 2008
==============================
Version 2.8.7
------------------------
* options as images is now included (not tested 100%)
* its possible to add and edit options and values
* tinybrowser is addes for better fileselection
all new features can be disabled from config file
Note that you may have to config the tinybrowser to set correct paths to your files(inside javascript folder)
English :
Yo use QTpro with this contrib, you must edit attributeManager - attributeManager - classes attributeManagerConfig.class.php and edit line 65 "AM_USE_QT_PRO" to "true"
Français :
Pour utiliser QTpro avec cette contribution, vous devez éditer le fichier attributeManager - classes - attributeManagerConfig.class.php et modifier la ligne 65 "AM_USE_QT_PRO" sur "true"
Small change to use Long Tags.
Removed all <? and <?= which were causing issues for servers without Short Tags off.
Added Hungarian from previous posting into main zip.
FULL PACKAGE
All credit to the original authors of this excellent contribution.
I had problems with the <br /> tags in the language files (just on my local server). After deleting these was everything OK.
Just the hungarian translation is attached.
Based on 2.8.6 by mytool of 12 Dec 2008
------------------------------------------
Version 2.8.7
This version is fully support QT Pro. Now you may do the following:
* Add options and options combination with quantity.
* Adding same option combination replaces the stock for that option.
* Delete options and combinations.
* Product stock is automatically corrected based on total options quantity in stock. Only quantity of 1 and more is take into account.
* Control deletes or not options combination with zero quantity from stock.
* Change only quantity of option and combinations (as you do for product price)
* Adding new options or attributes to product automatically results on ability to use them in QT Pro plugin
* If product has no option, you may add quantity to product itself
also
* Added support for More Product Weight plugin (default is turned off)
* Russian translation added
* Screenshot added
Read Release Notes in zip to more info and special features.
FULL PACKAGE
Open the zip file and follow the instructions
Ouvrir le fichier zip et suivre les instructions
as seen on the forum, some guys have trouble with the version of redrum (AJAX-AttributeManager-V2.8.6 (with one extra field)). just download it, when you know how to handle it, otherwise download this file.
changes:
- deleted the product_mo, which is not a part of this contrib
- added <?php instead of <? in german language file to make it php5-compatible
- updated tooltips for the buttons
I got a pretty mixed up database, but i still missed the next line:
options_values_model_no
So to fix it, i put the extra line ine my product_attributes Table:
ALTER TABLE `products_attributes` ADD `options_values_model_no` INT( 11 ) NOT NULL DEFAULT '0' AFTER `options_values_price` ;
in the zip file is nothing, thanx for this great contribution!!!!
This is an add-on implanted in the full package
Same package as below (V2.8.6) but with one additional field in the table products_attributes.
If you have an additional field you want to update thru AJAX-AttributeManager this may help you. Remember that this download is only for you that have added another filed in the table products_attributes.
Instructions:
Go thru all files and search for:
- model_no
- options_values_model_no
- model_no_
- model_no_new
and adapt them to your database table.
options_values_model_no should be replaced with your field name.
FULL PACKAGE!
- Changed a often reported Error in AttributeManagerConfig.class
- added the new Spanish Translation
The spanish language file included in the AJAX-AttributeManager-V2.8.5 package are incomplete and has only a partially translation.
This file contain a complete translation of the contribution
---------
El fichero con el idioma español incluido en el paquete AJAX-AttributeManager-V2.8.5 está incompleto y solo incluye una traducción parcial.
Este fichero contiene la traducción completa de la contribución.
downloaded this and loved it. Makes maintaining them pesky attributes a whole lot easier...
But I foudn that the popup fields were too small, should have auto prompted fir the data to be entered and I wanted all of the languages to auto fill with the first description i entered. So i thought i would release these changes just in case anyone else wanted them....
problems? only problem i can forsee is that if you have changed your default language away from id 1 as it takes this for granted but since this is only hard coded in in 2 places it should be easy to change.
enjoy,
Simon.
- There was a big problem that sorting and Download options will not work on a not yet saved Product, that i was not aware of. I did make changes that the sorting would also work on a new product, but the download option would not yet. So I disabled the functionality on the new Product page. If you want to add Attributes to a product, the product has to be saved first.
This is to make shure it works until it will work also in the new_product page---
Added instructions how to use the sort order on the product info page
- Sort order now working, relies only on product_attributes_sort_order for all sorting, so this has to be adapted on the frontpages in the Product-Optionsbox-....
- Added Download Options function: define a Download File for an option
- Cleaned some Style definitions and made Classes into CSS instead of direct Styles
Changes since "AJAX Attribute Manager v2.8.1"
* Fixed: Problems when you have " in the option name or value name.
* Fixed: Useless reordering the product options values when saving to, loading from template.
* Fixed: All attribute options are ordered by name.
* Fixed: All attribute values are ordered by the date they were added to a product/saved to template.
* Added: Two buttons to sort the attribute list.
* Added: Attribute price autoselect (only when price is "0.0000").
* Added: Some html optimization.
note: USE AT YOUR OWN RISK
Changes since "AJAX Attribute Manager v2.8"
* Fixed: No need to run extra MySQL query for am_attributes_to_templates.
* Fixed: Updating attributes for new products now works the same way like updating attributes for existing products.
* Fixed: Deleting attributes from new products now works.
* Fixed: Now adding "&" sign in product option names and product option values is possible.
* Added: Automated prefix when adding prices.
* Added: Brazilian Portuguese language thanks to Valmy Gomes.
note: I am not the original creator of the contribution
Changes since "V 2.7.1 FULL PACKAGE"
* Fixed: Prefix and Price update when adding new product.
* Fixed: Paths problem (on some systems).
* Fixed: SQL Query about adding price/prefix in the templates.
* Fixed: Default values when adding new option values thanks to pbor1234
* Added: french language thanks to zardhoz
note: I am not the original creator of the contribution
French translation of the file "attributeManager.php"
This file is to be placed under catalogadminattributeManagerlanguagesfrench
------------------------------------------
Traduction Française du fichier "attributeManager.php"
Ce fichier est à placer sous catalogadminattributeManagerlanguagesfrench
Applies default values for price and prefix when adding a new value to a product.
OK...
I had got a lot of warnings that the sql does not work fine. Quotes are the problem.
Try with this one:
ALTER TABLE am_attributes_to_templates ADD (
options_values_price decimal( 15, 4 ) ,
price_prefix char( 1 )
)
Added spanish translation
Added missing SQL instruction for templates to work fine.
ALTER TABLE `am_attributes_to_templates` ADD (
options_values_price decimal( 15, 4 ) ,
price_prefixchar( 1 )
)
All credits to contribution and addons creators. Thanks
----------
Se añade la traducción al castellano del módulo.
Se incluye una instrucción SQL que faltaba para que el módulo de guardar plantillas de atributos con precios funcione.
ALTER TABLE `am_attributes_to_templates` ADD (
options_values_price decimal( 15, 4 ) ,
price_prefixchar( 1 )
)
Todos los méritos para los creadores de la contribución y los que han hecho modificaciones previas.
Muchas gracias!!!
Ana
When you save or load a template, this update stores and loads the price and the prefix data.
This package include an outline of updates for:
Edits to: admin/attributeManager/classes/attributeManager.class.php
as well as an updated copy of that whole file.
Best wishes!
I have only the translation file german add.
note: I am not the original creator of the contribution
I have mistyped something in the previous version, it was sprint_f instead sprinf. fixed.
note: I am not the original creator of the contribution
this contribution seems working very good.
I have made it translatable.
I have corrected AJAX encoding.
I have made hebrew translation to it.
---
by Shimon Doodkin
- Sort order option update: automatic SQL installation (if activated).
- Installation instructions update (sort order part)
Great Contibution! Thanks.
Now the Problem which i had.
When you dont have any Attributes, the AJAX Attribute Manager will NOT add the first Attribute to the product.
After searching around i found out that this contrib have a problem if the products_options_values_id = 0 and/or products_options_id = 0
-> This is not a real Problem because the 2nd Attribute work fine, but the Attr. with the id's = 0 is not usable.
So here is my workaround.
1) Open File attributeManager.class.php
2) Search (Line: 225):
$id = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id');
foreach($arrOptions as $option) {
list($langId,$name) = explode(':',$option);
Add Below:
if ($id == 0){$id += 1;}
3) Search (Line: 267):
$newId = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS_VALUES,'products_options_values_id');
foreach($arrOptionValues as $optionValue) {
list($langId,$name) = explode(':',$optionValue);
Below Add:
if ($newId == 0) { $newId += 1;}
Finish!
Hope i could help you and maybe there would be a bugfix in next release.
Thanks for this great Contrib!!!
FIX: after modifying sort order field IE would lock
whole package included
Bug solved:
-Malfunctioning of loading a attribute template in a new product.
-Malfunctioning of saving attributes to new products.
Bug solved:
-Malfunctioning of loading a attribute template in a new product.
New:
- Saving and loading sorting of attributes
As suggested in the AJAX support forum, use this version if AJAX Attribute Manager v2.3c - beta is not working for you. The 2.3b also have a problem but this bugfix correct the problem in "attributeManagerAtomic.class.php" like suggested in the forum:
http://forums.oscommerce.com/index.php?showtopic=195959&hl=attributeManagerAtomic&st=260#
to fix you have to edit attributeManagerclassesattributeManagerAtomic.class.php
Line 139:
Find:
// QT pro
/**
* Updates the quantity on the products stock table
* @access public
* @author Phocea
* @param $get $_GET
* @return void
*/
function AddStockToProduct($get) {
customprompt();
$this->getAndPrepare('stockQuantity',$get,$stockQuantity);
//$this->getAndPrepare('option_id', $get, $optionId);
//$this->getAndPrepare('option_value_id', $get, $optionValueId);
//$this->getAndPrepare('price', $get, $price);
//$this->getAndPrepare('prefix', $get, $prefix);
//$this->getAndPrepare('sortOrder', $get, $sortOrder);
$this->arrSessionVar[] = array(
'product_stock_quantity' => $productStockQuantity
);
}
}
// QT pro
And replace:
// QT pro
/**
* Updates the quantity on the products stock table
* @access public
* @author Phocea
* @param $get $_GET
* @return void
*/
function AddStockToProduct($get) {
customprompt();
$this->getAndPrepare('stockQuantity',$get,$stockQuantity);
//$this->getAndPrepare('option_id', $get, $optionId);
//$this->getAndPrepare('option_value_id', $get, $optionValueId);
//$this->getAndPrepare('price', $get, $price);
//$this->getAndPrepare('prefix', $get, $prefix);
//$this->getAndPrepare('sortOrder', $get, $sortOrder);
$this->arrSessionVar[] = array(
'product_stock_quantity' => $productStockQuantity
);
}
// QT pro
Find: on the end file
?>
And replace:
}
?>
You should see on the end of the file something like this:
if (AM_USE_SORT_ORDER) {
$this->arrAllProductOptionsAndValues[$optionsId]['values'][$res['options_values_id']]['sortOrder'] = $res[AM_FIELD_OPTION_VALUE_SORT_ORDER];
}
}
}
return $this->arrAllProductOptionsAndValues;
}
}
?>
Fixed a couple of small typos in overall nice code by Phocea.
* Fixed a couple of bugs when not using the sort order plugin
Sort Order functionality is now switchable and easily configurable.
Ground work for QT Pro Plugin
See instructions in install.htm (read all the way through)
This version add support for the sort order on attributes values.
It is based upon one of the many existing attribute contributions which add sort order to it. Read the instruction to find out how to change it for the one you use.
Instruction to add other extra fields is also contained.
This is only a simple form field to fill to add the sort order, up/down button functionality might follow later.
sorry. Didn't quite fix the last bug::blush::
Complete Package
Bug fix....again
Complete Package
Small Bug Fix - IE was taking control of a text field and not giving it back! Fixed
Complete Package
renamed the DB class and every call to it to amDB to try and avoid any naming conflicts (with pear for instacnce).
Complete Package
very small bug fix todo with the not yet implemented sort order feature.
Sorry!
Complete Package
* Changed it so that only indiviual sections get updated each time an action is performed
Fixed a small problem with one of the javascript prompts if they contained a '
Fixed non-latin charicters showing up as question marks
changed all the prompts to make them more flexable
added Multilingual support
added attribute templates. With...
quick load
easy save
easy rename
delete
--- General Bug Fix release ---
* Compleatly rewrote all AJAX request javascript.
It was using prototype.js but that was conflicting with the html area contribution.
It should also speed up page load time. Much less code.
* Fixed the attributes not being entered into the db on a new product
* Fixed the attributes not being linked to the product when it was a new product
AJAX Attribute Manager v1.4 beta
What is this contribution??
The idea of this contribution is to make the administration of product options, option values and attributes much quicker and easier.
It uses a technology known as AJAX (Asynchronous JavaScript And XML). This enables us to do is make page sub-reqests without refreshing a page.
In this case, it enables us to make a attribute manager that sits on the product addition page. From which, you can do everything (ish - see notes) that the product attributes page does but in a much more convenient and tidy way.
* Installation takes < 5 mins
* Screen shots and full documentation in package
Note: Contributions are used at own risk.