[TYPO3-commerce] How to change default image sizes?

Paul Hansen paul at ecopixel.com
Thu Oct 18 20:07:02 CEST 2007


Marcel Burkhalter wrote:
> Hello list
> 
> I tried to define default image sizes as demonstrated in the wiki 
> (http://wiki.typo3.org/index.php/Commerce):
> 
> # setup default image sizes
> lib.tx_commerce {
>   articles {
>     fields.images.file {
>       maxW = 250
>       maxH = 250
>     }
>   }
> <snip>
> 
> This didn't work so I looked a little deeper. These lib. settings are copied 
> into the plugin settings:
> <snip> products < lib.tx_commerce.products
> which results in: 
> plugin.tx_commerce_pi1.singleView.products.fields.images.file.maxW
> (150px default from lib. settings)

This is my image-related TS setup for Commerce pi1. I'm not sure
if icons for attribute values have been implemented, but everything
below has been working for me.

plugin.tx_commerce_pi1 {
   # ...stuff

	singleView {
		products {
			fields {
				images.file.maxW = 255
				images.file.maxH = 300

				images.imageLinkWrap = 1
				images.imageLinkWrap {
					enable = 1
					bodyTag = <body style="margin:5px; background-color: #FFF">
					wrap = <a href="javascript:close();">|</a>

					width = {$styles.content.imgtext.linkWrap.width}
					height = {$styles.content.imgtext.linkWrap.height}
					effects = sharpen=20
					
					JSwindow = 1
					JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow}
					JSwindow.expand = 10,10
				}
			}
		}
		articles {
			fields {
				images = IMAGE
				images {
					file.maxW = 100
				}
			}
		}
	}
	listView {
		products {
			fields {		
				images {
					file.maxW = 150
					file.maxH = 150
				}
			}
		}
	}
}

Take care,
Paul


More information about the TYPO3-project-commerce mailing list