We would like to populate a product grid pulled from an product category RSS feed. Below is code pulled from the help doc for using RSS feed in email.
Within the grid we need to include product's (title, image & link) for product positions 1-9 from the RSS feed (see link inside AMPScript).
From the "help" code, we've also added image + inserted a dynamic date statement %%=Format(Now(),"MM-dd-yyyy")=%%
to update tracking parameters.
Content Area
%%before; httpget; 1 "http://www.nastygal.com/feed/clothes"%%
AMPScript
%%[
Var @xml, @titles, @title, @descs, @desc, @links, @link, @cnt
/* This line specifies the content area from which the RSS content will be pulled for the email message. */
Set @xml = ContentAreaByName("my contents\newarrivals_clothes_9")
Set @titles = BuildRowsetFromXML(@xml,"//item/title",1)
Set @links = BuildRowsetFromXML(@xml,"//item/link",1)
Set @images = BuildRowsetFromXML(@xml,"//item/img",1)
If RowCount(@titles) > 9 THEN
SET @rows = 9
ELSE
SET @rows = RowCount(@titles)
ENDIF
IF @rows >= 1 THEN
for @cnt = 1 to @rows do
Set @title = Field(Row(@titles,@cnt),"Value")
Set @desc = Field(Row(@descs,@cnt), "Value")
Set @link = Field(Row(@links,@cnt), "Value")
Set @image = Field(Row(@images,@cnt), "Value")
]%%
<div style="border: 1px solid #444; background-color: #F7F7F7; margin: 0.76em 0; padding: 0.76em;">
<h1 style="font: bold normal 1.0em Arial, Helvetica, sans-serif;">
<a href="%%=RedirectTo(@link)=%%" alias="%%=v(@title)="%%" title="%%=v(@title)=%% style="color: #000;">%%=v(@title)=%%</a>
</h1>
<span style="font: normal normal 0.76em Arial, Helvetica, sans-serif; color: #444;">
%%=v(@desc)=%%
</span>
</div>
%%[ NEXT @cnt ]%%
%%[ ENDIF ]%%
QUESTION
Based on what we have, will the AMPScript understand appropriate values to pull in from RSS?
Did we insert @image correctly?