Hi list,

I am trying to port a module to the new Oxid 4.6. module logic and having a hard time getting the paths etc. right... now I seem to have hit the wall with admin includes:

[11-May-2012 15:07:06] PHP Warning: include_once(): Failed opening 'inc/smxb2b_accounts_main.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /...smxDemoshopB2B46/admin/oxajax.php on line 740

The file smxb2b_accounts_main.inc.php is located at "/modules/shoptimax/smxb2b_accounts/admin/inc/" and included from "/modules/shoptimax/smxb2b_accounts/admin/smxb2b_accounts_main.php". At first, not even that was working and I had to adjust the path to the include in my admin class. Now that part is working, but oxajax can't find the include now as you can see...
I've tried to set the include path with PHP like this:

        if (oxConfig::getParameter("aoc"))
            $newIncPath = dirname(__FILE__);
set_include_path(get_include_path() . PATH_SEPARATOR . $newIncPath);

            $aColumns = array();
            include_once 'inc/' . strtolower(__CLASS__) . '.inc.php';
            $this->_aViewData['oxajax'] = $aColumns;

            return "popups/" . $this->_sThisTemplate;

This works for my admin class, but not for oxajax.php...
I also can't set the path for this include file in my metadata.php, because it isn't a "real" class like the main admin class:

    'files' => array(
'smxb2b_accounts_main' => 'shoptimax/smxb2b_accounts/admin/smxb2b_accounts_main.php', 'ajaxComponent' => 'shoptimax/smxb2b_accounts/admin/inc/smxb2b_accounts_main.inc.php',
I've tried to set the path for "ajaxComponent" as you can see, but of course this isn't working either...

So is there any way I can get oxajax to load my include file from the modules directory, or do I have to copy it over to the "/admin/inc/" dir of the shop (which would break the whole concept :P)

And another "path question": is there a way to load the "bottomnavicustom.tpl" from my module folder, too? E.g. this doesnt seem to overwrite the default template:
    'templates' => array(
"bottomnavicustom.tpl" => "shoptimax/smxb2b_accounts/out/admin/tpl/bottomnavicustom.tpl", "smxb2b_accounts.tpl" => "shoptimax/smxb2b_accounts/out/admin/tpl/smxb2b_accounts.tpl",
My own template is found, but bottomnavi is not overwritten with my version....

Thanks a lot,

Mit den besten Grüßen aus Nürnberg,
Stefan Moises

Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29

dev-general mailing list

Reply via email to