Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Location
    Near Houston, TX
    Posts
    449
    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
    10,824
    Plugin Contributions
    80

    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
    Near Houston, TX
    Posts
    449
    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: 433
    Last Post: 20 Aug 2021, 01:15 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