Show material in table ?

Is pimcore a viable solution for my website?
Post Reply
tototem
Posts: 2
Joined: Wed Sep 02, 2015 4:56 pm

Show material in table ?

Post by tototem » Wed Sep 02, 2015 5:04 pm

Hi,

I want to try pimcore but I have a question first, I need to be able to see the material color in this table:
Imagehttp://i.imgur.com/dcNdiRn.png

In the "Color(s)" row, I need to see the color (the one you choose in the "Material/Appearance" tab of a product), and not its name. (The products will only have one color maximum.)

Can this be done in pimcore ? And how can I add new colors in the "Material/Appearance" ?

Thanks a lot.

PS: I only tested the online demo, not installed it yet, just testing the possibilities.

User avatar
richclever
Posts: 62
Joined: Fri Sep 30, 2011 2:43 pm
Contact:

Re: Show material in table ?

Post by richclever » Wed Sep 02, 2015 5:55 pm

I'd imagine that would need some sort of custom development doing to translate the colour into it's RGB value. No idea how easy this would be.
Magepim Ecommerce Services

tototem
Posts: 2
Joined: Wed Sep 02, 2015 4:56 pm

Re: Show material in table ?

Post by tototem » Thu Sep 03, 2015 10:59 am

Well i suppose the RGB value is already known, since it's chosen here:
Image
http://i.imgur.com/lJiZamv.png

User avatar
richclever
Posts: 62
Joined: Fri Sep 30, 2011 2:43 pm
Contact:

Re: Show material in table ?

Post by richclever » Thu Sep 03, 2015 11:20 am

Ah right (sorry not too familiar with the sample data). In that case I'd have thought that it is just showing the colour name, so if you can find that in the code you should be able to change it to display the actual colour.

If you can't find it I can install the sample data and have a look to see if I can figure it out.

EDIT: IT looks like the download of the demo data doesn't have any of the PIM stuff in it so it's going to be difficult to help with this. Don't know if anyone knows whether this data can be downloaded or not?
Magepim Ecommerce Services

joramhoefs
Posts: 1
Joined: Mon Jun 29, 2015 9:26 pm

Re: Show material in table ?

Post by joramhoefs » Tue Sep 08, 2015 1:49 pm

The material is realized with an multiselect, each option consists of two fields:

"Display name" and an associated "value".

"Display name" supports HTML and is used to display the multiselect within the extjs admin, but only if the multiselect is rendered properly. Therefore multiselects are'nt rendered in grid tables – they just show the values.

"Value" represents the real data, which is also shown in grid tables.

In the case of materials the colors are defnied as follows:

DISPLAY_NAME: Red <span style="background:#FF0000; width:80px; display:block; float:left;margin-right:20px">&nbsp;</span>
VALUE: red

---

DISPLAY_NAME: Green <span style="background:#008000; width:80px; display:block; float:left;margin-right:20px">&nbsp;</span>
VALUE: green

---

etc.

So if you need to display the colors in grid tables, you have to overwrite the particular grid table implementation with your own custom function to render the "DISPLAY_NAME" field instead of "VALUE" for the given table cell.

Post Reply

Return to “Before you start using pimcore”



Who is online

Users browsing this forum: No registered users and 1 guest