Announcement

Collapse
No announcement yet.

Need variable for comma separated list in INVC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need variable for comma separated list in INVC

    So, I need to create a variable that would contain the data from an array in a comma delimited list. This is for the INVC page to go inside the script for a retargeting campaign. So I can't just drop the "foreach" array into the scipt. I need to create a variable with the foreach contents, and make it comma separated

    For example I need to take this bit of code, but create a variable from the output:

    Code:
    <mvt:foreach iterator="item" array="order:items">
    &mvt:item:code;,
    </foreach>
    The variable I need to create would get something like g.itemcodecommaseparatedlist so that it can write itemcode1, itemcode2, itemcode3,

    Make sense? Can anyone help?

    #2
    Place this in the foreach

    <mvt:if expr="g.thisVariable">
    <mvt:assign name="g.thisVariable" value="g.thisVariable $','$ l.settings:item:code" />
    <mvt:else>
    <mvt:assign name="g.thisVariable" value="l.settings:item:code" />
    </mvt:if>


    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Thanks Bruce!

      Comment

      Working...
      X