Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Location
    Oregon, USA
    Posts
    33
    Plugin Contributions
    0

    Considering adding a custom directory/folder in admin dir. Any problems likely?

    Hi, I'm working on some custom script-pages & am considering adding a custom directory/folder in admin dir.
    I was going to add a 'staff/' dir as a sibling to 'admin/' but I'm now thinking that it would make more sense to put it as a child to admin/ (admin/staff/) so that the user will go through the standard login proceedure.

    Are any problems likely with adding an additional directory in the admin/ dir?
    Thanks, ZC gurus!
    (ps-- if there is an existing thread where this question would have fit please let me know! I'd definitely like to look at it!)

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Considering adding a custom directory/folder in admin dir. Any problems likely?

    There are a couple of folders which are iterated through, like the extra_functions, and languages/modules/shipping/ folders. If you are add anything to these folders, Zen tries to incorporate them in various parts of the code. As for adding to the admin folder, you'll be fine. I have a number of folders, and files added for custom scripting, and have no problems with them. I would recommend that you add the folder and file names to a define file, and place it in the extra_configures folder. That way you can make use of some of the existing Zen functions, like building file paths etc.

    Absolute

  3. #3
    Join Date
    May 2006
    Location
    Oregon, USA
    Posts
    33
    Plugin Contributions
    0

    Default Re: Considering adding a custom directory/folder in admin dir. Any problems likely?

    Quote Originally Posted by Absolute
    I would recommend that you add the folder and file names to a define file, and place it in the extra_configures folder. That way you can make use of some of the existing Zen functions, like building file paths etc.
    Thanks, Absolute. I know zippo about ZC's define files & built-in functions. Can you give me any pointers or suggest any places to find out about these topics? I've been poking around the wiki but haven't found much. This sounds like it would be extremely useful.

    Absolute, perhaps you, or someone else, can help w/ a specific issue...
    I'm currently having a bug/weirdness with my custom add product script. I've got it successfully adding the basic info & attributes for the product and at the end opening a window w/ Image Handler for it. But afterwards in the cart, it won't display a product page for the item. It shows in the new products & category listings, but clicking on its link just leaves you where you are.

    Further, maybe this will give a clue, when I go to the new product in the admin, the item is there, but in the action column there is no ($) Product Price Manager button (even though there is a price) & the (e) Edit button goes to an broken link, as so:
    The requested URL /cart/admin/.php was not found on this server.
    w/ the URL:
    ... in other words, it leaves the 'product' out of the filename.

    If I click on the Edit button for another, working, product and then in the URL replace the pID value w/ my new items ID and then click the preview & update buttons, then the item works fine.
    Any ideas anyone?

  4. #4
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Considering adding a custom directory/folder in admin dir. Any problems likely?

    Looks like these URLs are not quite the same as the others since the FILENAME_CATEGORIES seem to be missing, from each, under admin/category_product_listing.php

    where:

    PHP Code:
    if (isset($pInfo) && is_object($pInfo) && ($products->fields['products_id'] == $pInfo->products_id) ) {
            echo 
    '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' zen_href_link($type_handler 'page=' $_GET['page'] . '&product_type=' $products->fields['products_type'] . '&cPath=' $cPath '&pID=' $products->fields['products_id'] . '&action=new_product') . '\'">' "\n";
          } else {
            echo 
    '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' zen_href_link($type_handler 'page=' $_GET['page'] . '&product_type=' $products->fields['products_type'] . '&cPath=' $cPath '&pID=' $products->fields['products_id'] . '&action=new_product') . '\'">' "\n";
          } 

 

 

Similar Threads

  1. dir(includes/templates/classic/index) NO such file or directory. Stacktrace.
    By tzre in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 3 Aug 2011, 09:32 PM
  2. Replies: 6
    Last Post: 16 Nov 2009, 02:03 PM
  3. Renamed Admin folder but "upload to directory" no update of new folder
    By ruriimasu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Apr 2009, 10:29 AM
  4. adding folder to upload directory
    By billscheltema in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 4 Feb 2007, 05:46 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