bpuig / laravel-subby

Laravel Plan and Subscriptions manager.
https://bpuig.github.io/laravel-subby
MIT License
102 stars 42 forks source link

Pricing per country #80

Closed boryn closed 2 years ago

boryn commented 3 years ago

I know there is currency field but sometimes it's necessary to define the prices not only per currency but also per country. For example different pricing schema among different countries in the euro zone. Or just different pricing across different countries.

I'd see additional field country in the plans table which would allow creating pricing plans per country. I know one could use a special naming for tags, for example "basic-usd-us", "basic-gbp-uk", "pro-usd-us", "pro-gbp-uk", etc. but filtering such plans is a pure pain. With additional scope, filtering by country would be very easy.

Or if not with country specifically, maybe we could just go with a more generic filed name, like group?

I see this change necessary only in plans, it does not need to be copied to plan_subscriptions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

boryn commented 3 years ago

Hi @bpuig! What do you think about adding this extra field? I work on another project where again it would be useful as there is a need to have a different pricings per country.

boryn commented 3 years ago

Couldn't this extra column be added yet in v5? It seems very easy to extend the migration just by this column. I was about to extend my own model but it'd be better to have this in the library.