Created
December 11, 2015 18:20
-
-
Save wvpv/dabf8354075275b85b03 to your computer and use it in GitHub Desktop.
SFMC AMPScript Flexible Content Areas with XML Interfaces 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
set @products = LookupOrderedRows("ProductDE",6, "AvgCustomerRating desc" ,"ApprovedForEmail","true") | |
set @productCount = rowcount(@products) | |
set @productXML = "<products>" | |
for @i = 1 to @productCount do | |
set @product = Row(@products, @i) | |
set @productImageURL = Field(@product, "ProductImageURL") | |
set @productXML = concat(@productXML,"<product>") | |
set @productXML = concat(@productXML,"<productImageURL><![CDATA[",@productImageURL,"]]></productImageURL>") | |
set @productXML = concat(@productXML,"</product>") | |
next @i | |
set @productXML = concat(@productXML,"</products>") | |
]%% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment