Replies: 3 comments
-
At first this seems nice to extend or enhance the logic comparison available in the email templates, but it's so simple (a tiny bit of layout xml) to just breakout of the email template file and use a .phtml block instead which can then include whatever logic you wish, so is this really necessary? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry for this "ad" like, but I did that for one of my module.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
wow! Would even be a great contribution to M2 too ;)
…On Wed, Jan 13, 2021 at 5:01 PM luigifab ***@***.***> wrote:
Sorry for this "ad" like, but I did that for one of my module
<https://gist.github.com/luigifab/38df5b186fe6548c8db6140296160142#file-ifconfig-php-L116>
.
I also added support for:
{{if something gt/gte/gteq/lt/lte/lteq/eq/neq something/empty}} ... {{elseif ...}} ... {{else}} ... {{/if}}
{{if something in/nin a,b,c,1,2,3}} ... {{elseif ...}} ... {{else}} ... {{/if}} (in_array)
{{if something ct/nct something}} ... {{elseif ...}} ... {{else}} ... {{/if}} (contains)
{{ifconfig path='a/b/c'}} ... {{elseconfig}} ... {{/ifconfig}}
{{foreach something}} ... {{forelse}} ... {{/foreach}}
{{dump something}} | {{dump}}
{{number something}} | {{number config='a/b/c'}}
{{price something}} | {{price config='a/b/c'}}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#591 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE7I26M5JVIZMVUM2YAISTSZW7VJANCNFSM4GRQMIVA>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature request: add depend/if statements in transactional emails bassed on config
It would be great if we can use something like
{{depend {{config path='some/value/here'}}}} text here
Step 1 would be to support true/false
{{depend {{config path='some/value/here'}}}}
Step 2 would be to support equals == value
{{depend {{config path='some/value/here'}} == 'myvalue'}}
Explained here
https://magento.stackexchange.com/questions/6507/magento-depend-combined-with-config-path-some-value-here
And possibly needs a change here:
magento-lts/lib/Varien/Filter/Template.php
Line 131 in f78f0c2
Beta Was this translation helpful? Give feedback.
All reactions