Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2004
    Posts
    38
    Plugin Contributions
    0

    Default custom mod needs to access files above public_html outside cart, is it possible?

    we're having a mod created that needs to access files above public_html and outside cart in public_html:

    /home/user/public_html/zencart/

    /home/user/public_html/custom_dir/stuff.php

    /home/user/custom_dir_1/stuff_1.php
    /home/user/custom_dir_1/more_stuff_1.php
    /home/user/custom_dir_1/etc_1.php

    /home/user/custom_dir_2/stuff_2.php
    /home/user/custom_dir_2/more_stuff_2.php
    /home/user/custom_dir_2/etc_2.php

    is this possible? how might we allow going to those specific outside locations to access stuff?

    thanks
    Last edited by boxes; 16 Dec 2012 at 03:30 PM.
    peace

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    You should be able to do so providing the correct link info
    As outlined in this tutorial, where a default folder is moved
    http://www.zen-cart.com/content.php?257
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2004
    Posts
    38
    Plugin Contributions
    0

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    Quote Originally Posted by kobra View Post
    You should be able to do so providing the correct link info
    As outlined in this tutorial, where a default folder is moved
    http://www.zen-cart.com/content.php?257
    interesting, thanks

    so, we could define the custom outside locations in:

    - /includes/configure.php
    - /admin/includes/configure.php

    define('DIR_FS_DOWNLOAD', '/home/my_user_name/download/');
    define('DIR_CUSTOM_DIR_1', '/home/my_user_name/custom1/');
    define('DIR_CUSTOM_DIR_2', '/home/my_user_name/public_html/custom2/');

    and then just refer to the new define names . DIR_CUSTOM_DIR_1 . in the code to snag stuff from those locations

    does it sound like i got it?

    thanks
    Last edited by boxes; 16 Dec 2012 at 06:27 PM.
    peace

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    honestly, I wouldn't do it in the configure files. It feels best to leave them as they are. Mess them up and the whole site will stop playing.

    So, I would do it elsewhere. Usually that would be in

    includes/extra_datafiles
    admin/includes/extra_datafiles

    But you can do it anywhere where the files are auto-loaded. If you don't know which stuff that applies to then just use those two folders. The only complication - and it is a bit unlikely - is if your new module does stuff before those two files get loaded. This is not likely unless you are doing some fairly archane stuff.

  5. #5
    Join Date
    Jul 2004
    Posts
    38
    Plugin Contributions
    0

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    do you mean that you can add defines in the extra_datafiles dir?

    /extra_datafiles/outside_paths_here.php

    define('DIR_FS_DOWNLOAD', '/home/my_user_name/download/');
    define('DIR_CUSTOM_DIR_1', '/home/my_user_name/custom1/');
    define('DIR_CUSTOM_DIR_2', '/home/my_user_name/public_html/custom2/');

    thanks
    Last edited by boxes; 16 Dec 2012 at 07:47 PM.
    peace

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    Yes, that is one of the purposes of those folders.

    (You may be more familiar with defines being used for language-specific output text, and thus would belong in a language file, but this is not related to user language.)

  7. #7
    Join Date
    Jul 2004
    Posts
    38
    Plugin Contributions
    0

    Default Re: custom mod needs to access files above public_html outside cart, is it possible?

    most cool, thanks!!
    peace

 

 

Similar Threads

  1. Possible to use shop code outside of shop files?
    By SweetPeaStudio in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Jul 2008, 04:46 AM
  2. Replies: 1
    Last Post: 15 Mar 2008, 11:29 AM
  3. Access Product Information outside of Zen Cart
    By nhinternetsolutions in forum General Questions
    Replies: 5
    Last Post: 15 Oct 2007, 02:07 AM
  4. Serving downloads from outside public_html
    By shadez2270 in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 15 Dec 2006, 11:49 PM
  5. Access Cart Data Outside Cart?
    By andrewteg in forum Basic Configuration
    Replies: 2
    Last Post: 24 May 2006, 02:38 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