It is possible to retrieve an RSS/JSON feed and display the result in HTML when rendering your webpage or email. This can be used, for example, to promote the best-selling items from your website or personalize an email with data from the user most favorite store.
It can also be used to retrieve the latest product catalog, allowing you to save a lot of time when creating your newsletters.
Installation
In the Deployteq Store, you can find the module called "Data feeds";
With two steps, you can have the app installed. The first step is the actual installation, and the second step is the financial administration, as you are accustomed to from us.
In your emails and pages, you can now use the Smarty functions getRss and getJSON to retrieve the feed. With Smarty, you can translate this into the desired HTML format.
Example getRSS
{{getRss assign='<variabel name>' link='<url>'}}
<!--{getRss assign='rssdata' link='https://www.emerce.nl/nieuws/feed'}-->
<!--{foreach from=$rssdata.channel[0].item item=data}-->
Titel: {{$data.title}}<br/>
Link: {{$data.link}}<br/>
<!--{/foreach}-->
To determine how the RSS feed is structured, you can use the Smarty method var_dump or print_r;
Example getJSON
{{getJSON assign='<variabel name>' url='<url>'}}
<!--{getJSON assign='jsondata' url='https://data.nasa.gov/resource/y77d-th95.json'}-->
<!--{foreach from=$jsondata key=key item=item}-->
Name: {{$item.name}}<br/>
Nametype: {{$item.nametype}}<br/>
<!--{/foreach}-->
To determine how the JSON feed is structured, you can use the Smarty method var_dump or print_r: