Zencart v1.3.9f
Where do I put my php file so all the functions in the file will be available to the rest of the application. I put it in:
includes/templates/mytemplate/includes/myfile.php
That doesn't seem to work.
Zencart v1.3.9f
Where do I put my php file so all the functions in the file will be available to the rest of the application. I put it in:
includes/templates/mytemplate/includes/myfile.php
That doesn't seem to work.
Depend upon what the function(s) areWhere do I put my php file so all the functions in the file will be available to the rest of the application.
Check the wiki for the developers view
Custom functions can go in their own file in /includes/functions/extra_functions/ (no custom template folder).
If and only if they are structured/written in ZenCart formatOriginally Posted by gjh42
You might also need to break out other items
auto_loaders
classes
extra_cart_actions
extra_configures
extra_datafiles
functions
init_includes
languages
modules
Thanks guys (gals). I have created a theme from an existing (non zencart) website and I am trying to make it look like the parent site. The menu will appear in the header as I don't intend on using any existing zen cart structure for it (because I don't know how and I'm up against a market window). The menu is based upon a sprite graphic.
Link1 Link2 Link3 Link4 Link5
I created a function called get_main_menu() and it creates ul/li items that are defined in CSS with position: top: and left: properties. The background images are defined in CSS as well. There is no text except the title attribute. The image is the anchor.
Actually, this will be the first of probably several (or many) functions that I would normally put into a lib.php file.
Is the /includes/functions/extra_functions/ still appropriate? Thx.
For functions, yes. The other code elements kobra mentioned would be separated out into their own files as well if you have them.
To continue, if you are fluent in PHP, tpl_header.php is not difficult to understand, and you can modify or clone some of the nav in that to work within Zen Cart's structure. This thread discusses some of the header nav structure: http://www.zen-cart.com/forum/showthread.php?t=163968
Excellent comments all. Thx.