Zen Cart Logo
Forums / Contribution-Writing Guidelines / Calling admin defined functions from catalog files?

Calling admin defined functions from catalog files?

Locked

Views: 2,383

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
21 Aug 2007, 1:37 AM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Calling admin defined functions from catalog files?

I have some functions in admin/functions/extra_functions that I'd like to call from catalog files instead of re-defining them again. Should I just "include" the files or ZC has some kind of support for that?

Thank you,

21 Aug 2007, 2:56 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Calling admin defined functions from catalog files?

Just copy the file to your catalog extra_functions folder.
Or write a file to do the include yourself.
It's not really wise to attempt to include admin files ... but rather the other way around.
What happens if you rename your admin folder? Suddenly your store goes offline because it can't load the files that you forgot about.

21 Aug 2007, 3:48 AM
#3
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Calling admin defined functions from catalog files?

So lets say I do it the other way around, I'll have to manually include the file from catalog extra_functions right?

21 Aug 2007, 4:26 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Calling admin defined functions from catalog files?

Yes .