Results 1 to 4 of 4

Hybrid View

  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,132
    Plugin Contributions
    0

    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.
    The learning is in the doing.

    Potent Products

  3. #3
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,927
    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.
    Did my post help you fix something? You can show your gratitude by buying the the dev team coffee.

  4. #4
    Join Date
    Jan 2004
    Posts
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    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!
    Donations always welcome: www.zen-cart.com/donate

    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. Payment Module Difference
    By ThePatch in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 19 Aug 2007, 01:00 PM
  2. IE / FF difference product_info_display
    By cupcake in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 May 2007, 10:50 PM
  3. database difference
    By brad512 in forum General Questions
    Replies: 3
    Last Post: 13 May 2006, 03:30 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
  •