New Zenner
- Join Date:
- Nov 2008
- Posts:
- 23
- Plugin Contributions:
- 0
Difference between a module and a template?
Hi - Can someone explain the difference between a module file and a template file (tpl_)? Thanks.
Jason
Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details
This cutover relies on some testing that is still incomplete so may be cancelled at short notice
Started by jbalcony on 29 Nov 2008, 4:01 PM · Views: 2,461
New Zenner
Hi - Can someone explain the difference between a module file and a template file (tpl_)? Thanks.
Jason
Inactive
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.
Totally Zenned
Generally speaking, a module influences a behaviour of your zenshop, while a template influences an appearance.
eg:
20 years a Zencart User
Sensei
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.
Tell staff why this post should be reviewed.