Filament PHP

Hello Arturo @tuto1902 I finally have a case that seems very complicated to implement in a Filament project: I want to create a sales system with cart management in a multi-tenant Filament project. For example: the user logs into the panel and clicks on the sales tab. The system displays the order page. On this interface, there is a search bar where the user must enter the product name. The system displays products related to the entered word. Once the product is displayed, if it is in stock, it shows a field to set the quantity and a button to add it to the cart; otherwise, it hides the field and button. Once the products are added to the cart, the user should have a place on the page where the total amount to be paid is displayed and a button to confirm the order or to view the products in the cart to remove them, for example, from the cart. The system must handle all alternative and failure scenarios: such as setting a quantity greater than the stock, an alert should be displayed, and handle various errors that may occur in cart management. When the cart is validated, the system records the order and also decrements the stock. There is no payment management. If possible, could you help me with a simple case with a few Laravel models like Order, Product, Stock, and cart management with arrays and database transactions? Can you help me, please?
4 Replies
tuto1902
tuto19022mo ago
I've never built a sales system like this so I don't really have any cases to help you. I do have a suggestion. Don't limit yourself to use Filament. Although useful for admin panels in general, you need to also consider that, sometimes, limiting your toolbox can be a problem. Maybe using Livewire, or just plain old Laravel can be better. It all depends on the project requirements. My advise is to start with a small piece of the project and see if filaments fit the bill. The Orders & Products page sounds like a good starting point. Fortunately there's already a great example of this from the folks at Filament. Check out their demo and see if there's something you can take from it. https://demo.filamentphp.com/shop/orders https://github.com/filamentphp/demo
GitHub
GitHub - filamentphp/demo: Source code for the demo.filamentphp.com...
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
Dan-webplusm
Dan-webplusm2mo ago
You can do it with a select input on search mode, place the product in a repeater like that :
Rodriguechot
RodriguechotOP2mo ago
@Dan-webplusm Hello thank you so much. Can you give me more explanation please the video is very short
Dan-webplusm
Dan-webplusm2mo ago
explanation on what ? There are a lot of stuffs on that
Want results from more Discord servers?
Add your server