Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    help question Define a function that to be used from both admin and non-admin area?

    Hi guys,

    A quick question:

    I want to define a few common functions to be used both in the non-admin area, and the admin area.

    Where should I put them? -- I noticed if I put it under includes\functions, they are not accessible from the admin.

    Thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Define a function that to be used from both admin and non-admin area?

    First, you should probably be putting them in /includes/functions/extra_functions/

    Then, in your admin/includes/functions/extra_functions/ add a file which has include statements for each of the filenames (and path) you wish to load from your non-admin /includes/functions/extra_functions/ folder.
    .

    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.

 

 

Similar Threads

  1. Two sites same database how to access both admin area
    By enzo-ita in forum General Questions
    Replies: 5
    Last Post: 9 Apr 2014, 06:23 PM
  2. Replies: 2
    Last Post: 4 Feb 2010, 01:23 AM
  3. autoresponder+: Call to a member function read() on a non-object in /admin/mail.php
    By lankeeyankee in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 16 Aug 2009, 05:49 AM
  4. Replies: 3
    Last Post: 26 Jul 2009, 06:44 AM
  5. UPS Module Problem in admin: Call to a member function get_template_dir() on a non-ob
    By bbemis in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 10 Sep 2008, 06:53 AM

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