Zum Inhalt springen

tt_products: neues Adressfeld

Erstellt am 19. Oktober 2009 · 2 Antworten · letzte Antwort am 9. April 2010

Tags: TCA, Frage

Puschel ·

Hallo @ all
ich brauche bei der Adresseingabe von tt_products weitere Felder, weil ich das Lieferdatum und die Uhrzeit mit abfragen muß.
Leider gelingt es mir nicht, neue Formularfelder (select-Auswahlfelder) einzubinden.

Ich habe bereits in die tca.php folgendes eingetragen:

		'tag' => Array (	 
			'exclude' => 1,
			'label' => 'LLL:EXT:lang/locallang_general.php:LGL.tag',
			'config' => Array (
				'type' => 'input',
				'size' => '40',
				'max' => '80',
			)
		),
		'monat' => Array (	 
			'exclude' => 1,
			'label' => 'LLL:EXT:'.TT_PRODUCTS_EXTkey.'/locallang_db.xml:sys_products_orders.monat',
			'config' => Array (
				'type' => 'select',
				'items' => Array (
					Array('LLL:EXT:'.TT_PRODUCTS_EXTkey.'/locallang_db.xml:sys_products_orders.monat.I.0', '0'),
					Array('LLL:EXT:'.TT_PRODUCTS_EXTkey.'/locallang_db.xml:sys_products_orders.monat.I.1', '1'),
					Array('LLL:EXT:'.TT_PRODUCTS_EXTkey.'/locallang_db.xml:sys_products_orders.monat.I.2', '2'),
					Array('LLL:EXT:'.TT_PRODUCTS_EXTkey.'/locallang_db.xml:sys_products_orders.monat.I.3', '3'),
				),
				'size' => 1,	
				'maxitems' => 1,
			)
		),

Auch in die: showRecordFieldList eingetragen.
In der locallang_db.xml:

			<label index="sys_products_orders.tag">Tag</label>
			<label index="sys_products_orders.tag.I.0">01</label>
			<label index="sys_products_orders.tag.I.1">02</label>
			<label index="sys_products_orders.tag.I.2">03</label>
			<label index="sys_products_orders.tag.I.3">04</label>
			<label index="sys_products_orders.tag.I.4">05</label>
			<label index="sys_products_orders.tag.I.5">06</label>
			
			<label index="sys_products_orders.monat">Monat</label>
			<label index="sys_products_orders.monat.I.0">01</label>
			<label index="sys_products_orders.monat.I.1">02</label>
			<label index="sys_products_orders.monat.I.2">03</label>
			<label index="sys_products_orders.monat.I.3">04</label>
			<label index="sys_products_orders.monat.I.4">05</label>
			<label index="sys_products_orders.monat.I.5">06</label>

Im TPL dann eingebunden. ###PERSON_TAG### wird aber nicht ersetzt.

Kann mir jemand einen Tipp geben? Vielen Dank schonmal -

Viele Grüße
Puschel

andri ·

Hallo Puschel,

Konntest du dieses Problem lösen? Ich stehe vor der selben Anforderung.

Grüsse
Andri

Puschel ·

Hallo Andri,
leider hab ich nur eine Umgehung gefunden, ist nicht hübsch aber funktioniert...

Ich habe nicht verwendete Adressfelder (person_fax und person_country) zweckentfremdet. In einen hab ich einen Kalender eingebunden und mit dem anderen die Uhrzeit auswählbar gemacht.

Hier zu sehen:
http://www.bagelbrothers.de/restaurants/l-nikolai/online-shop/onlineshop-leipzig-liefergebiet-2/bagel-sandwiches.html

Wie gesagt, nicht schön aber funktioniert #paralyzed#

Viele Grüße
Puschel