Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Posts
    31
    Plugin Contributions
    0

    Default Building New Modules

    Hi All,

    I was wondering if there was any documentation I could be pointed towards which describes the way ZenCart works at a basic functional level. I would like to look at what is required to build a new module.

    For example:
    - the tree under /includes/languages/english is where text defines are made. These are used to define what is displayed on the screen when the user is interacting with the module
    - under /includes/modules/pages/ a folder exists for each module with a header_php.php file
    - a template file is created under /includes/templates/yourtemplate/templates/ which details the page layout for the module in question
    etc. etc.

    This is the kind of information I am looking for so I can see what files would be required and when they are used and why.

    I can kind of get an idea of what needs to be done by looking at other contributions but a reference would be helpful to ensure I any code I write is written to follow similar standards as the rest of ZenCat and would help answer questions I come along the way without taking up others time.

    Any pointers in the right direction...

    Thanks.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Building New Modules

    Some of it depends on what sort of module you plan on writing. What are you going to do?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Feb 2006
    Posts
    31
    Plugin Contributions
    0

    Default Re: Building New Modules

    Hi Kim,

    I would like to add some extentions to the Manufacturers side of things.

    On my site there is a type of product which is essentially an artwork. In this instance I have set it up so the artist is the 'manufacturer' of the product. By default ZC displays all products of a particular manufacturer on this page: index.php?main_page=index&manufacturers_id=1 (where 1 is the particular manufacturer in this instance). So that's good, but I would like to add the ability for my artists to provide some further optional information about themselves here... bio, URL, instant messaging, likes / dislikes, age etc. etc.

    So would extend the manufacturers table to store the extra info, and likely put a link into tpl_account_default.php which takes a user account who is an artist to a page where this info could be entered - which is basically the module.

    So for the new files I'd need I was thinking something along the lines of:

    /includes/languages/english/mytemplate/artist_extra_info.php (the defines)
    /includes/templates/mytemplate/templates/tpl_artist_extra_info.php (the page layout)
    /includes/modules/pages/artist_extra_info/header_php.php (to do the updates to the DB)
    /includes/modules/pages/artist_extra_info/jscript_form_check.php (to check the input)

    Then modify whatever page produces index.php?main_page=index&manufacturers_id=1 - I would have to go looking.

    So that's what I've gathered so far from looking at how the account_edit process seems to work, but without any functional documentation I am just trying to imitate existing functionality at the moment... so any help appreciated.

    Thanks

 

 

Similar Threads

  1. New to Web building
    By NettlesJewelry in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Jul 2008, 03:50 PM
  2. Having layout troubles building my new template
    By Pyralis in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Apr 2008, 01:06 PM
  3. Building a new site... need help!
    By canemasters in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 6 Feb 2008, 01:20 AM
  4. Replies: 1
    Last Post: 2 Dec 2007, 05:00 AM
  5. Simple question about building a new template
    By Shade in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Mar 2007, 04:53 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