Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default auto installer for sql in admin

    I need a sample and the only mod I can remember that does this is image handler - way to much code! What mod is a good example or can someone post some guidelines / bits of code?
    The full-time Zen Cart Guru. WizTech4ZC.com

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: auto installer for sql in admin

    There are two approaches to the admin auto-install
    1. Use a file in /includes/functions/extra_functions if you don't need to create a message to the user.
    2. Use an auto_loader and an init_include if you do need to "message" the user.

    The Super Globals plugin uses method #1 and shows the insertion of a new configuration group and the associated admin-pages settings.

  3. #3
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: auto installer for sql in admin

    Perfect and it looks like I need that super globals plugin. It really would be nice to have the helpful mods for development grouped together.
    The full-time Zen Cart Guru. WizTech4ZC.com

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: auto installer for sql in admin

    Quote Originally Posted by lat9 View Post
    There are two approaches to the admin auto-install
    1. Use a file in /includes/functions/extra_functions if you don't need to create a message to the user.
    2. Use an auto_loader and an init_include if you do need to "message" the user.

    The Super Globals plugin uses method #1 and shows the insertion of a new configuration group and the associated admin-pages settings.
    and Super Orders might an example for #2..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: auto installer for sql in admin

    Well, that brought up a few more questions. I'm creating a table in this mod so I need to check to see if the table exists first. Is there a zc function for that?

    Secondly, in creating a table - I assume I have to worry about whether there's db prefix. syntax hint?

    Thanks to both of you for responding so quickly today.
    The full-time Zen Cart Guru. WizTech4ZC.com

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: auto installer for sql in admin

    Quote Originally Posted by delia View Post
    Well, that brought up a few more questions. I'm creating a table in this mod so I need to check to see if the table exists first. Is there a zc function for that?

    Secondly, in creating a table - I assume I have to worry about whether there's db prefix. syntax hint?

    Thanks to both of you for responding so quickly today.
    That's why I suggested you look at Super Orders.. It covers a lot of things like checking to see if a table exists, and registering supporting admin pages that aren't found in a menu like popups..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: auto installer for sql in admin

    Take a look at the init_referrers.php (init_include) used by SNAP Affiliates. It uses the sniffer class to see if a table exists (or on an upgrade if a field within a table exists).
    Last edited by lat9; 10 Jul 2014 at 03:36 PM. Reason: Correct file name

  8. #8
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: auto installer for sql in admin

    Oh, good! Digging in now.
    The full-time Zen Cart Guru. WizTech4ZC.com

  9. #9
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: auto installer for sql in admin

    Thanks, I did it!!!
    The full-time Zen Cart Guru. WizTech4ZC.com

 

 

Similar Threads

  1. Admin auto login for a cron job
    By Gigo in forum Customization from the Admin
    Replies: 20
    Last Post: 9 Aug 2012, 07:39 AM
  2. SQL Patch - how do I install it for Admin Profiles?
    By tstanley in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 8 Nov 2010, 02:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR