I'm working on order confirmation email and I want to pass variable output:

{{var order.getMyCustomItem().getSomething('key')}}

To another variable. In my case it's an order model:

{{var order.pimpMyValue(order.getMyCustomItem().getSomething('key'))}}

So my order model contains pimpMyValue public method and getMyCustomItem method which returns order item model. And order item model has getSomething method which accepts one string parameter. It returns string.

So when I use first code:

{{var order.getMyCustomItem().getSomething('key')}}

It works. When I use second code (withot combaining it with another variable) it also works:

{{var order.pimpMyValue('my_value')}}

But I can't make it to work with nested variables. Is it even possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.