Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mathematic operations using providers #295

Closed
Einenlum opened this issue Dec 2, 2015 · 2 comments
Closed

Mathematic operations using providers #295

Einenlum opened this issue Dec 2, 2015 · 2 comments

Comments

@Einenlum
Copy link
Contributor

Einenlum commented Dec 2, 2015

Is there an easy way to do something like :

total_item_price_{1..4}:
    value: <current()> * @offer_price_<current()>->value

Should I create a custom provider? If so, can I resolve values before passing them to my provider?

@Seldaek
Copy link
Member

Seldaek commented Dec 2, 2015 via email

@theofidry
Copy link
Member

The problem with what you would like to do is that the string <current()> * @offer_price_<current()>->value must, besides being parsed and the value resolved, be evaluated. That's not something that will be added. If you want to do this kind of thing, you should add a custom provider:

total_item_price_{1..4}:
    value: <calculateItemValue(<current()>, @offer_price_<current()>)>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants