Results 1 to 5 of 5
  1. #1

    Default How does the database_tables.php get called

    Hello,

    I was not sure on where to put this question. I have been working with a few clients that use zen cart for a little while now. I have been asked to make some custom modifications to there site that are otherwise non existent at the moment - i.e. new tables will need to be created.

    I understand I should be placing these tables in the extra_datafiles directory however I do not understand how these datafiles are called.

    Does anyone have any insight to this?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How does the database_tables.php get called

    I understand I should be placing these tables in the extra_datafiles directory
    Tables are in the DataBase not in directories...the files that interface with the DB and create the display are in directories
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How does the database_tables.php get called

    Quote Originally Posted by Capslock118 View Post
    I understand I should be placing these tables in the extra_datafiles directory however I do not understand how these datafiles are called.
    Yes, you are correct.

    You can use the /includes/database_tables.php file as an example of the correct way to define the table names so Zen Cart can make reference to them.
    Your additions should be placed in the extra_datafiles folder, and you should not touch the existing database_tables file.
    If you're writing admin modules that use those same table definitions, you'll need to copy those definitions to the admin's extra_datafiles folder as well.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4

    Default Re: How does the database_tables.php get called

    Thanks for the information.
    Kobra, yes you are correct, I explained myself wrong.

    I am still unsure on how these files are called in the application. I am looking to understand why these lines of code are even read by the application as I see no apparent location in the config.php or application_top.php where it is called.

    Knowing where to put lines of code is one thing, understanding why it works is another and the latter is what I am trying to achieve :)

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How does the database_tables.php get called

    Quote Originally Posted by Capslock118 View Post
    Knowing where to put lines of code is one thing, understanding why it works is another and the latter is what I am trying to achieve :)
    How the initSystem works: http://www.zen-cart.com/wiki/index.p..._API_Tutorials
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v150 How does the orders_total table get updated?
    By jaiba in forum General Questions
    Replies: 1
    Last Post: 26 Aug 2014, 06:34 PM
  2. Replies: 1
    Last Post: 30 Oct 2011, 02:36 PM
  3. What is this called and how do I get it...?
    By nerdgeek in forum General Questions
    Replies: 2
    Last Post: 25 Sep 2008, 02:06 PM
  4. can database_tables.php be overridden?
    By Jeff G in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Sep 2008, 03:27 AM

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