Forum Academy Marketplace Showcase Pricing Features

Storing list of services and associated prices


I am building a two sided market place and wanted to get some tips on how to get unstuck with the following. I want to allow the sellers to input the name of their service(s) and the associated price. What would be the best approach for this? I was going to build a list of the names of the service and list with the price but I am having trouble getting my list save to the database. Any tips or advice would be helpful. Thank you in advance

1 Like

Hello :slight_smile: One way to set this up would be to create a new data type called “Service”. Within the Service data type could be two fields: “Name of Service” (Type: Text, List: No), and “Price” (Type: Text, List: No).

Then you can create a field within the User data type called “List of Services” (Type: Service, List: Yes).

This way, a User can create a new Service with inputs (Input Name of Service, Input Price of Service) and click ‘Add’. When the Add button is clicked, the workflow could be:
Data --> Create a New Thing --> Thing: Service, Fields to Change: [Name of Service = Input Name of Service’s value] and [Price = Input Price of Service’s value].

Then create a second action in the workflow which adds that Service to the User’s List of Services. The workflow could be:
Data --> Make Changes to a Thing --> Thing to Change: Current User --> Field to change: List of Services add (Result of Step 1… Create a New Service).

1 Like

I would have never thought of that thank you. I’m pretty new to Bubble what would you advise I do to get really good at this?

I have been taking more of a relational database approach to this - I would have a join table as suggested by @fayewatson but add a field for the seller to that. In this way, there’s no need to have a workflow add the item to the List of Services.

Comping from a database background this seems a better structure and easier to maintain and understand - I would be interested in feedback from others about this.

1 Like

I am also interested in this thread because I am in a similar situation so I appreciate you asking that shadsanders89.
The next step is how do we calculate the costs of goods or services provided by vendor so that we can then create and process the transaction? and also incorporate a calendar for the user to select times and days the vendor has in available, etc…

No problem :slight_smile: This thread has a lot of useful links from the community about how to learn Bubble:

1 Like

I am having a little bit of trouble with the second part. I am trying to take my list of services and put them into a list in the User table but no luck. Here is what my screen for this task looks

Can you share a link to your app in the editor?

Just shot it to you in a message

Ok great, for the Services that a User can provide, do you want every User to have 5 services or can some Users have less than 5 or some have more than 5?

I would like them to have more or less depending on their needs

Ok so only a few things to change. For the data structure, instead of having the Service data type contain many fields like this:

We can change this to:

In the above screenshot, each Service has a creator (a User), the Name of the Service, the Barber Shop where the Service is offered and the Price of the Service. Instead of storing the Barber Shop’s information within fields in the User, it’s its own data type because at some point your app may have more than one User linked to a Barber Shop. The Barber Shop data type looks like this:

So then we can delete these fields within the User:

I don’t want to make things super confusing with too many screenshots, or delete anything without you seeing what happened. So feel free to go through these and see the differences in the data structure; I labeled the fields that you won’t need anymore with “(to delete)”. Once that step is done I’ll be happy to help you set up the workflows to create a Service, and have them ‘linked’ to a Barbershop and a User. :slight_smile:

Ahh!!! Thank you so much this makes so much more sense to me now. I need to spend more time thinking about the database

Awesome! :blush: There are lots of helpful posts throughout the forum about structuring/querying data. I’m still learning the more efficient ways as well, but can try to assist if you get stuck at all.

1 Like