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

CountableFeatures: support for unitary prices #1

Open
Aerendir opened this issue Jan 12, 2017 · 0 comments
Open

CountableFeatures: support for unitary prices #1

Aerendir opened this issue Jan 12, 2017 · 0 comments

Comments

@Aerendir
Copy link
Owner

Aerendir commented Jan 12, 2017

The configuration should be something like this:

a_countable_feature:
    type: countable
    cumulable: true
    unitary_price:
        EUR:
            monthly: 1000
            yearly: 10000
        packs:
            ...

Find a way to differentiate the forms. Maybe adding a suffix like _packs and _units may work.

This will break the setting of the default value.

Then is necessary to find a way to calculate the right instantPrice and to save the amount of units bought. More, is necessary to decide what happens in case there are packs set.

For example, if exists a pack with 50 units and the user buys 55, the 50 units should be paid following the packs price or the unitary_price? The remaining 5 units will be paid for sure following the unitary_price.

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

No branches or pull requests

1 participant