Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    524
    Plugin Contributions
    0

    Default Database and New Plugin

    I am working on a new plug-in and I need to store "last reported inventory values." The easiest thing to do is to add a field to the products table (SBA is another consideration for later). Is that considered the best practice? I guess as long as I include both field creation in the install script and deletion in the uninstall script I should be okay, right?

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

    Default Re: Database and New Plugin

    Quote Originally Posted by g2ktcf View Post
    I am working on a new plug-in and I need to store "last reported inventory values." The easiest thing to do is to add a field to the products table (SBA is another consideration for later). Is that considered the best practice? I guess as long as I include both field creation in the install script and deletion in the uninstall script I should be okay, right?
    FWIW, adding that field to the products table would be the approach I'd use. Just name the field 'appropriately' so that it's not likely to be overwritten by a Zen Cart upgrade that adds such a field.

  3. #3
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    524
    Plugin Contributions
    0

    Default Re: Database and New Plugin

    Quote Originally Posted by lat9 View Post
    FWIW, adding that field to the products table would be the approach I'd use. Just name the field 'appropriately' so that it's not likely to be overwritten by a Zen Cart upgrade that adds such a field.
    Good Point, I never considered that another upgrade would overwrite it! Thanks!

 

 

Similar Threads

  1. v155 Database I/O Manager (DbIo) Plugin [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 475
    Last Post: 23 Feb 2024, 05:44 PM
  2. Database - Updating new database with old database info
    By J9MM0 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Feb 2020, 11:45 AM
  3. v155 New install 155f and new database, admin lockout
    By jhande1 in forum General Questions
    Replies: 15
    Last Post: 25 Jan 2018, 05:57 PM
  4. new directory and database
    By cactusrunning in forum Upgrading from 1.3.x to 1.3.9
    Replies: 12
    Last Post: 10 Nov 2010, 06:40 PM
  5. New to Zen Cart and trying to duplicate a Template and database?
    By Winks in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 May 2007, 04:42 PM

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