[TYPO3-commerce] Download of PDF in singleview

rainer schleevoigt rainer at webmasterei-hamburg.de
Tue Sep 29 20:17:15 CEST 2009


Hi,

in my template file I have inserted ###PDF###.

I created a extension width the new field 'tx_raslupobello_pdf' in 
tx_commerce_products. The client can upload pdf.

Now comes my problem in FE:

In this extension I created a file with the content:

=================
class user_lupohook {
   function postInit(&$model) {
		   		$model->add_fields_to_fieldlist(array('tx_raslupobello_pdf'));
	}
	
   function additionalMarker($markerArray,$singleViewPlugin) {
		$markerArray['###PDF###'] = 
$singleViewPlugin->product->getField('tx_raslupobello_pdf');
		return $markerArray;
	}
}
=================

Inserting of

require_once(t3lib_extMgm::extPath($_EXTKEY).'hookclass.php');
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_pibase.php']['singleview'][] 
= 'user_lupohook';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_product.php']['postinit'][] 
  = 'user_lupohook';

in localconf.php doesnt work.

It works after clearing of cache one time, if I place the code in 
ext_tables.php. After reloading of FE-page the marker doesnt replace.

Any ideas?


Rainer


More information about the TYPO3-project-commerce mailing list