[Typo3-shop] Image problems in single view

media.res | alex widschwendter a.widschwendter at mediares.at
Thu Jan 6 13:22:47 CET 2005


Jogvan Olsen wrote:
> In tt_product single-view i want to make layout like this:
> 
> |--------------|---- --------------------------|------------ |
> |                     |                                              | 
> |
> |                     |                                              | 
> image 3     |
> |                     |   Product Description             |-------- --- |
> |                     | 
> |
> |   image 1      | 
> |
> |                     | 
> |------------ |
> |                     |                                             | 
> |
> |                     |                                             | 
> image 2    |
> |                     |                                             | 
> |
> -----------------------------------------------------------
> 
> My problem is I can't separate my images.
> I assign 3 images for each product. In List-view only image1 is shown (which 
> is OK), but in single-view al 3 images are displayed closely packed 
> together.
> I can't figure out how to 'point' to image1, image2 and image3 in my 
> template so I can place the images where I want to.
> Can anyone tell me the definition of image1, image2 .


you have to define seperate markers in class.tx_ttproducts.php which you 
can use in your template.

if you have a second image upload field in the BE use this, else use in 
line $val = $imgs2[0]; instead of 0 the index in the image field.

$theImgCode2="";
		$imgs2 = explode(",",$row["image2"]);
		$val = $imgs2[0];
		while(list($c,$val)=each($imgs2))	{
			if ($c==$imageNum)	break;
			if ($val)	{
				$this->conf[$imageRenderObj."."]["file"] = "uploads/pics/".$val;
			} else {
				$this->conf[$imageRenderObj."."]["file"] = 
$this->conf["noImageAvailable"];
			}
			$theImgCode2.=$this->cObj->IMAGE($this->conf[$imageRenderObj."."]);
		}


fill the marker:

$markerArray["###PRODUCT_IMAGE2###"] = $theImgCode2;

done!


hth alex



More information about the TYPO3-project-tt-products mailing list