Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Zen Cart Overrides Cheatsheet

    Quote Originally Posted by dbltoe View Post
    I've had this as a bookmark for ages. Great tool.

    Just wondering a little on the includes/modules/pages portion.

    If customizing includes/modules/pages/ask_a_question, would you add header_phpask_a_question.php in the folder or header_phpresponsive_classic.php?

    Trying to figure some way to recognize the template being used for that file. Of course there's the problem if the next template is "quick_run" it won't have a chance until the header_phpresponsive_classic.php is removed.

    Asking for a friend.
    You'd add a file named header_php_aaq_template_detect.php (or something similar). The additional per-page header files must match header_php_something.php

  2. #22
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Zen Cart Overrides Cheatsheet

    Just trying to visualize a way to catch it for loading and clone a template.

    To the first, if I have two templates (a and b), and I try to run a without removing b then a will never take effect unless something set in a is not reset in b?

    I'm up at the wrong hour and having weird thoughts.

  3. #23
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Zen Cart Overrides Cheatsheet

    Quote Originally Posted by dbltoe View Post
    Just trying to visualize a way to catch it for loading and clone a template.

    To the first, if I have two templates (a and b), and I try to run a without removing b then a will never take effect unless something set in a is not reset in b?

    I'm up at the wrong hour and having weird thoughts.
    I wouldn't necessarily use a filename based "tag", if nothing else trying to search out that "key" will be difficult as filenames are not searched in a default developer's toolkit and the further importance of the filename may not be obvious without internal direction. Besides that, the file would be loaded and still need some internal switch to execute the applicable code.

    An alternate option is to use an observer off of the applicable file(s), but not sure that addresses your "flag for copying" system...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Zen Cart Overrides Cheatsheet

    I'd name the file header_php_SOMETHING_RELATED_TO_ITS_PURPOSE.php
    And then inside you could check the value of $template_dir to take action based on whether/which template is active.
    .

    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.

  5. #25
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Zen Cart Overrides Cheatsheet

    I'm back fooling with this again as I have a need to show the difference between templates on one page. Site is 1.5.7c with demos and no adds other than the latest bootstrap and a cloned version of it with an added CSS file. Those are the two I want to be able to switch back and forth between.

    When I add an old Multi-Template for Users mod to allow selecton by the user, all seems to work fine BUT, the overrides in in the includes/languages/english folder do not seem to respond to the selection.

    I can work on not showing classic, template_default, and responsive_classic but I am suspicious that bootstrap might not be following the overrides set by this cheatsheet.

    Thoughts?

  6. #26
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Zen Cart Overrides Cheatsheet

    Quote Originally Posted by dbltoe View Post
    I'm back fooling with this again as I have a need to show the difference between templates on one page. Site is 1.5.7c with demos and no adds other than the latest bootstrap and a cloned version of it with an added CSS file. Those are the two I want to be able to switch back and forth between.

    When I add an old Multi-Template for Users mod to allow selecton by the user, all seems to work fine BUT, the overrides in in the includes/languages/english folder do not seem to respond to the selection.

    I can work on not showing classic, template_default, and responsive_classic but I am suspicious that bootstrap might not be following the overrides set by this cheatsheet.

    Thoughts?
    Examples would help; please continue any discussion in the Bootstrap 4 template's support-thread.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Overrides
    By logicalstep in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 9 Feb 2011, 02: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