TaylorWestDesign
Forum Replies Created
-
Actually I’m really needing the bank to act as the connected user’s “wallet” of sorts.
In other words — each user associated with the bank checks out (woocommerce) using the bank’s balance instead of their own. They can/will have a ZERO personal balance, but still checkout since the only balance that matters to them is the bank/admin’s balance.
Here is the practical use scenario — maybe this will help!
1. A Company buys 100 credits from us, and now has a 100 credit balance
2. The company signs up 10 sub-accounts for their employees, so that they can each login and purchase lunch from us.
3. Each employee account retains zero balance — but sees that the group’s account is funded with credits, and so can make a purchase
4. When an employee checks out with their lunch, it reduces the balance of the shared company account — and is reflected across the entire group of employees.Currently, we’re having to distribute credits evenly & manually among many employee accounts so each person can make purchases with us.
This is a headache on it’s own — but worse is that each employee spends differently… so to get a good report or picture of how many credits a company has spent and has remaining we have to take into account ALL of their employee accounts.
Gabriel,
Thank you for the code. Here’s what happened so far when using it:
The sub-user had 0 credits and the associated “bank” had 10000 to start.
When checking out with the sub-user’s account, it wouldn’t allow me to – giving the error “There is no payment method associated with your state”.
I then manually added 10 credits to the sub-user’s account in the user administration area. This deducted 10 credits from the user’s associated bank (now 9990).
I tried to checkout with the sub-user again, and succeeded — however, the credits used at checkout (1) were transferred back to the associated bank (now 9991).
I also tried checking out with the bank user, which was successful. The bank user doesn’t have a company_id either.
So in summary:
When “creating” credits for a user with a linked bank account, it removes those credits from the bank. (this is fine I suppose)A user cannot checkout using the bank’s balance. — this is a problem, as I need the bank to be available to the sub-user at checkout.
A user with his own credits transfers them to their associated bank user after checkout — this is a problem, as I need credits to disappear (like currency) after checkout.
Any thoughts?
Yes! That sounds about right.
I’m a bit of a hack when it comes to this type of customization. How long do you think something like this would take to set up?
Any chance you’d be up for developing it for me? Or writing a tutorial on how to accomplish it with specifics? I’d be willing to pay for the customization of course, but need it pretty soon for a product launch.