AJAX Attribute Manager - v2.8.6 for Option Types v2

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 that the product attributes page does but in a much more convenient and tidy way.


Admin Attribute Manager Explained


- Back to Main Option Types v2 ReadMe



Contact Details

Features

Notes


Install Instructions

Note: if you are upgrading from a previous version you must OVERWRITE all files in the attributeManager directory. The best way is to delete the whole folder then add the new one.

1) Copy the contents of the "AttribManager AddOn" Directory into your admin directory.
(Your file structure should look like this /admin/attributeManager/)

2) Open admin/categories.php

Find (Around line 245 on a fresh 2.2rc2a)
            tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
          }
Below add
//BOF - Zappo - Option Types v2 - AttribManager - ONE LINE - AJAX Attribute Manager plugin
  require_once('attributeManager/includes/attributeManagerUpdateAtomic.inc.php'); 


Find (Around line 345 on a fresh 2.2rc2a)
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
Replace With
<!-- BOF - Zappo - Option Types v2 - AttribManager - AJAX Attribute Manager plugin //-->
<?php require_once( 'attributeManager/includes/attributeManagerHeader.inc.php' ); ?>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="goOnLoad();">
<!-- EOF - Zappo - Option Types v2 - AttribManager - AJAX Attribute Manager plugin (line above: changed SetFocus to goOnLoad) //-->


Find (around line 531 on a fresh 2.2rc2a)
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>
          </tr>
Below add
<!-- BOF - Zappo - Option Types v2 - AttribManager - AJAX Attribute Manager plugin //-->
          <tr>
          	<td colspan="2"><?php require_once( 'attributeManager/includes/attributeManagerPlaceHolder.inc.php' )?></td>
          </tr>
<!-- EOF - Zappo - Option Types v2 - AttribManager - AJAX Attribute Manager plugin //-->

Finished !

---> Go and add or edit a product and you should see the new attribute manager below the price.

Additonal Install instructions, to remove (the standard, unhandy and now obsolete) "Products Attributes"



- Instructions to add Extra Field

There is loads of contribution available for the attribute functionality. Each add different columns to the database and have different way of managing their update. If you want to add extra field to the Ajax Attribute Manager, to handle database values contained in the product_attributes tables, it is quiet easy to do. File to be changed are as follow:
attributeManager.php for the display of the new field and the insert and update action trigger (around line 196 & 271)
attributeManager.class.php (around line 457)
attributeManagerAtomic.class.php (around line 70, 150, 170)
attributeManagerInstant.class.php (around line 70, 133, 173)
attributeManagerUpdateAtomic.inc.php (around line 30)
attributeManager.js (around line 85, 106, 110)
Search for the "price" string and simply mimic the mechanism used for this field, you can also check the way sort order was added