Multistore/Multilang/Multi account support #7

Open
therampagerado wants to merge 1 commit from therampagerado/Multi4 into master
therampagerado commented 2025-08-13 18:50:10 -05:00 (Migrated from github.com)

Second attempt on this, hopefully better.

Related also to:
https://github.com/thirtybees/bankwire/issues/2
and
https://github.com/thirtybees/bankwire/pull/6 (used the suplied svg)

Multistore:

  • Proper shop association for bankwire_account (one account per currency per shop). -Fields shown only when multistore is enabled.
    -Prevent duplicate accounts per currency per shop.

Multilang:

  • Mandatory fields (owner, details, address) validated per language. -Clear errors shown when any language is missing required data (no auto-copy).

Multi-account + ALL-currency:

New ALL currency option (id_currency = 0) to accept transfers in one account for every FO currency if merchant whishes.

  • Checkout lookup prefers a specific currency account, falls back to ALL for that shop. -Prevent duplicate ALL accounts per shop.

How to use:
-One account for everything: create a single account with Currency = All → bank handles conversion for all enabled FO currencies.
-Dedicated account per currency: create one account per shop per currency (e.g., EUR, USD, GBP). Do not create an ALL account.
-Mixed setup (recommended fallback): create accounts for the currencies you hold (e.g., EUR, USD). Also create one All account.

At checkout: specific currency account is shown if it exists; otherwise the All account is shown (no lost orders and you show the best accounts for you).

Second attempt on this, hopefully better. Related also to: https://github.com/thirtybees/bankwire/issues/2 and https://github.com/thirtybees/bankwire/pull/6 (used the suplied svg) Multistore: - Proper shop association for bankwire_account (one account per currency per shop). -Fields shown only when multistore is enabled. -Prevent duplicate accounts per currency per shop. Multilang: - Mandatory fields (owner, details, address) validated per language. -Clear errors shown when any language is missing required data (no auto-copy). Multi-account + ALL-currency: New ALL currency option (id_currency = 0) to accept transfers in one account for every FO currency if merchant whishes. - Checkout lookup prefers a specific currency account, falls back to ALL for that shop. -Prevent duplicate ALL accounts per shop. How to use: -One account for everything: create a single account with Currency = All → bank handles conversion for all enabled FO currencies. -Dedicated account per currency: create one account per shop per currency (e.g., EUR, USD, GBP). Do not create an ALL account. -Mixed setup (recommended fallback): create accounts for the currencies you hold (e.g., EUR, USD). Also create one All account. At checkout: specific currency account is shown if it exists; otherwise the All account is shown (no lost orders and you show the best accounts for you).
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'therampagerado/Multi4:therampagerado/Multi4'
git switch 'therampagerado/Multi4'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'master'
git merge --no-ff 'therampagerado/Multi4'
git switch 'therampagerado/Multi4'
git rebase 'master'
git switch 'master'
git merge --ff-only 'therampagerado/Multi4'
git switch 'therampagerado/Multi4'
git rebase 'master'
git switch 'master'
git merge --no-ff 'therampagerado/Multi4'
git switch 'master'
git merge --squash 'therampagerado/Multi4'
git switch 'master'
git merge --ff-only 'therampagerado/Multi4'
git switch 'master'
git merge 'therampagerado/Multi4'
git push origin 'master'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-thirtybees/bankwire!7
No description provided.