Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    12
    Plugin Contributions
    0

    Default Accessing the database

    Hi! I'm just getting my feet wet in this cool Zen Cart, and I'm wondering where I could find the script for accessing the database? I'm trying to customize my products page and I want to pull some data directly from the products table.

    I could just write out my own script to connect to the database, but I figured that there's probably one written already, why not use it?

    I'm having a lot of trouble finding my way around all the file includes and templates. It's a rather complicated entanglement of files!

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Accessing the database

    There's already a query extracting data from both the products and products_descriptions table for that page - why not just add the fields you want to that query rather than create an extra query?

    The query in question is constructed at line 45 in includes/modules/pages/product_info/main_template_vars.php and executed at line 62
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    May 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Accessing the database

    Yep, that's exactly what I want to do, and exactly what I needed to know. Thank you, bunyip! I appreciate your help

 

 

Similar Threads

  1. v150 Accessing Product Prices From A Remote Hosted Database....
    By Coins2012 in forum General Questions
    Replies: 12
    Last Post: 3 Aug 2012, 05:23 AM
  2. accessing existing product database with zencart
    By grossd in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Feb 2009, 03:26 AM
  3. Accessing a database table
    By Davep in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Feb 2008, 02:41 AM
  4. Exporting Customer Database and accessing passwords
    By Orders in forum Managing Customers and Orders
    Replies: 6
    Last Post: 21 Aug 2006, 10:04 PM
  5. Multiple Zen Carts accessing one database
    By mdmerrell in forum General Questions
    Replies: 2
    Last Post: 15 May 2006, 06:28 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