Zen Cart Logo
Forums / Upgrading to 1.5.x / admin/includes/boxes elimination in 1.5.x

admin/includes/boxes elimination in 1.5.x

Views: 1,714

Results 1 to 3 of 3
28 Dec 2011, 4:13 AM
#1
ilikemike avatar

ilikemike

New Zenner

Join Date:
Dec 2010
Posts:
31
Plugin Contributions:
0

admin/includes/boxes elimination in 1.5.x

Following swguy's hint about the elimination of admin/includes/boxes in 1.5.x (and the associated *_dhtml.php files), I compared email_archive_manager_1-6 to email_archive_manager_17_zc1-5 and the only substantial difference I found was the mapping of email_history_tools_dhtml.php:

$za_contents[] = array('text' => BOX_CUSTOMERS_EMAIL_HISTORY, 'link' => zen_href_link(FILENAME_EMAIL_HISTORY, '', 'NONSSL'));

to email_archive.sql:

INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('emailArchive', 'BOX_TOOLS_EMAIL_ARCHIVE_MANAGER', 'FILENAME_EMAIL_HISTORY', '', 'tools', 'Y', 999); 

When trying to migrate a module like the Downloadable Product Licensing and Subscriptions Module I can probably figure out how to map "$za_contents[]" to "INSERT INTO admin_pages" using the example above.

But unfortunately the Downloadable Product Licensing and Subscriptions Module is more complex than that Email Archive Manager example and so I am not sure how I can port/map the rest of the code to .sql.

Where can I find more information about the inner workings of the migration from the 1.3.x admin boxes to the 1.5.x ones?

28 Dec 2011, 5:45 AM
#2
ilikemike avatar

ilikemike

New Zenner

Join Date:
Dec 2010
Posts:
31
Plugin Contributions:
0

Re: admin/includes/boxes elimination in 1.5.x

Trying to answer myself, based on my research so far:

When comparing core files between product_licensing and zen-cart-v1.3.8a-full-fileset-12112007 (for which it was made), I can see that only only one admin/includes/boxes file is different: customers_dhtml.php.

In that file, only one line is added by the add-on:

  $za_contents[] = array('text' => BOX_PRODUCT_LICENSES, 'link' => zen_href_link(FILENAME_PRODUCT_LICENSES, '', 'NONSSL'));

Which makes it easier to map to 1.5.x's .sql:

INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('productLicensing', 'BOX_PRODUCT_LICENSES', 'FILENAME_PRODUCT_LICENSES', '', 'tools', 'Y', 999);

Can you spot any mistake in the above?

Is the above SQL line the only line that needs to be added into product_licenses.sql?

28 Dec 2011, 8:12 AM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: admin/includes/boxes elimination in 1.5.x

The mod to which you refer isn't more complex, merely a bit messed up. I suspect the author didn't understand the naming conventions for extra boxes and so the attempt to add a menu item properly didn't work, hacked the customers box file instead, but included the non-functioning code in the release package too.

Given this, your assessment is broadly correct. I haven't tested it, but see no reason why it shouldn't work, though you would probably want to use the "customers" menu key rather than "tools".