Bold & Resize Individual Items On Invoice

Comments

6 comments

  • Official comment
    Avatar
    Ryen M.

    Hi Andrew, 

    I had some troubles finding this at first too. The 'answered' button can be found by clicking the settings icon on the right side of the original post (under the up and down arrow buttons). In the picture below, the settings icon is highlighted for you. 

    Comment actions Permalink
  • Avatar
    Nathan H.

    Yes,

     

    What your looking for is an CHOOSE WHEN.

    <!-- Choose when for specific Item Code. -->
    <!-- This will increase the font size to 22px -->
    <!-- and set the font-weight to bold if the item code equals -->
    <!-- the specified code otherwise everything will be set to default -- >

    <xsl:choose>
    <xsl:when test="Code = '261390147132'"> <td style="{$orderDetailContentStyle}; font-size:22px; font-weight:bold;">
    <xsl:value-of select="Code" />
    </td>
    </xsl:when> <xsl:otherwise> <td style="{$orderDetailContentStyle};" >
    <xsl:value-of select="Code" />
    </td> </xsl:otherwise>
    </xsl:choose>


    <!-- Same thing goes for Quantity. -- >

    <xsl:choose> <xsl:when test="Code = '261390147132'"> <td style="{$orderDetailContentStyle}; font-size:22px; font-weight:bold;" align="right">
    <xsl:value-of select="Quantity" />
    </td>
    </xsl:when> <xsl:otherwise> <td style="{$orderDetailContentStyle};" align="right">
    <xsl:value-of select="Quantity" />
    </td> </xsl:otherwise>
    </xsl:choose>
    0
    Comment actions Permalink
  • Avatar
    Nathan H.

    No problem. If you question was answered please mark it as Answered.

    This helps anyone in the future looking for the same thing.

     

    Thanks.

    0
    Comment actions Permalink
  • Avatar
    Andrew L.

    Nathan, am I blind???? I don't see a way to mark it as answered :)

    0
    Comment actions Permalink
  • Avatar
    Andrew L.

    Hmmm Ryen...still not seeing it???? Checked Firefox and Chrome. Just see an edit and delete option under the action cog.

     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Michael Blower

    Invoice template is using HTML format so you can uses css to change style attributes.

    I added a second definition or version of the "orderDetailContentStyle"

    <xsl:variable name="orderDetailContentStyle2">
    padding: 4px 8px 4px 8px;
    font-weight: bold;
    font-size: larger;
    <xsl:if test="position() != 1">border-top: 1px solid lightgrey;</xsl:if>
    </xsl:variable>

    Then applied it the field I wanted bold and larger text.

    <td style="{$orderDetailContentStyle2};">
    <!-- Shared Snippet -->
    <xsl:call-template name="OrderItemCode">
    <xsl:with-param name="item" select="." />
    </xsl:call-template>
    </td>

    0
    Comment actions Permalink

Please sign in to leave a comment.