[TYPO3-shop] Articles with images

Franz Holzinger franz at ttproducts.de
Fri Sep 30 18:12:51 CEST 2011


Hello Christian,


On 30/09/11 03:13, Christian Lerrahn (Cerebrum) wrote:
> Hi Franz,
>
> On Thu, 29 Sep 2011 07:34:32 +0200
> Franz Holzinger<franz at ttproducts.de>  wrote:
>
>> On 29/09/11 03:25, Christian Lerrahn wrote:
>>
>>>>> However, even for articles that have
>>>>> images attached, I always see the product image instead. The
>>>>> marker is ###ARTICLE_IMAGE###, so that seems correct. However, I
>>>>> had a look at the AJAX response and it looks like the image does
>>>>> not only not get replaced in the browser but the AJAX response
>>>>> always contains the product image and never any of the article
>>>>> images.
>>>>>
>>>>> I'm using the latest version of tt_products 2.8.1 (23 Sep 2011).
>>>>>
>>>>
>>>> you must have set useArticles, otherwise the articles are not used.
>>>
>>> That is the case. As mentioned earlier, I can get the price updated
>>> from articles.
>>>
>>>> You must also have the tag id markers used around the images.
>>>
>>> The template has a line
>>> <div class="tt-products-item-img"
>>> id="###ARTICLE_IMAGE_ID###">###ARTICLE_IMAGE###</div>
>>>
>>> which translates to something like
>>>
>>> <div class="tt-products-item-img"
>>> id="tt-products-from-tt-products-articles-single-1-image-"><img
>>> src="uploads/pics/foobar.jpg" width="100" height="100" border="0"
>>> alt="" /><br /></div>
>>>
>>> Shouldn't that do the trick? The span around price looks very
>>> similar translating to
>>
>> Here is an error in the replacement of the tag id marker:
>>
>>    id="tt-products-from-tt-products-articles-single-1-image-">
>>
>> The number to the right is missing.
>>
>> You must also add the number of the image when you use IMAGE markers
>> for articles:
>>
>> 	<div id="###ARTICLE_IMAGE_ID1###">
>> 		###ARTICLE_IMAGE1###
>> 	</div>
>
> If I change the markers as you suggest, I do get different HTML. I
> thought that without
>
> separateImage = 1
>
> I'd be able to just use the markers without a numerical identifier.

There is no feature with combined images implemented for articles. This 
is only valid for products.
Combined images are not supported by the dynamic image exchange feature.

> Anyway, the new HTML looks ok.
>
> <div class="tt-products-item-img"
> id="tt-products-from-tt-products-articles-single-1-image-1">...
>
> However, this does not change anything about the images never getting
> replaced. I'm still worried about the fact that the AJAX response never
> contains the correct path to the article images. I always see something
> like
>
> <cmd n="as" t="tt-products-from-tt-products-articles-single-1-image"
> p="innerHTML"><![CDATA[<img src="uploads/pics/foobar.jpg" width="100"
> height="100" border="0" alt="" /><br />]]></cmd><cmd n="as"
> t="tt-products-from-tt-products-articles-single-1-image-1"
> p="innerHTML"><![CDATA[<img src="uploads/pics/parrot.jpg" width="100"
> height="100" border="0" alt="" /><br />]]></cmd>
>
> in the AJAX response where foobar.jpg is the product image not the
> article image.

Maybe you have made some misconfiguration. tt_products does not find the 
articles you have assigned to the products. Therefore the image is taken 
from the product. Check your settings.

- Franz





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