How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4542 by Innonic
28 Aug 2017, 10:20
I added attributes of two types to an article: 'Configurable' and 'Default'.

The configurable attributes are there and configurable. But there's only one of the 'Default' attributes visible (see images).
I just startet adding the 'Configurable' attributes. Before I did that, the 'Default' atrributes were visible and for the other articles, that have no configurables yet, the defaults are visible.
Is there any Interference or a limited number of attributes?

BTW: I did clear the caches and updated the site several times.

Thank you!
Attachments
bild2.png
bild2.png (35.42 KiB) Viewed 482 times
bild1.png
bild1.png (65.56 KiB) Viewed 482 times
#4544 by aimeos
28 Aug 2017, 15:00
There's no limitation in the number of attributes per product or any interference between attribute types. Only for variant types, there's a soft limit of 32 variant attribute types per product on 32 bit platforms. Your setup looks fine from what I can see as long as the status of the attribute types and attribute items are all "enabled".

Can you please add a
Code: Select allprint_r( $attrMap );

at https://github.com/aimeos/ai-client-htm ... lt.php#L10
Maybe we can get closer to the issue when we see if the attributes are already missing there.
#4546 by Innonic
29 Aug 2017, 09:35
Yes, here's the result (formatted for better readability):

Code: Select allArray (
   [Anwendungsbereich] => Array (
      [102] => Aimeos\MShop\Attribute\Item\Standard Object (
         [values:Aimeos\MShop\Attribute\Item\Standard:private] => Array (
            [attribute.id] => 102
            [attribute.siteid] => 1
            [attribute.typeid] => 55
            [attribute.domain] => product
            [attribute.code] => application-area
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Innen / Außen
            [attribute.mtime] => 2017-06-30 15:18:32
            [attribute.ctime] => 2017-06-30 15:13:49
            [attribute.editor] => hplforum
            [attribute.type] => Anwendungsbereich
            [attribute.typename] => Anwendungsbereich
         )
         [listItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [refItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [sortedLists:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [prefix:Aimeos\MShop\Common\Item\Base:private] => attribute.
         [basevals:Aimeos\MShop\Common\Item\Base:private] => Array (
            [attribute.id] => 102
            [attribute.siteid] => 1
            [attribute.typeid] => 55
            [attribute.domain] => product
            [attribute.code] => application-area
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Innen / Außen
            [attribute.mtime] => 2017-06-30 15:18:32
            [attribute.ctime] => 2017-06-30 15:13:49
            [attribute.editor] => hplforum
            [attribute.type] => Anwendungsbereich
            [attribute.typename] => Anwendungsbereich
         )
         [modified:Aimeos\MShop\Common\Item\Base:private] =>
      )
   )
   [Brennbar] => Array (
      [103] => Aimeos\MShop\Attribute\Item\Standard Object (
         [values:Aimeos\MShop\Attribute\Item\Standard:private] => Array (
            [attribute.id] => 103
            [attribute.siteid] => 1
            [attribute.typeid] => 56
            [attribute.domain] => product
            [attribute.code] => inflammable
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Nein
            [attribute.mtime] => 2017-07-01 10:30:58
            [attribute.ctime] => 2017-07-01 10:30:58
            [attribute.editor] => hplforum
            [attribute.type] => Brennbar
            [attribute.typename] => Brennbar
         )
         [listItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [refItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [sortedLists:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [prefix:Aimeos\MShop\Common\Item\Base:private] => attribute.
         [basevals:Aimeos\MShop\Common\Item\Base:private] => Array (
            [attribute.id] => 103
            [attribute.siteid] => 1
            [attribute.typeid] => 56
            [attribute.domain] => product
            [attribute.code] => inflammable
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Nein
            [attribute.mtime] => 2017-07-01 10:30:58
            [attribute.ctime] => 2017-07-01 10:30:58
            [attribute.editor] => hplforum
            [attribute.type] => Brennbar
            [attribute.typename] => Brennbar
         )
         [modified:Aimeos\MShop\Common\Item\Base:private] =>
      )
   )
   [Hitzebeständig] => Array (
      [104] => Aimeos\MShop\Attribute\Item\Standard Object (
         [values:Aimeos\MShop\Attribute\Item\Standard:private] => Array (
            [attribute.id] => 104
            [attribute.siteid] => 1
            [attribute.typeid] => 57
            [attribute.domain] => product
            [attribute.code] => heat-resistant
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => bis 800 °C
            [attribute.mtime] => 2017-08-28 12:49:50
            [attribute.ctime] => 2017-07-01 10:32:18
            [attribute.editor] => hplforum
            [attribute.type] => Hitzebeständig
            [attribute.typename] => Hitzebeständig
         )
         [listItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [refItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [sortedLists:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [prefix:Aimeos\MShop\Common\Item\Base:private] => attribute.
         [basevals:Aimeos\MShop\Common\Item\Base:private] => Array (
            [attribute.id] => 104
            [attribute.siteid] => 1
            [attribute.typeid] => 57
            [attribute.domain] => product
            [attribute.code] => heat-resistant
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => bis 800 °C
            [attribute.mtime] => 2017-08-28 12:49:50
            [attribute.ctime] => 2017-07-01 10:32:18
            [attribute.editor] => hplforum
            [attribute.type] => Hitzebeständig
            [attribute.typename] => Hitzebeständig
         )
         [modified:Aimeos\MShop\Common\Item\Base:private] =>
      )
   )
   [Motiv] => Array (
      [112] => Aimeos\MShop\Attribute\Item\Standard Object (
         [values:Aimeos\MShop\Attribute\Item\Standard:private] => Array (
            [attribute.id] => 112
            [attribute.siteid] => 1
            [attribute.typeid] => 39
            [attribute.domain] => product
            [attribute.code] => hpl-hsn-002-motiv
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Blätter
            [attribute.mtime] => 2017-08-28 11:20:09
            [attribute.ctime] => 2017-08-28 11:18:01
            [attribute.editor] => hplforum
            [attribute.type] => Motiv
            [attribute.typename] => Motiv
         )
         [listItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [refItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [sortedLists:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [prefix:Aimeos\MShop\Common\Item\Base:private] => attribute.
         [basevals:Aimeos\MShop\Common\Item\Base:private] => Array (
            [attribute.id] => 112
            [attribute.siteid] => 1
            [attribute.typeid] => 39
            [attribute.domain] => product
            [attribute.code] => hpl-hsn-002-motiv
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Blätter
            [attribute.mtime] => 2017-08-28 11:20:09
            [attribute.ctime] => 2017-08-28 11:18:01
            [attribute.editor] => hplforum
            [attribute.type] => Motiv
            [attribute.typename] => Motiv
         )
         [modified:Aimeos\MShop\Common\Item\Base:private] =>
      )
      [121] => Aimeos\MShop\Attribute\Item\Standard Object (
         [values:Aimeos\MShop\Attribute\Item\Standard:private] => Array (
            [attribute.id] => 121
            [attribute.siteid] => 1
            [attribute.typeid] => 39
            [attribute.domain] => product
            [attribute.code] => hpl-hsn-003-motiv
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Anzeigetafel
            [attribute.mtime] => 2017-08-28 12:00:21
            [attribute.ctime] => 2017-08-28 12:00:21
            [attribute.editor] => hplforum
            [attribute.type] => Motiv
            [attribute.typename] => Motiv
         )
         [listItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [refItems:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [sortedLists:Aimeos\MShop\Common\Item\ListRef\Base:private] => Array ( )
         [prefix:Aimeos\MShop\Common\Item\Base:private] => attribute.
         [basevals:Aimeos\MShop\Common\Item\Base:private] => Array (
            [attribute.id] => 121
            [attribute.siteid] => 1
            [attribute.typeid] => 39
            [attribute.domain] => product
            [attribute.code] => hpl-hsn-003-motiv
            [attribute.status] => 1
            [attribute.position] => 0
            [attribute.label] => Anzeigetafel
            [attribute.mtime] => 2017-08-28 12:00:21
            [attribute.ctime] => 2017-08-28 12:00:21
            [attribute.editor] => hplforum
            [attribute.type] => Motiv
            [attribute.typename] => Motiv
         )
         [modified:Aimeos\MShop\Common\Item\Base:private] =>
      )
   )
)


Seems like everything is there. May this be caused by the 'attribute.position' since it's always 0? Should not, since the position is for entries of the same type, but the missing types are different...
#4548 by Innonic
30 Aug 2017, 07:54
I'm using version 16.10.5

I just looked into Chrome's 'Code Inspector' again and I realized, that the HTML of the attributes is there (see image).
But it seems to be invisible due to the CSS 'display:none'...

Maybe that's a hint?


UPDATE:
I just added some "Configurable" attributes toan article. Before I did that, the "Default" attributes were visible. After adding them, the "Default" atrributes are not visible any more...
I guess, there must be a connection.
Attachments
bild1.png
bild1.png (93.07 KiB) Viewed 466 times
#4549 by aimeos
30 Aug 2017, 20:58
You've added those attributes to the article, not the selection product. Therefore, the attributes are only shown if exactly this article is chosen by selecting it's variant attributes.
#4550 by Innonic
31 Aug 2017, 09:37
OK, I think I understand what you mean.

I do not have any attributes of type "Variant". I only have "Default", "Configurable" and "Custom value" attributes.

So what do I have to change now? Changing the type to "Selection" instead of "Article" doesn't help.
And why are some attributes shown and others are not? I created and added them the same way.


UPDATE:
By trial and error I realized, that I can create new attribute types and add them to the same article and they are visible.
So I deleted the attributes (the whole type) which were not shown. Afterwards I recreated them, added them and now they are visible again. That seems to work for now. But I can't do this for every article and attribute, whenever some article doesn't show all attributes...

Maybe there is some flag or something set wrong within the database. Probably it's what you mentioned above. Maybe you could explain that quickly to me in one or two more sentences. I don't really get it since I have no variants and it doesn't seem to make a difference if the articles type is "Selection" or "Article"...
#4551 by aimeos
31 Aug 2017, 13:16
Please make sure that
- your articles are of product type "default"
- you don't have associated products to that articles of list type "default" (only suggest or bought)

The problem most probably arises because you've associated products to your articles (product detail panel -> Products) with a list type of "default". Those references are then interpreted as articles of a selection product and their attributes get the class "subproduct" which is hidden by default.