[TYPO3-commerce] How-To: multiple images

Franz Koch typo.removeformessage at fx-graefix.de
Tue Oct 30 10:38:42 CET 2007


Hi,

> I don't know what you mean by this :(
> 
> ...but won't work if you don't copy the configuration from 
> lib.tx_commerce to the places in pi1 where you want to apply them.
> 
> I've been working with Typo3 for two years, but I feel like a noob now :S

well - I had also posted the solution (see below). But here a short 
explanation.
If you have a look a my initial posting you see that all 
settings/changes are done in the TS object 'lib.tx_commerce'. In 
commerce 'lib.tx_commerce' is used as a container for multiple used 
configurations, which are later copied from 'lib.tx_commerce' to the 
appropriate places in 'plugin.tx_commerce_pi1'. When you have a look in 
the default typoscript (typo3conf/ext/commerce/static/setup.txt) you can 
see what I mean.
To follow that practice, I also applied my changes to 'lib.tx_commerce' 
as centralized configuration holder. But the problem is, that in the 
default commerce setup the configuration done in 'lib.tx_commerce' is 
not referenced in 'plugin.tx_commerce_pi1' Object (so that changes would 
apply automatically), but copied due to a limitation in typoscript. So 
all changes done in your TS setup field on 'lib.tx_commerce' have then 
to be copied (again) to the places in 'plugin.tx_commerce_pi1' where you 
like to apply them (the views where the settings should apply, if they 
should apply for products and/or articles, categories etc).

I also did it this way, because it's much easier to keep an overview 
over the general settings for commerce.

In order to apply the setup for multiple images to products in the list 
and singleView, you need to copy the configuration from 
'lib.tx_commerce' to the apropriate fields - see below. But I think 
multiple images are more likely useful for singleView then listView.

>> ------
>> plugin.tx_commerce_pi1 {
>> 	listView.products.fields {
>> 		teaserimages < lib.tx_commerce.products.fields.teaserimages
>> 		images < lib.tx_commerce.products.fields.images
>> 	}
>>
>> 	# or to singleView
>> 	singleView.products.fields {
>> 		images < lib.tx_commerce.products.fields.images
>> 	}
>> }
>> ------

Is it more clearly now?

--
Greetings,
Franz


More information about the TYPO3-project-commerce mailing list