Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Posts
    23
    Plugin Contributions
    0

    Default Difference between a module and a template?

    Hi - Can someone explain the difference between a module file and a template file (tpl_)? Thanks.

    Jason

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Difference between a module and a template?

    Not sure I understand your question.

    Although you defined a Template file you didn't define a Module file, no basis for comparison.

    Anyway, a Module is to alter previously installed files in some way. Be it a Template file or a default Zen Cart file makes no difference to the Module, depending upon the use of the Module.

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Difference between a module and a template?

    Generally speaking, a module influences a behaviour of your zenshop, while a template influences an appearance.

    eg:
    • a payment MODULE will enable a method (behaviour) for customers to pay for their purchases.
    • the "classic green" TEMPLATE positions elements on your webpage and applies layout structures, colours and design features.
    19 years a Zencart User

  4. #4
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Difference between a module and a template?

    If you're referring to files in /includes/modules vs files in /includes/templates ... then ... whereas the files in /includes/modules/ are used to extract data from the database, crunch numbers, do logic-processing, and prepare data to be sent for display; the files in /includes/templates/ are used simply to render the display of the data built by the modules.
    Essentially it boils down to templates being used only for display, and modules being used for business logic and intelligence.
    .

    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. CSS difference between IE and firefox
    By eazy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 May 2012, 12:10 AM
  2. v150 Difference between v1.5.0RC3 and v1.5.x 12-30-2011?
    By slingblade01 in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 25 Jan 2012, 11:22 AM
  3. Difference between 1.3.8a and 1.3.9?
    By superprg in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 21 Jul 2010, 12:28 AM
  4. difference between downloads and virtual products
    By artcoder in forum General Questions
    Replies: 2
    Last Post: 20 Feb 2008, 11:42 PM
  5. Difference between 'copy' and 'link' product?
    By divinelighting in forum General Questions
    Replies: 3
    Last Post: 15 Jun 2006, 06:04 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