© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
ianclemence

Calculating Total Price from Repeater Data

Hey, everyone! I'm currently tackling a challenge with filament forms involving
orders
orders
and
products
products
tables.

Here's the scoop: I'm using a repeater to select multiple
products
products
when creating an
order
order
, and the data gets saved in an
order_items
order_items
table. My
Order
Order
model has a method
items()
items()
for the relationship, all good so far.

Now, the tricky part is calculating a
total_price
total_price
for the
order
order
based on the sum of
unit_price
unit_price
for all selected
products
products
multiplied by their respective quantities. I want to save this
total_price
total_price
in the
orders
orders
table.

Although
order_items
order_items
are saving correctly, the
total_price
total_price
isn't making it to the database when saving the order to the
orders
orders
table. Any tips on handling this or integrating repeater data with the relationship for accurate calculations? Thanks!
prob_1.jpg
prob_2.jpg
prob_3.jpg
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Get overall total from outside repeater
FilamentFFilament / ❓┊help
3y ago
issue with updating total price
FilamentFFilament / ❓┊help
3y ago
Repeater get data from form
FilamentFFilament / ❓┊help
17mo ago