Use product recommandation variables

When setting up a product recommendation bloc in an email design, you will automatically have the following liquid code generated (you can see it in the preview tab).

{% product_recommendations recommended_products_list=3%} 

{{recommended_products_list[0].name}}  
{{recommended_products_list[0].description}}  
{{recommended_products_list[0].price}} €

The first line is the core of the feature that retrieve product recommandations. If the default display of the product recommendation block and you shouldn't have to use it yourself.

All recommended products are available in recommended_products_list array up to the number of product you setup.

Each element is a full product object, so you can access every fields such as custom fields

{{ recommended_products_list[1].custom_fields['url'] }}