[TYPO3-shop] Articles with images
Christian Lerrahn
typo3 at penpal4u.net
Mon Oct 3 00:41:16 CEST 2011
Hi Franz,
On Fri, 30 Sep 2011 18:12:51 +0200
Franz Holzinger <franz at ttproducts.de> 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.
Fair enough. However, the marker ###ARTICLE_IMAGE### is used in the
example templates which doesn't seem to make any sense if there is no
marker that gets filled by a list of all images. But maybe I
misunderstand what the difference between the numbered markers and the
generic one is.
> > 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.
I don't think this is possible. My articles are definitely found because
my price gets updated from the articles. I haven't tried swapping
anything but image and price but I suppose if out of these two the
price works, that should be proof enough that the articles are found,
right? Or could there be a scenario where the price swapping works but
not the image swapping?
Cheers,
Christian
More information about the TYPO3-project-tt-products
mailing list