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
- 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 helpmepro1@gmail.com
http://help.me.pro@googlepages.com - web development help and website fixing service.
- 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.