Or, to ensure future compatibility, you could use the $db->Insert_ID () function to retrieve that last inserted ID.
Printable View
Exactly! With the caveat that you'll need a
statement if the processing occurs within a function.Code:global $db;
and THAT's where you lost me..
Drat!!! JUST when I thought I was getting it..:laugh: going back to the lab to see if I can figure out the answer on my own.. :smile:
Edited to Add:
So altogether now..:laugh:
Code:function install_quick_updates() {
global $db;
$db->Execute("INSERT INTO ".TABLE_CONFIGURATION_GROUP." VALUES ('', 'Quick Updates', 'Quick Updates Configuration', '1', '1')");
$group_id = $db->Insert_ID();
$db->Execute("UPDATE ".TABLE_CONFIGURATION_GROUP." SET sort_order = ".$group_id." WHERE configuration_group_id = ".$group_id);
if (function_exists('zen_register_admin_page')) {
if (!zen_page_key_exists('quick_updates_config')) {
zen_register_admin_page('quick_updates_config', 'BOX_CATALOG_QUICK_UPDATES','FILENAME_CONFIGURATION', 'gID='.$group_id, 'configuration', 'Y', 103);
}
}
Yes:clap:
Hey Diva! You have a LAB?!?! LOL. I have a living room with too many computers! Got a letter from the electrical company telling me I use TWICE as much electricity as my neighbors. Go figure!
Anyway! I looked at your github updates...
Are you going to update the release for 1.5.3 here?
Will QuickUpdates still be backwards compatible?
Are you going to update the version number?
-chadd
Opps, my bad. I should have read back a few more pages. Confused myself ... my own experimental version of QuickUpdates is also v2.07! :p
Perhaps too late if you already submitted, but since you're dropping support for previous zencart version, mayhap a change to v3.0?
Just thinking out loud...
When I get some time in the next week I might update for 1.5.3.. If I do upgrade it, I have NO plans for backwards compatibility. It's JUST too much work and NOT worth my time/effort to maintain "parallell" versions of a module.. -- IMHO folks should simply UPGRADE and stop dinking around.. If they are STILL running <= v1.3.9 they REALLY need to upgrade and stop playing around..
I already updated the version number (v2.07)
That said I will only update my Github repo.. Not ready to submit it to the downloads section as there is still a MESS of crap in this module that needs to be cleaned up before it's ready to "release" IMHO (see below).. Some of these things I've already addressed in the Github repo (all that silly "popup" edit crap).. But this thing still doesn't properly work with the default editor, and the "Activate/Deactivate Commercial Margin" is not well well explained/documented.. Not sure if it works/doesn't work or WTF it's supposed to do..
Sources: http://www.zen-cart.com/showthread.p...54#post1228554
"Activate/Deactivate Commercial Margin" sounds like some long dead contribution... time for the weed whacker! I had a lot of that when I was cleaning up EasyPopulate ... what a tangled mess!