Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2008
    Location
    Massachusetts
    Posts
    163
    Plugin Contributions
    0

    Default How does Zen-Cart "know" what your "custom" directory is?

    I have Zen-Cart all set up and working just fine. I'm now going back and trying to remember some of what I did. I have some really good notes, but here's one thing I can't quite figure out. When I set up my cart, I followed the instructions here https://www.zen-cart.com/tutorials/i...hp?article=142 to create my custom template so I could use the overrides system. My override folders are named "custom".

    When I go into the admin > tools > template selection, of course I see that my template is "Custom Template" (that's the name I gave it), and I also see that the directory is "custom".

    My question is: how does Zen-Cart know that the directory I'm using is "custom"? I can't find or recall anywhere where I explicitly told Zen-Cart that.

    I'm trying to figure this out because I'm trying to analyze someone else's code.

    Thanks.

  2. #2
    Join Date
    Nov 2008
    Location
    Massachusetts
    Posts
    163
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    Sorry ... had to add this comment so I could get to the place to choose instant email notification ... sure wish that was on by default!

  3. #3
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    When I go into the admin > tools > template selection, of course I see that my template is "Custom Template" (that's the name I gave it), and I also see that the directory is "custom".
    When you chose the template via the Admin, you "told" Zen Cart what to use.
    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.

  4. #4
    Join Date
    Nov 2008
    Location
    Massachusetts
    Posts
    163
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    Yeah, I understand that. But the file that you edit (the template_info.php file) - you only give your template a name. There's no where that you tell it "and my folder is named 'custom' ".
    So what I'm really trying to understand is - how does Zen-Cart know my folders are named "custom"?

    I know that I don't really "need to know" this stuff since it's all working fine, but I would really like to understand this particular thing.

    Thanks.

  5. #5
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    The program checks to see if there is a "custom" template specified, otherwise it uses the files in the template_default. The "switch" is the template_info, chose that and the program then knows the name of the directory it is in. It then uses that name to look for other override files based on the naming.
    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.

  6. #6
    Join Date
    Nov 2008
    Location
    Massachusetts
    Posts
    163
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    You're probably getting sick of me by now.
    Here's my template_info file:
    Code:
    <?php
    /**
     * Template Information File
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: template_info.php 2306 2005-11-05 21:34:28Z wilt $
     */
    $template_name = 'CustomTemplate';
    $template_version = 'Version 1.0';
    $template_author = 'Alicia Shea';
    $template_description = 'This template was created by me for www.collabiril.com';
    $template_screenshot = '';
    ?>
    I don't see in there where it says that "custom" is the name of the directory.

  7. #7
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    It doesn't say custom - it doesn't need to - it is IN the folder called custom and Zen Cart "reads" that when it finds the template_info and remembers it.
    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.

  8. #8
    Join Date
    Nov 2008
    Location
    Massachusetts
    Posts
    163
    Plugin Contributions
    0

    Default Re: How does Zen-Cart "know" what your "custom" directory is?

    Aaaahhhhh ... now I understand. THANK YOU!

 

 

Similar Threads

  1. Replies: 0
    Last Post: 27 Nov 2011, 06:04 PM
  2. Replies: 4
    Last Post: 16 Oct 2011, 12:58 AM
  3. what is "the root of your zen cart"?
    By bchilli in forum General Questions
    Replies: 2
    Last Post: 14 Nov 2010, 03:03 PM
  4. How to remove "contact us", "My account" , and "view cart"?
    By thestampnomad in forum Basic Configuration
    Replies: 2
    Last Post: 13 Aug 2010, 07:55 PM
  5. How do I replace "Zen Cart" with "the patch shop"
    By RKB in forum Basic Configuration
    Replies: 1
    Last Post: 2 Oct 2006, 06:17 AM

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