Include Store name in report template?

Answered

Comments

5 comments

  • Official comment
    Avatar
    Jacob Hutter

    Thank you for reaching out Michael!

     

    I have transferred your code to my ShipWorks, and exported orders from multiple stores.

    I am facing the same issue that you are having, although I do have a couple ideas for a proper solution!

    I am currently creating a ticket for us to exclusively communicate with.

    You will be hearing from me shortly!

     

    Also, Shout Out to Nathan for conducting ShipWorks testing. Seriously, thank you for the additional feedback/verification!

     

    Comment actions Permalink
  • Avatar
    Nathan H.

    Your code looks perfectly fine and outputs exactly as intended.

     

    0
    Comment actions Permalink
  • Avatar
    Viri Kozma

    Thanks for visiting the ShipWorks forum! This was solved in a private ticket using the following variables:

    <xsl:for-each select="Customer/Order/Item">

       <xsl:variable name="order" select=".." />
       <xsl:variable name="store" select="/ShipWorks/Store[@ID = $order/@storeID]" />

          <xsl:text>"</xsl:text><xsl:value-of select="$store/StoreName" /><xsl:text>"</xsl:text>

    </xsl:for-each>

    0
    Comment actions Permalink
  • Avatar
    shipping

    Actually, that variable worked but for some reason was extremely slow when processing a large number of orders. I tried it on 7000 orders and after 15 minutes it was still processing. I ended up modifying it as shown below and that seemed to solve the problem!

     

    <xsl:for-each select="Customer/Order">

    <xsl:variable name="order" select="." />
    <xsl:variable name="store" select="/ShipWorks/Store[@ID = $order/@storeID]" />
    <xsl:variable name="ship" select="Address[@type='ship']" />

    <xsl:text>"</xsl:text><xsl:value-of select="$store/StoreName" /><xsl:text>"</xsl:text>

    </xsl:for-each>

    0
    Comment actions Permalink
  • Avatar
    Viri Kozma

    Awesome! Thanks for sharing your variable. 

    0
    Comment actions Permalink

Please sign in to leave a comment.