#oleg.moseiko

1 messages ยท Page 1 of 1 (latest)

snow meadowBOT
ornate flame
#

Good question. I think you would want another item on the subscription that your user can adjust the quantity on. I am not sure if our pricing tables support multiple product subscriptions but will take a look

#

Does extra storage cost a different amount at each tier?

bronze lantern
#

i think yes

ornate flame
#

As far as I can see, pricing tables only support one product at a time at the moment. So with a pricing table you can have users subscribe to the base plans but the additional storage would have to be handled elsewhere

snow meadowBOT
ornate flame
#

If are open to creating the Checkout Sessions yourself, you can do this. You would create sessions with two items, one for the base plan and one with an adjustable quantity for the additional storage

bronze lantern
#

this solutin has issue

#

my business plan has min user quantity

#

i created config and pass it to session but in this case config has not option to set min quantity

#

but pricing table has this option

#

so to fix this issue support suggeste me not pass config to session

#

by the way i would like to have plans with option to add storage

#

for example for PRO PLAN it can be quantity option
1 TB = $10 | option to add $10? per 1TB

#

it is ok

#

but don't know how to do with BUSSINESS plan where quantity is users

ornate flame
#

And you can even make it so the user can switch between those specific base plans

#

But there isn't a way to restrict which additional storage price the user can use based on the base plan that they are using

#

So unfortunatley I think you would need to make your own custom page for managing the plans and quantities here

bronze lantern
#

ok i can create my custom page

#

but how to organize plans in stripe?

ornate flame
#

So you already have three products and price for the base plans, you'll also want to create three products and prices for additional storage at each tier.

bronze lantern
#

yes

#

and?))

ornate flame
#

What part of the price/product organization are you getting stuck on?

bronze lantern
#

i don't know how to add this feature to BUSINESS PLAN

#

where quantity is users count

ornate flame
bronze lantern
#

i check it but))

#

I don't understand what you mean

fringe gazelle
#

๐Ÿ‘‹ stepping in here

#

Give me a moment to catch up

bronze lantern
#

((

fringe gazelle
#

So when you create your Checkout Session based on your custom page you will need to enable adjustabel_quantity for the line item that you are allowing your customer to select additional storage.

bronze lantern
#

'line_items' => [
[
'price' => 'user_price',
'quantity' => 2,
],
[
'price' => 'storage_price',
'quantity' => 5,
],

],

#

???

fringe gazelle
#

Yep and adjust to: [ 'price' => 'storage_price', 'quantity' => 5, ], 'adjustable_quantity => [ 'enabled' => true] ]

bronze lantern
#

ok what will shop custom prtal in this case?

#

it will show 2 quantity inputs?

fringe gazelle
#

Not sure what you mean exactly?

#

You aren't using Customer Portal here.

#

You are creating the Checkout Session directly

bronze lantern
#

ah sorry

#

bt

#

i have users count and i need storage count

#

so i need have 2 price options?

#

'line_items' => [
[
'price' => 'user_price',
'quantity' => 2,
],
[
'price' => 'storage_price',
'quantity' => 5,
],
adjustable_quantity => [
'enabled' => true]
]
],

#

or?

fringe gazelle
#

Yep but you only want to enable adjustable quantity for the storage_price right?

bronze lantern
#

again

fringe gazelle
#

So it should be inside that hash

bronze lantern
#

user want to buy 10 users and 5 TB

#

can you write
$stripe->checkout->sessions->create([
????
]);

fringe gazelle
#

No I can't write out the entire code for you, sorry. Helping many folks at once.

#

All you need to do is add the adjustable_quantity param to the correct Price that you want to allow your customer to adjust

bronze lantern
#

$stripe->checkout->sessions->create([
....
'line_items' => [
[
'price' => 'user_price',
'quantity' => 10,
],
[
'price' => 'storage_price',
'quantity' => 5,
'adjustable_quantity' => [
'enabled' => true
]
]
],
],

....
]);

#

correct?

fringe gazelle
#

Yes that looks good to me

#

Try it out!

bronze lantern
#

but

#

if i did not add adjustable_quantity?