[TYPO3] Extensions & eID -> initing extension manually
Sebastian Böttger
sebastian.boettger at gmail.com
Fri Oct 26 16:47:04 CEST 2007
Forget about this. The problem was the following:
The extension commerce uses its own database class, which is set by the
extending class in the init function.
This init function is called by the constructor (product/category) and
hand over a productUID or categorUID. But t3lib_div::makeInstance can't
handle arguments, so there is no productUID/categoryUID given.
When I now try to do the following:
$catObj = t3lib_div::makeInstance('tx_commerce_category');
$catObj->load_data();
the fatal error rises.
The solution would be:
$catObj = t3lib_div::makeInstance('tx_commerce_category');
$catObj->init($categoryUID);
$catObj->load_data();
And everything is fine.
Best Regards
Sebastian Böttger
http://www.cross-content.com - Internet CMS Entwicklung Solutions TYPO3
ECommerce
Sebastian Böttger schrieb:
> Hi there,
>
> I'd like to use the eID functionality of TYPO3 for accessing the backend
> with an AJAX call.
> With this call I'd like to use some functions of an extension. In this
> case "commerce".
>
> But If I do so, I get the following error:
>
> Fatal error: Class '' not found in
> /var/www/cms/typo3conf/ext/commerce/lib/class.tx_commerce_element_alib.php
> on line 200
>
> Line 200 is just something like this:
>
> $this->conn_db = new $this->database_class();
>
> Therefore $database_class is empty, because the extension is not inited.
> Is it possible to load the extension manually for having all the
> functionality?
>
> Or would there be a better approach?
>
> Regards,
> Sebastian Böttger
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list