Using Math column for Price in Stripe buy button

Hello Everyone, : )

I’m trying to make a shop for users of my apps.
I try simple thing : Price x Quantity = Price appear in Buy button.
I try a Math column (stripe dont see it)
I try a template column (stripe dont see it)
i try a if then else column (stripe dont see it)

Where am i wrong ? :sleepy:

1 Like

The Buy Button only supports sheet columns right now.

1 Like

Create an array formula in the sheet to multiply price and quantity (make it user specific). Use that to get the sub-total.

Hey @Mark any plans to change this in the future?

1 Like

Oh, i see. So it’s impossible to set the quantity base on user choice.
It’s doable with google sheet formula, but it’s will be slow and the choice of one user will appear for every user.
Am I right ?

Yes, we want to fix this eventually.

5 Likes

How can you create a array formula in the sheet and make it user specific ? I was tinking that only column user specific create in glide can be ‘user specific’

You’re right.
Sorry about that.

Can you show me a screenshot of your worksheet on how you created this formula?

Hi Shannon, What’s your question ?
If it’s how to apply the formula : “quantity x Price” for individual user choice, unfortunately, it’s still impossible (to my knowledge).

But for doing it in your google sheet with and array formula, it’s very simple :

=ARRAYFORMULA(IFERROR(IF(I3:I="","",I3:I*J3:J)))
I3:I is your price for 1 item
J3:J is your quantity column.

and that’s it, you have your Total Price.

I send you sreenshot when i 100% understand your question ^^.
Good day ! :slight_smile:

OK, here is my situation and tell me if you can find a solution.

I have a food truck locator app with multiple food trucks that will allow for mobile ordering.I want users to be able to place mobile orders for food once they find a food truck of their choice. The problem I am having is the ‘Stripe’ buy button only has input for set items that I don’t necessarily need. I need to be able to have the mobile order place and be able to include the menu item name, menu description, price and any food prep instructions (ie no ketchup, pickles, extra cheese, etc.)

I have been told I can create a custom ‘shopping cart’ to solve this problem, but I have not been able to figure it out.

Just a short correction, it accept also user specific column, so not in the sheet.
I think is just a matter to open it to the other type… But maybe not so simple!

Hey @Mark

Given limitations with row owners and computed columns, I’m using a formula in a separate google sheet to calculate the price. Which I thought was ok.

However, because of the lag (~10 seconds) if the user changes something (in my case time duration), they can then click through to pay before the price has updated.

I tried an ‘if statement’ to check value matches the same calc done in a glide computed column before allowing them to proceed. However, even when it updates in gsheets and then the data editor (where the checks are made allowing them to proceed), there’s still a delay to the app and the user can click through to buy before the price is updated.

I can’t think of any other ways to get the correct amount. Any thoughts? Or any roadmap timelines or priorities on buy button functionality?

Thanks,
George

i got the same problem here, is there any solution for customer specific?

The only solution is to write the calculated value to a basic column. How you do that all depends on your app flow.

2 Likes

Alexandre and @Shannon_Joseph, I’m echoing @Jeff_Hager’s point. You have to take your calculated total and write it to a static column that Stripe will read.

For the first version of Glidecart I didn’t include Stripe for this very reason, it seemed near impossible to implement, but later found a flow that worked well to include Stripe as a payment.

How you structure your app will depend on your desired UX/UI. I’ve listed the rough outline of my flow in case it helps anyone with their app.

My Flow (very rough draft :sweat_smile:)

  • Users add their items to a “cart” table - this allows them to add as many items as they want to their cart. FYI all calculations and formulas are built off of THIS SHEET
  • Once users are ready to purchase, they are directed to “Checkout”. This action creates an order on the “Order” table. This action is the step that writes the cart’s total to a static column on the “Order” table. This will be the record we use for users to submit payment for.
  • Users are then directed to a forced screen to pay for their order using their method of choice.

5 Likes

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.