Thread: basics

Results 1 to 10 of 48

Threaded View

  1. #37
    Join Date
    Feb 2007
    Posts
    61
    Plugin Contributions
    0

    Default Re: basics

    Quote Originally Posted by DrByte View Post
    I think the link above is what TinaS was referring to.

    While the about-us contribution doesn't pull data from the database, it does demonstrate the infrastructure used for a new "page" in Zen Cart (ie: one that can be accessed via ...index.php?main_page=blahblah

    You can build all the DB-query code you want inside the module file (in this case includes/modules/pages/about_us/header_php.php -- stuff the output into relevant variables, and then use the tpl_about_us_default.php template file to loop thru its content with appropriate echo statements as needed (or no loop if not an array, etc).

    Generally, a "module" prepares data which can be used "for" display. This can be extracting from database, parsing POST/GET data, accessing external resources, etc.
    The "language" files are used to define language-specific text "for" output.
    The "template" files are used to render actual output. Sometimes this is done via include() and sometimes by echo ... sometimes both.
    Hi,

    I will check what you said and I did this also . I will try a php file as well but do i need to use ZC variables or is it all my own code?

    I put the files in this location and
    /includes/languages/english/custom/about_us.php
    /includes/languages/english/extra_definitions/custom/about_us.php
    /includes/languages/english/html_includes/custom/define_about_us.php

    I see the link to the page and see the file in define pages aboutUs but the link fails page not found.
    Last edited by jagguy; 22 Feb 2007 at 09:51 AM.

 

 

Similar Threads

  1. v154 Right Back to Basics
    By adb34 in forum Basic Configuration
    Replies: 3
    Last Post: 3 Apr 2015, 04:34 PM
  2. Back to Basics w/a Glitch
    By sammirah in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 10 Apr 2012, 08:12 PM
  3. layout basics
    By mex in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 23 Feb 2007, 05:09 AM
  4. Credit Card Basics
    By LeJerque in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 19 Dec 2006, 04:35 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