Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default admin/catelogue common areas?

    I should know this by now...

    Is there a way to make defines, configures, and/or functions accessible to both admin and store areas??

    Specifically, I'm adding a feature to my site so that a customer can request a product (rather than order... don't ask). The customer creates the request, and the customer can also delete the request. The admin, can also delete a request. I've finished with the admin site... and when the delete is done it sends out a formatted email to the customer. I want the same thing to happen when the customer does it, without having to re-create all the defines and functions.

    The functions aren't a big deal really... its more the defines. Because if the admin wants to change a typo (for example) it has to be done in two places.

    I was wondering if there was already a way to do this?

    - Steven

  2. #2
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: admin/catelogue common areas?

    Is there any problem with putting something like this at the top of my admin page that wants to use a function (or datafile, or whatever) from the shop?

    require('../includes/functions/extra_functions/functions_somePage.php');

    It'd be nice to hear from a developer that can tell me if that introduces some security problem, etc.

    Thanks.

    - Steven

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

    Default Re: admin/catelogue common areas?

    Yes, you can have the admin call catalog files. In fact, the admin does this already for many of the classes and functions, and v1.4 will consolidate things even more.
    You could use the autoloader and init system to have it auto-load some components if you needed to. Or doing a direct require from within your module is fine too.
    .

    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.

  4. #4
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: admin/catelogue common areas?

    Cool...thanks! I just wanted to make sure I wasn't somehow opening a can of worms.

    - Steven

 

 

Similar Threads

  1. v151 SQL Error in admin product attributes areas
    By CarolineBogart in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Oct 2014, 04:26 PM
  2. Product Catelogue Page Layout
    By scamp in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Feb 2009, 03:15 AM
  3. How to Print a Product catelogue
    By HOBOcs in forum General Questions
    Replies: 2
    Last Post: 18 Jul 2008, 03:13 PM
  4. Can't access admin areas ?
    By Patrick x in forum Basic Configuration
    Replies: 13
    Last Post: 9 Apr 2007, 11:36 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