Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: variants w/ color

  1. #1
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default variants w/ color

    Is there any way or modification to enter a color for a variant in a field and have that variant in the table condensed view have the color entered as the background color of the <tr>? Or any way to modify the xml file to do this?

  2. #2
    VibeCommerce is offline Member
    Join Date
    Dec 2006
    Location
    Grandville, MI
    Posts
    63

    Default

    You could store the color hex value in an unused field on the variant record, then pull it in and apply it as a style attribute to the tr element.

  3. #3
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    I tried to do the following just as a test, but the text won't output to the html and it just gives me an error.

    bgcolor="<xsl:value-of select="concat($pSKU, skusuffix)" />"

  4. #4
    VibeCommerce is offline Member
    Join Date
    Dec 2006
    Location
    Grandville, MI
    Posts
    63

    Default

    Pretending that your SKU value below is actually selecting a different unused field, you would want it to be something like this I believe:

    HTML Code:
    style="background-color:#{concat($pSKU, skusuffix)};"
    I'm not certain if you can use the concat function in there though, but you get the idea... you need to put your value between curly braces without the xsl tag.

  5. #5
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    Worked perfectly! Thank you!