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 %}

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board

🧩 Feature Request

ETA
Jun 29, 2023
Date

About 3 years ago

Author

Grzegorz Kacperski

Subscribe to request

Get notified by email when there are changes.