Search code examples
phpzen-cartconcrete5

call a Zen Cart php file from another web app on same domain


I have a zen cart install which works great for e-commerce, unfortunately the client wants a better content management system for web pages. My choice is concrete5, very simple to code for and very easy for the end user. My one problem is the layout. I want to call the tpl_header.php from my zen cart theme via php as ajax lags and leaves a very unprofessional look for the clients front page. Is there a way I can <?php require /home/me/public_html/zencart/Menu.php-and-dependencies ?> ?

Every time I try this it dies at application_top.php leaving me with no stack trace, just nothing after this require (or include).


Solution

  • Moving answer from commet as requested:

    Problem occurs when application_top.php tries to include files from relative path, because it still begins at the folder you call it from (somewhere in concrete5 probably). Try to chdir to your zencart folder and then include files from zencart