Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

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

Calling admin defined functions from catalog files?

Locked

Started by yellow1912 on 21 Aug 2007, 1:37 AM · Views: 2,392

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,

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

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

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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.

.
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.

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?

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

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

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Calling admin defined functions from catalog files?

Yes .

.
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.