
  AJAX AttributeManager

  Designed for:
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Released under the GNU General Public License
  
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

---------------------------------------------------------------------------------

V1 beta - First Release

v1.1 beta 
  --- General Bug fix release ---
  * Slash problem fixed - thanks dynamoeffects
  * install documentation updated
  * Simplification of stop direct access logic - thanks tbruelan
  * rework of core page actions 
  * moved configuration into its own class to aid with future changes
  * fixed session variable not being reset when new product addition is canceled
 
v1.2 beta
  --- General Bug Fix release ---
  * fixed a javascript error when a option or option value was removed that contained a '

v1.3 beta
  --- General Bug Fix release ---
  * forgot to change one of the requires for the change of configuration

v1.4 beta
  * Change of Copyright Notice as requested by the OSCommerce Team
  
v1.5 beta
  --- 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

v1.6 beta
  --- New features release ---
  * 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

v1.7 beta
 * very small bug fix todo with the not yet implemented sort order feature

v1.8 beta
 * renamed the DB class and every call to it to amDB to try and avoid any naming conflicts (with pear for instacnce)

v1.9 beta
 * fixed a problem with IE capturing the text field and not giving it back!

v2.2 beta
 * Added support for product attributes sort order as well as pointers on how to add other fields

v2.3 beta
 * Sort Order functionality is now switchable and easily configurable. Ground work for QT Pro Plugin

v2.3b beta
 * Fixed a couple of bugs when  not using the sort order plugin

v2.4b beta
Bug solved:
 * Malfunctioning of loading a attribute template in a new product.
New:
 * Saving and loading sorting of attributes

v2.5b beta
 * Malfunctioning of loading a attribute template in a new product.
 * Malfunctioning of saving attributes to new products.

v2.5.1b beta
 * Fixed: after modifying sort order field IE would lock

v2.5.2b beta
 * Instructions updated.

v2.5.3 beta
 * Fixed: When you dont have any Attributes, the AJAX Attribute Manager will NOT add the first Attribute to the product.

v2.6
 * Fixed: Installation + instructions of sort order plugin.

v2.7
 * Added Ability to Translate and and load translations + translated to Hebrew.

v2.8 beta
 * 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.

v2.8.1 beta
 * 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.

v2.8.2 beta
 * 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.

v2.83 - 2.8.4 bety
* Added: Every Option can now have an Download option
* Added: SortOrder implemented. 

v2.8.5
* Fixed: On a new product Page, the attributeManger with the Sortorder would not work properly (yet) -> attributeManagerAtomic.class.php not done yet. I disabled this functionality, so you first have to save the product bevore adding Product Options

v2.8.6
* Changed a often reported Error in AttributeManagerConfig.class
* added the new Spanish Translation

v2.8.7
* Added support for More Product Weight plugin (default is turned off)
* Rework of some QT Pro code to fully support QT Pro (see "Release Notes 2.8.7.txt" file)
* Russian translation added

v2.8.8 by Gilo_m
* Fixed: Use of short tags <? and <?= causing the crash using <br />
* Added in Hungarian language file into main zip

v2.8.9 BY Valmy Gomes (LegalLoja.com.br)

*Fixed the problem with QTPro in javascript/attributeManager.js 

*update the language portugues.php and add the lines above:

	define('AM_AJAX_MOVES_OPTION_UP', 'Mover opção para cima');
	define('AM_AJAX_MOVES_OPTION_DOWN', 'Mover opção para baixo');

v2.8.9.3 by lildog
	* added tooltip to sort buttons

v2.8.10 by modem2.0
- Fixed all <? echo by <?php echo
- Fixed all <?= by <?php echo
- Improved portuguese language.
- Disable by default the support to Use More Product Weight and Attributes Sort Order

v2.8.11 by surfalot mtholforty [at] surfalot [dot] com
+ Updated mysql function to msqli for forward compatibility (should maintain backward also)
+ removed PHP5 deprecated idiom  =& new  in attributeManagerGeneralFunctions.inc.php
+ Fixed  PHP Strict Standards:  Non-static method amDB::xxxxx() caused on PHP5.4.
+ Fixed "Illegal string offset 'id' & 'text' in html_output.php" caused by malformed array passed to tep_draw_pull_down_menu in attributeManagerPrompts.inc.php
+ Fixed more short <? PHP tags, extra commas, and missing semi-colons
+ Sync all language files and converted all files to UTF-8
+ Added some missing changelog stuff
+ Included required GNU License Statement

v2.8.12 by surfalot mtholforty [at] surfalot [dot] com
+ Fixed Call to undefined function amGetSesssionVariable() introduced in v2.8.11
+ Semicolon missing in: \admin\attributeManager\javascript\requester.js
+ Added UTF8 Character Encoding to the created tables.
+ Fixed PHP Strict Standards:  Only variables should be passed by reference in attributeManagerGeneralFunctions.inc.php caused on PHP5.4.
+ Various input scrubbing issues cleaned up. (I know, it's behind a login and not hugely important, but I sleep better)
+ Fixed a couple more PHP5 deprecated pass by reference issues


v2.8.13 by Phocea
+ Added plugin option for Attribute Product Codes to the PHP5 version of this contribution

v2.8.14 by surfalot mtholforty [at] surfalot [dot] com
+ Turned off QT Pro plugin that was left enabled in Phocea's version
+ Fixed 1062 - Duplicate entry '1-4' for key 'PRIMARY'  
        insert into products_options_values (products_options_values_id, ...
        in shops with osC2.2ms2 & using mysql_  PHP functions

v2.9 by @raiwa info@oscaddons.com www.oscaddons.com
+ updated for 2.3.4 BS Community version
  - hardcoded filenames, database table names and paths
+ PHP 7+ compatibility
  - changed class constructor names to "__construct", added empty class constructor function to
  - empty class constructor added to attributeManager.class.php
  - mysql_get_server_info updated to mysqli_get_server_info
+ updated instructions for latest 2.3.4BS EDGE (at June 20017)
+ screenshot with all additional suported contributions added to instructions
+ included modified files updated to latest 2.3.4BS EDGE (at June 20017)
+ support added for Options Images BS (latest version 1.5) https://apps.oscommerce.com/ijmp8&options-images-bs
+ layout clean up for additional add-ons (Code) and labels added
+ completed translation for spanish and german
+ old PHP4 versions removed 


v2.9.1 by @raiwa info@oscaddons.com www.oscaddons.com
+ switched all additional add-on support to false in config file: admin/attributeManager/includes/classes/attributeManagerConfig.class.php. Thanks to @altoid and @PiLLaO
+ Fixed sql query for QTPro when options images are not switched on. Thanks to @PiLLaO


v2.9.2 by @raiwa info@oscaddons.com www.oscaddons.com
+ updated for PHP 7.2 compatibility. Changed deprecated while...each loops to foreach loops. Fixed undefined errors.
+ Added sort order support for 2.3.4.1 CE Frozen modular Product Info page.

v2.9.3 by @raiwa info@oscaddons.com www.oscaddons.com
+ Fixed undefined errors and other PHP  7.2 warning errors.

v2.9.4 by @raiwa info@oscaddons.com www.oscaddons.com
+ Fixed undefined errors and other PHP  7.2 warning errors.
+ Removed support for attribute products code contribution.
+ Fixed incompatibility with admin => Configuration => Sessions => Force Cookie Use => true.

v2.9.5 by @raiwa info@oscaddons.com www.oscaddons.com
+ Fixed accidentally removed code which broke the price update. Thanks to @John W
+ Fixed some other minor glitches and code cleanup.

v3.0.0 by @raiwa info@oscaddons.com www.oscaddons.com
+ Updated for Phoenix 1.0.x.x compatibility
+ Added code reference for Phoenix
+ Fixed some undefined notice errors.

v3.1.0 by @raiwa info@oscaddons.com www.oscaddons.com
+ Updated for Phoenix 1.0.3.x compatibility
+ hooked all modifications.
+ No core file changes any more.

v3.1.1 by @raiwa info@oscaddons.com www.oscaddons.com
+ fixed wrong css definition which caused all text in admin to show reduced. Thanks to @LeeFoster and @Omar_one for the report and testing

v3.2.0. by @raiwa info@oscaddons.com www.oscaddons.com
+ updated for Phoenix 1.0.5.9+ (jquery update and bootstrapped admin/categories.php)

v3.2.1. by @raiwa info@oscaddons.com www.oscaddons.com
+ removed deprecated SetFocus function call. Thanks to @PiLLaO

v3.3.0. by @raiwa info@oscaddons.com www.oscaddons.com
+ removed duplicated language definitions. Thanks to @kgtee
+ fixed unbalanced table columns. Thanks to @radhavallabh
+ added table titles.
+ updated to bootstrap design elements (buttons, tables etc).
+ replaced image icons by fontawesome icons.
+ removed deprecated css
+ removed deprecated image icons
+ replaced jquery with native javascript in admin hooks. Thanks to @PiLLaO
+ removed qtpro support. It's now available in it's own tab on the product edit page.
+ updated sort order support modifications in cm_pi_options_attributes.php

v3.3.1. by @raiwa info@oscaddons.com www.oscaddons.com
+ fixed notice errors for new product. Thanks to @jonwix for the report
+ removed obsolete script type declarations. Thanks to @radhavallabh for the report and testing
+ removed deprecated sql support.

v3.3.2. by @raiwa info@oscaddons.com www.oscaddons.com
+ added support for Phoenix 1.0.7.10 core sort order
+ removed optional product_options_sort_order support
+ added auto update script for product_options_sort_order to core sort order columns.
+ normalized spacing and indents.
+ updated custom database functions to use core functions.
+ modernized coding to match core standards

v3.3.3. by @raiwa info@oscaddons.com www.oscaddons.com
+ fixed bad encoding in russian language file. Thanks to @Fredi
+ fixed duplicated and removed unused definitions in language files. Thanks to @Dennis
+ modernized code to match actual core standards.

v3.3.4. by @raiwa info@oscaddons.com www.oscaddons.com
+ updated deprecated session functions for Phoenix 1.0.7.14. Thanks to @vmn

v3.3.5. by @raiwa info@oscaddons.com www.oscaddons.com
+ added install script for sort_order column in products_attributes table if missing. Thanks to @radhavallabh and @Patrick_R for the report
+ Added instructions to modify product info options attributes module's query to use product based attributes values sort order.