Skip to main content

Adding the get_attribute snippet to generate the value of the dynamically specified attribute

Description

To generate attribute values whose names are given dynamically, it is necessary to add the get_attribute snippet.

Usage example

{% get_attribute <model_name> '<snippet>' %}

Returning different product attributes, depending on their name:

{% products count=5 category='fuses' segment=receiver.company.country order_by='id' language_code= order=1 as product_list %}{% for product in product_list %}{% get_attribute product '{{global.var_to_render}}' %}{% end for %}
Status: Completed

Log in to comment and vote

No comments yet

Be the first to share your thoughts.