Rodriguechot
TLCTuto's Laravel Corner
•Created by Rodriguechot on 10/24/2024 in #💡filament
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?
6 replies