-
Notifications
You must be signed in to change notification settings - Fork 4
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
Target [Vanilo\Checkout\Contracts\CheckoutDataFactory] is not instantiable while building [Vanilo\Checkout\CheckoutManager]. #1
Comments
I'll look into it once I'm back to my computer. In the meantime could you please post here:
|
Don't look further, I got it. The checkout data factory is the logic how you bind all your data (address, customer, products/cart items) in your application. Since the checkout module is not aware of how you exactly implement addresses, billpayers, etc in your app, there's no default implementation. What you can do is to take this class as a base example: https://github.com/vanilophp/framework/blob/master/src/Factories/CheckoutDataFactory.php "copy" it in your application and adopt to your needs (obviously with changing the namespace, etc) Also, you have to register the binding in your $this->app->bind(
Vanilo\Checkout\Contracts\CheckoutDataFactory::class,
App\CheckoutDataFactory::class //or whatever namespace you'll use
); Ps.: I see the gap here in the documentation, let's keep this issue open until the documentation has been extended with this Information. |
Hi @fulopattila122 thank you for the response! These are my concord models:
I see that Checkout model does not present in a table, but I don't understand why...
When I ran Checkout::getFacadeRoot() I got -
But when I ran Cart::getFacadeRoot() I got correct instance -
And for understanding a problem I installed a full demo store from https://github.com/vanilophp/demo/.
When I ran Checkout::getFacadeRoot() I got correct instance-
I don't know what I am doing incorrectly( |
Checkout has no table, so that's normal. Did you check my second comment? I think that'll be the solution for your issue. |
Having the same problem and the second comment doesn't fix. |
@imknight Can you please post here the output of:
|
i fixed it with create a new checkoutDataFactory class that extend the CheckoutDataFactory contracts |
Hi, guys! I need help(
I am using another modules from vaniloshop (product and card) and it's ok. But with Checkout module I have some problem.
I try to use Checkout module (as a facade, as service and as a container) but I always obtain an error -
There is my config/concord.php
Laravel Framework 5.8.26
vanilo/checkout 0.5.1
Can anyone help me please?
The text was updated successfully, but these errors were encountered: