Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2919 by velo
23 Jun 2016, 10:33
Hey there,

we got Images associated to our attributes. (See Screenshot)
Now we want to render these Images in a template, how can we do this.

We found at
Code: Select allaimeos/Resources/Libraries/aimeos/aimeos-core/client/html/templates/catalog/detail/additional-attribute-body-default.php:30

a code snippet which should do this in our opinion, but it doesn't render the images.

Thanks in advance
velos
Attachments
Bildschirmfoto 2016-06-23 um 12.28.08.png
Bildschirmfoto 2016-06-23 um 12.28.08.png (161.01 KiB) Viewed 934 times
#2920 by aimeos
23 Jun 2016, 10:52
Which Aimeos version are you using?
I've tested it in the 16.4.3 demo installation and it works there. The only thing that is different to your screenshot is that the "List type" in the left panel is "Default" instead of "Standard" in my case ...
#2921 by velo
23 Jun 2016, 13:58
Hey there,
thank you for the fast response.
We're on 16.3.4 .

As you can see in the Screenshot, we can't choose Default as ListType.
Can you explain where we can configure new list types? In the types tab we can't find it.

Thanks
velos
Attachments
Bildschirmfoto 2016-06-23 um 15.52.56.png
Bildschirmfoto 2016-06-23 um 15.52.56.png (25.26 KiB) Viewed 929 times
#2922 by aimeos
23 Jun 2016, 14:22
velo wrote:We're on 16.3.4


Think you've meant 16.4.3 too ;-)

velo wrote:As you can see in the Screenshot, we can't choose Default as ListType.


Did you've upgraded from a previous version? I've meant the list type for the attribute <-> media association. There should be "Default" and "Icon" in the select box for the list types.

Can you please have a look into the "mshop_attribute_list_type" table? There should be an entry for domain "media" and code "default".
#2923 by velo
24 Jun 2016, 07:18
Hey there,

first of all, thanks for the support here and overthere on twitter. :)

There is an entry in the table (see screenshot).

The Situation is:
TYPO3 Extension in the current version. Installed through composer.
Tables were created with the update script of the TYPO3 Extension.

We found another small Problem with the imported Typo3 tree. In the setup there was this line
Code: Select allplugin.tx_aimeos.settings.client.html.catalog.detail.default.subparts {

to getting things working here we had to change the line as follows
Code: Select allplugin.tx_aimeos.settings.client.html.catalog.detail.[b]standard[/b].subparts


so it might be a problem in general with this standard/default stuff.

Best regards
velos
Attachments
Bildschirmfoto 2016-06-24 um 08.58.32.png
Bildschirmfoto 2016-06-24 um 08.58.32.png (56.85 KiB) Viewed 922 times
#2924 by aimeos
24 Jun 2016, 09:57
velo wrote:first of all, thanks for the support here and overthere on twitter. :)


You are welcome :-)

velo wrote:There is an entry in the table (see screenshot).


That looks valid. Is the status for the media and list item set to enabled?
Can you please add one or two echo/print_r statements to the template to to see why there's no output:
https://github.com/aimeos/ai-client-html/blob/master/client/html/templates/catalog/detail/additional-attribute-body-default.php#L31

Code: Select allprint_r( $attrItem->getListItems( 'media' ) );
print_r( $attrItem->getRefItems( 'media' ) );


velo wrote:TYPO3 Extension in the current version. Installed through composer.


You did that yourself, didn't you? Support for composer in the TYPO3 package is currently only in the dev-master branch and a new release will be published next month.

velo wrote:We found another small Problem with the imported Typo3 tree. In the setup there was this line
Code: Select allplugin.tx_aimeos.settings.client.html.catalog.detail.default.subparts {

to getting things working here we had to change the line as follows
Code: Select allplugin.tx_aimeos.settings.client.html.catalog.detail.[b]standard[/b].subparts



Thanks you for the hint! We will fix this in the page tree package. Did you use the distribution or did you import the page tree yourself?
#2925 by velo
24 Jun 2016, 14:52
aimeos wrote:That looks valid. Is the status for the media and list item set to enabled?
Can you please add one or two echo/print_r statements to the template to to see why there's no output:
https://github.com/aimeos/ai-client-html/blob/master/client/html/templates/catalog/detail/additional-attribute-body-default.php#L31


Eventually it is not possible what we want to do, so I try to explain it in Detail.

We have several attributes assigned to our products, one of those is the Attribute Argentina which is of Type country. (country is a Attribute Type defined for our purposes.)
In the Catalog/Detail View we want to render the country name and the flag of e.g. argentina. It should look similar to the screenshot. The Text "Argentina" is a text element assigned to the attribute, and the flag is a media element which is also attached to the attribute.
Our Problem is that we don't know how to render the flag in the Catalog/Detail View.

You did that yourself, didn't you? Support for composer in the TYPO3 package is currently only in the dev-master branch and a new release will be published next month.

Yes we have a global composer json to install extensions. It works pretty well so far.

Thanks you for the hint!

My pleasure.

We will fix this in the page tree package. Did you use the distribution or did you import the page tree yourself?

We imported the page tree ourself.
Attachments
Bildschirmfoto 2016-06-24 um 16.40.08.png
Bildschirmfoto 2016-06-24 um 16.40.08.png (9.74 KiB) Viewed 911 times
#2926 by aimeos
24 Jun 2016, 16:04
velo wrote:In the Catalog/Detail View we want to render the country name and the flag of e.g. argentina. It should look similar to the screenshot. The Text "Argentina" is a text element assigned to the attribute, and the flag is a media element which is also attached to the attribute.


If you don't mind that image is rendered left of the text by default, it's exactly what you will get. You can have a look into the demo to see it in action (the black square for the color in "Characteristics"): http://typo3.demo.aimeos.org/default/detail/d/90335/Demo%20article/0/

The only question is what's wrong in your case. In the demo it's configured as:
- Product attribute type code: color (country in your case)
- Product attribute code: black (argentinia in your case)
- Product list type for the attribute item: default
- Product attribute media type code: default
- Product attribute media language: all
- Product attribute list type for the media item: default
- Status of all entries: enabled
#2942 by velo
05 Jul 2016, 22:01
Hey there,

sorry for the delay. There's so much work right now.
Because we've overwritten our templates, we're able to use attributes now.
Recently I tested the whole stuff without our templates and what shoudl I say, ...... it just works.
The only thing we've changed is disabling the cache. I think we cleared the cache many times on testing but eventually there was some caching somehow.

So, we solved the problem and we're happy with the shop :)