Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    42
    Plugin Contributions
    0

    Default How to set up override system for layout boxes?

    I have created a template in /includes/templates directory called MYCUSTOM. So the directory path is /includes/templates/MYCUSTOM

    In the Admin area, I clicked Tools>Layout Boxes Controller. The screen shows the Boxes Path as /includes/modules/ …
    I am not going to reset it to default.

    Let’s say, after making changes to the LEFT/RIGHT COLUMN Status, LEFT/RIGHT Column, LEFT/RIGHT COLUMN Sort Order, SINGLE COLUMN Sort Order and SINGLE COLUMN Status for all the box file names, what steps should I take next in order to retain the settings when there is an upgrading of the software.
    Currently I am using v1.3.9h.

    I appreciate the response. Thanks.

    NOTE: This was wrongly posted to Post relating to Minisite.

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

    Default Re: How to set up override system for layout boxes

    The sidebox settings are specific to a template, and the association of the structure of sideboxes relative to the template are saved in the database. That data will not be affected by an upgrade. There is no FILE STORAGE of the sidebox structure - its all in the database.

    Using the TEMPLATES OVERRIDES SYSTEM for sidebox rendition is for making CERTAIN sideboxes specific to a CERTAIN template.

    For example... on some sites we have CUSTOM sideboxes that offer SEASONAL information. We have SEASONAL templates (Christmas, Easter, Fall, Summer), so when we change the template, we want seasonally-appropriate sideboxes to automatically change with that template).

    All other sideboxes are GENERIC - they apply to all templates, so we leave the PHP files for these sideboxes in their default folders.

    But you do not have to worry when you do an upgrade. The INTEGRITY of the data in the database is retained if you follow the proper upgrade procedure.
    19 years a Zencart User

  3. #3
    Join Date
    Apr 2012
    Posts
    42
    Plugin Contributions
    0

    Default Re: How to set up override system for layout boxes

    Hi schoolboy,
    You are already an experienced zenner judging from your answer to my question. Although I have gone through many threads and posts on the override system, I am pleased with your clear explanation.

    It gives me a better understanding of the override system in Zencart which I wasn’t aware of until I came across it after the installation and went live with the online shop.

    Now, I have to recheck those modifications that have been made to those files not using the override system i.e. without the creation of CUSTOM folder.

    I may have to come back for help on the override system as I proceed with the changes to be made.

    Meanwhile, thanks for the response.

  4. #4
    Join Date
    Apr 2012
    Posts
    42
    Plugin Contributions
    0

    Default Re: How to set up override system for layout boxes

    Yes. You are totally zenned.

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

    Default Re: How to set up override system for layout boxes

    I know a little bit about Zc... yes...

    It is very important for new zenners to get their heads round the override system (which applies ONLY to the webshop side of the system, not the admin side.)

    Here's a quick summary on HOW the override system works.

    Zencart appreciates that every user of the software will want some unique features and elements on their site, and that text descriptions may need changing, and that certain differences in layout structure are needed, and that certain types of behaviour are needed.

    So we have the over-ride system, which is ALSO referred to as the CUSTOM TEMPLATE. This is just a general term for the override system, because it is MORE than just the "template". It also refers to certain BEHAVIOURS and USE OF LANGUAGE. In the USA, people spell certain words differently from us UK chaps. (color vs colour)... COLOR is the CORE descriptor, and COLOUR will be a CUSTOM DESCRIPTOR... so us UK chaps need to OVER-RIDE these CORE descriptors with our own CUSTOM ones.

    Zencart's override system works on the simple principle of FIRSTLY looking for an OVER-RIDE file in its processing, and if it DOES NOT FIND an over-ride file, it uses the DEFAULT file instead. Zencart MUST KNOW that a DEFAULT FILE exists first - even though it does not use it, before a CUSTOM file is used in its place. There are some exceptions to this "rule"... such as putting stuff in the "extra_definitions" folder, and when you need a certain module (or a sidebox) to function ONLY in a certain template.

    In order to operate, zencart needs a template, so the CORE template is called "classic". In MOST cases, "classic" folders in a new installation, are empty. This forces zencart to use DEFAULT files on a new installation.

    So... if these "classic" folders are empty... why have them?

    They are there largely to act as an INDICATOR to you, as to WHERE your override template needs a named folder. If you open up the directory structure for includes/languages, includes/modules and includes/templates... you will see these "classic" folders appearing in quite a few places as you drill-down through the directories. When you see a "classic" folder, you will then know that if you need an override in that area of the code, for your OWN customisations, then you create a folder at the same "level" as that "classic" folder.

    One of the FIRST things we do after a successful install, is set up all our CUSTOM folders. We just go through the directory hierarchy, and when we see a "classic" folder, we create a folder named after our CUSTOM template. It does not matter if that custom folder is left empty... We just know that if/when we need an over-ride file for that area, we take a COPY of the CORE DEFAULT file, edit that COPY, then put it into the CUSTOM folder.

    To make our new template "operational", we just need to add a template_info.php file to its template area (and all we do is use an edited copy of the default template_info.php file). We also put a new stylesheet into its css folder, etc, and possibly a few other things in to start with.

    But... this means we START using zencart with our custom template (and thus an over-ride system) nicely in place. There is now no need to edit CORE DEFAULT files.... we have folders in place where we can put EDITED COPIES of the default files, which then get "noticed" by ZC as being the over-ride file.
    19 years a Zencart User

  6. #6
    Join Date
    Apr 2012
    Posts
    42
    Plugin Contributions
    0

    Default Re: How to set up override system for layout boxes?

    Thank you very much for enlightening me on the override system in a new perspective. You have painted an outline of the override system in a colourful way which is so important and critical to a new zenner. I have to click ‘Like’ for your clarifications.

    Once I understand the override system deeper especially the concept behind it and its structural development, this will definitely make my usage of Zencart software more interesting, confident and comfortable.

    You see, when I was selecting Admin>Layout Boxes Controller, I saw the boxes path: /includes/modules/ … below the COLUMN BOXES CUSTOM on the top left side of the screen. Because of the “modules” folder in the “boxes path:/includes/modules/ …”, one of the components of the override system, I interpreted that I needed to create a CUSTOM folder in /includes/modules/ directory to override the layout settings. I was wrong. You have fully explained that sidebox structure is in the database.

    As the changes to files stored in the CUSTOM folders are specific to a template, is there a way to save the template and its related modified files collectively for use (not referring to the admin area), for example, in another online store? If Yes, How, please.

    Would appreciate a reply on this matter.

    Many thanks.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 2 Nov 2008, 08:50 PM
  2. Override system for ADMIN?
    By PetesTown in forum General Questions
    Replies: 2
    Last Post: 1 Aug 2007, 08:15 PM
  3. override system never works right for me.........
    By lina0962 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jan 2007, 07:18 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