ThriftCampus / Multi-vendor commerce study / 2024
Taking cart prices from the catalogue.
ThriftCampus reads a product's price on the server while carrying selected variants and vendor details with the cart item.
- ROLE
- Laravel implementation / coursework
- STATE OF THE BUILD
- Study
- RECORD UPDATED
- PUBLIC SOURCE
- View on GitHub
THE WORK
The project.
In this multi-vendor Laravel coursework, adding a product to the cart starts with its catalogue record. The controller chooses its regular or discounted price rather than accepting a price from the request, then attaches colour, size and vendor choices as cart options. The wider model connects orders to customers and delivery regions. That gives the study a concrete cart and order structure without establishing a working payment or marketplace flow.
IMPLEMENTATION
Design choices.
- Selecting the price from the catalogue keeps that part of the cart calculation under server control. Prices and stock would still need checking when an order is placed.
- Variant and vendor choices stay in cart options. They describe this selection without rewriting the underlying product record.
- Category-first branching means a selected brand doesn't further narrow a category result. Combining both criteria would require adding both conditions to the product query.
HOW IT FITS TOGETHER
Architecture.
- The add-to-cart controller loads the product and selects its stored regular or discounted price. It passes that price and the requested quantity, variant and vendor options to the cart package.
- Order records relate to the customer and delivery-region hierarchy. Those relationships hold order context separately from the cart item's presentation fields.
- Customer, vendor and administrator route groups organize the storefront and management paths. The catalogue filter currently chooses a category branch first, otherwise a brand branch, rather than applying both together.
MADE WITH
PHP · Laravel 10 · Blade · Eloquent · Shoppingcart · Spatie permissions
ACCESS & INPUT
Security controls.
- The add action reads the price from the product record, not a submitted price field. Quantity, variant and vendor inputs still require their own validation; this price lookup isn't a complete checkout check.
CHECKS & RESULTS
What was checked.
A source review shows what the code does. It is not a fresh test of the running app.
Code and development records reviewedReviewed
The code, tests and available development records were checked. Reported test results keep their original scope. No fresh app or live deployment check was run for this write-up.
- Scope of this check
- Code review, not a fresh run of the app
NEXT
Still to work through.
The next work is combined filtering, request validation and tested payment and order transitions. Those paths weren't exercised in this review, so I describe ThriftCampus as coursework rather than a working marketplace.