The modification described here extends the dimension support so don't install this if you don't use full dimensional support. By installing this, you can store the information how boxes with products are packaged when the code is finished with it. It actually stores information from the PHP array that is produced.

You can view the information that is in that array in the additional admin file (shipping_boxes_used.php, link to it goes in the box Tools) that was written for this modification. Please be aware that version 1.5 of Shipping Boxes Used REQUIRES version 1.5 of the catalog packing class. Earlier versions of the packaging class simply stored the resulting packages array whereas the later version actually creates a more readable report.

You can delete entries easily from the MySQL table ups_boxes_used from the admin. You can also quickly select all entries on a page. This mimics the admin behaviour in version 3 of osC (at alpha 4 at this moment).

--------
Step 1
--------

A) Upload the included file shipping_boxes_used.php to the admin folder (same level as categories.php). 
B) Upload the accompanying language file shipping_boxes_used.php to  admin/includes/languages/english/ or whatever language folder you use in the admin.
C) Be sure you have uploaded version 1.5 of the packing.php class file to catalog/includes/classes.

--------
Step 2
--------

Run the following sql in phpMyAdmin or similar tool:

DROP TABLE IF EXISTS shipping_boxes_used;
CREATE TABLE shipping_boxes_used (
  id int unsigned NOT NULL auto_increment,
  date datetime DEFAULT NULL,
  customers_id int unsigned NOT NULL,
  boxes text,
  PRIMARY KEY  (`id`)
) CHARACTER SET utf8 COLLATE utf8_unicode_ci;

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Store result of packing routines', 'SHIPPING_STORE_BOXES_USED', 'false', 'Do you want to store the results of the packing routines in the database? See file store_shipping_boxes_used.txt in UPSXML package for details and modifications needed.', '7', '9','tep_cfg_select_option(array(\'true\', \'false\'), ', now());

--------
Step 3
--------

A) Modify catalog/includes/database_tables.php and add the following line: 

  define('TABLE_SHIPPING_BOXES_USED', 'shipping_boxes_used');

B) Modify admin/includes/database_tables.php and add the following line: 

  define('TABLE_SHIPPING_BOXES_USED', 'shipping_boxes_used');

C) Modify admin/includes/filenames.php and add the following line: 

  define('FILENAME_SHIPPING_BOXES_USED','shipping_boxes_used.php');

D) Modify the file admin/includes/languages/english.php, adding the line:

define('BOX_TOOLS_SHIPPING_BOXES_USED', 'Shipping Boxes Used');


--------
Step 4
--------

Modify catalog/admin/includes/boxes/tools.php:

Find the line:

      array(
        'code' => FILENAME_PACKAGING,
        'title' => BOX_TOOLS_PACKAGING,
        'link' => tep_href_link(FILENAME_PACKAGING)
      ),

insert afterward, the line:

      array(
        'code' => FILENAME_SHIPPING_BOXES_USED,
        'title' => BOX_TOOLS_SHIPPING_BOXES_USED,
        'link' => tep_href_link(FILENAME_SHIPPING_BOXES_USED)
      ),

--------
Step 5
--------


When you have done all of the above you can now go to admin->Configuration->Shipping/Packaging and change the setting for "Store result of packing routines" to true.

Now whenever a customer goes to checkout_shipping and you use full dimensional support an entry in the table shipping_boxes_used will be made with the boxes used for packaging and their contents. If the customer goes back to another page and again to checkout_shipping another entry is made and if he/she goes to checkout_payment another one is made. So you can find multiple entries for the same customer around the same time.

----------------
You're done