Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default What does what? Template, module, etc

    I dove right into Zen Cart and I'm sure part of the problem is trying to learn everything at once. However, can anyone point me to a very simplistic yet informative place where there might be a flowchart or a clear explanation as to what templates and modules are for, which one drives the others, why there are .php file in

    /includes
    /includes/language/english
    /includes/modules
    /includes/templates

    I'm still trying to grasp what is truly doing what. (FYI: I've added the grid / layout add on with success) For example i have changed the /includes/language/english/custom/products_info.php so that in the product info screen it no longer reads "model:" and now reads "part #:"

    On the grid screen with 3 wide and 4 rows down it shows the data for model (ie 100000) and I want to update this to read "part #: 100000" amongst other changes.

    Again I'm trying to understand the flow because I think once I do, I will not have to trouble the community with these rather simple questions. Please note I have spent some time in the forums lurking, looking @ wiki, and doing trial and error before raising the newbie question.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: What does what? Template, module, etc

    Diving right in is the way to do it, IMO.

    First, install the Firefox browser and the Web Developer plugin for Firefox. You can use those to see where in the stylesheet you change the styling of the various page elements.

    Ctrl-Shift-Y will allow you to hover over a section of the page and see the class and id names for that section in the box at the top. The statements in the stylesheet that begin with # are id's and the ones that begin with dots are classes.

    Ctrl-Shift-E will open the CSS editor and allow you to edit the stylesheet and see the changes in real time without changing anything permanently. An essential tool.

    Some prefer Firebug, which does much the same thing.

    (If you're using Firefox 4, you'll need to remap the editor shortcut, since Firefox has appropriated Ctrl-Shift-E for an internal function - I use Ctrl-Shift-Q.)

    Generally, the files in the english folders and module folders determine what appears on a page and the template files determine how that data is displayed.

    Probably need to see the actual site to answer your specific question, but you did the right thing in the first example.

    Another valuable tool is Admin - Tools - Developers Tool Kit where you can search for strings you want to change.

  3. #3
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: What does what? Template, module, etc

    OK so I have now FULLY downloaded web developer. sorry the site is not live. It currently is on a test server and I can't capture the screen shot in a file size to comply with forum requirements.

    However the view style under web developer returns the below:

    html > body #indexBody > div #mainWrapper > table #contentMainWrapper > tbody > tr > td > div #indexProductList .centerColumn > form > div #productListing > table #cat1080Table .tabTable > tbody > tr > th #listCell0-0 .centerBoxContentsProducts centeredContent back

    If you can imagine, i get the above text when I hover over one of the items in the grid / column format. It puts a red box around that item. The item is laid out as

    "model"
    image of product
    "product"
    "product description"
    "price"
    add: "order qty"

    Let's say I want to add

    part #: "model"
    dealer: "price"

    What is the key ingredient in the web developer code that tells me which .php file to update? I suppose I don't understand how the id and class function. Is that why I am lost?

    Let me also make sure I'm clear on the files as well.
    --.php files in english and module folders determine the data from MySQL and any other hard coded text to be displayed.
    --.php files in template folder dictates whether price is above or below the image, in the upper right hand corner or lower left, etc.
    --.css files dictates the color, font size, and margins.

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: What does what? Template, module, etc

    Quote Originally Posted by idc1 View Post
    I dove right into Zen Cart and I'm sure part of the problem is trying to learn everything at once. However, can anyone point me to a very simplistic yet informative place where there might be a flowchart or a clear explanation as to what templates and modules are for, ...
    Did you try the Turtorials/FAQ link above? Do you know about The Book?

    Rob

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: What does what? Template, module, etc

    The file groups are not so clear-cut in their functions... Language files do determine all output text (except what is stored in the database and retrieved by module files).
    Module files generally determine what data is available to be output, and template files determine what format the output will take, though those roles can be muddied in some places, with one or the other doing nearly all the work. CSS files can actually control significant features of the page layout as well as colors. fonts, etc.

  6. #6
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: What does what? Template, module, etc

    Quote Originally Posted by rstevenson View Post
    Did you try the Turtorials/FAQ link above? Do you know about The Book?

    Rob
    Are you referring to the TEN TON book? I've checked my library (unfortunately they don't have it) because I wanted to thumb through the series to see if and which one offers the info I think I need. If there is another book, then I guess I'm not aware of it. Please enlighten me.

    Thanks gjh42. So it's not cut and dry. Everything can do everything....that's just great. I just need to learn the language so that I can trace back to the point where I need to be to make changes.

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: What does what? Template, module, etc

    No, the link to the 'original' book is at the top of this page. I haven't looked at the Ten Ton stuff yet.

    As Glenn said, (and I almost did), defines are contained mostly in language files, module files determine what's contained in the page and template files (including stylesheets) determine how that data is displayed. There are exceptions, but it's not a free-for-all.

    In the case of your example, it looks like you would want to edit a define. I used the DTK to search for model: and got 8 files returned. You kind of have to look through the filenames and paths to figure out which one(s) you want to change. In this case, I would try includes/languages/english/product_info.php first, assuming you want to change model: to part#: on the product info page.

  8. #8
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: What does what? Template, module, etc

    OK now I remember seeing the book banner. Is it a good book for a beginner to developers?

    I was able to type "add:" into DTK and saw that if I wanted to make a change to "add:" I would have to do so in /includes/language/english.php I'm ok with this process of finding where i needed to be (mainly because it worked this time).

    Next using web developer and the following link as a reference: http://(sorry, site offline)/1-3-9d/...ir=gloss_black

    1) ctrl + shft +y allows me to hover over the area with price, "add" and the qty field. Is there a way (other than tabbing to the information bar) that the path can be copied. I can't seem to read the entire path and if you move your mouse it changes the path to whatever you happen to be over.

    2) That same information block returns the following path: html > body #indexBody > div #mainWrapper > table #contentMainWrapper > tbody > tr > td > div #indexProductList .centerColumn > form > div #productListing > table #cat3_10Table .tabTable > tbody > tr .productListing-odd > td .productListing-data
    If I want to move the header "price" to be listed before $29.99, $34.99, $42.99, and so on how do I use the path from Web developer to trace the origin file to change.

    Sorry for being like a grade school math teacher but could someone possibly give me the logic of how you get from point A to point Z...not just the answer.

  9. #9
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: What does what? Template, module, etc

    Goh Koon Hoek's Book (advertised on this site), is excellent if you want to get a good grasp of how the admin console works, and it is a very good place to start, because having a better understanding of the admin functions will helo you to see relationships between various bits of the software.

    There are some 2000 software FILES in zencart, and with a probable average of say 250 lines of code in each (average), you're looking at about 700,000 lines of code that make this all hang together.

    To add to your confusion, go HERE to see a schema of the database.

    But the good news is that you don't need to concern yourself with the vast majority of all this techno stuff.

    The really key areas for the novice user are the CSS stylesheets, and knowing what controls the style of elements in a displayed page (use firefox firebug), the many language.php files, and your admin area.

    Give yourself a year or two, and you'll eventually get to grips with the module files and a few others.

    Rather focus on selling products... put your time and energy into marketing and selling... Trust that zencart will work - even if you don't quite know how.

 

 

Similar Threads

  1. How to see what file does what?
    By WhitePhantom in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Jan 2012, 06:27 PM
  2. Does anyone no what this flash module is
    By andybr1ggs in forum General Questions
    Replies: 1
    Last Post: 25 May 2010, 08:08 PM
  3. Best practice for finding out 'what does what'?
    By budfox in forum General Questions
    Replies: 6
    Last Post: 19 Aug 2007, 07:05 PM
  4. So, what credit card module DOES work?
    By digidiva-kathy in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 10 Sep 2006, 03:25 PM

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