[TYPO3-commerce] Commerce Extensionentwicklung

Sebastian Böttger sebastian.boettger at gmail.com
Wed Aug 22 12:47:18 CEST 2007


Hi Commercedevs,

I try to develop an extension for commerce, and got a problem with the 
tx_commerce_product object.

I do something like this:

            $myProduct=new 
tx_commerce_product($row['uid'],$GLOBALS['TSFE']->tmpl->setup['config.']['sys_language_uid']);
            $myProduct->load_data();
            $hasStock = $myProduct->hasStock();
            $stock = $myProduct->hasStock() ? 0 : 
$this->maxStock($myProduct); 
            $title = $row['title'];
            $cat = $myProduct->get_masterparent_categorie();
            $desc = $row['description'];
            $price_cheapest = $myProduct->getCheapestArticle();
            $teaserimg = current($myProduct->getTeaserImages());

All the product functions returning empty values. $row['uid'] is set 
correctly.
Also simple functions like get_title() returning nothing.

A little help would be great. Maybe I did something wrong with the 
object programming? Do I have to init the product?
Or is it just a bug?

Regards,
Sebastian Böttger



More information about the TYPO3-project-commerce mailing list