#Val-billing-portal

1 messages ยท Page 1 of 1 (latest)

raw widget
#

Hi there! Not a PHP developer but I don't believe you need the {} at all? I think it should just be ['product' => '?', 'prices' => '?']
Did you already try that?

outer dune
#

Hi @raw widget / thanks for your reply.

I did try that, as well, and just get an 'Invalid Array'

raw widget
#

Just to be clear, you are actually setting product IDs and price Ids as opposed to the ?

#

Do you have a request ID I can look at?

#

Ah, you are passing null for default_allowed_updates but this is a required field.

#

Also I might be incorrect and it may need [ ['product' => '?'], [ 'prices' => '?'] ]
since we allow for a list of price IDs

outer dune
#

For some odd reason, the 'default_allowed_updates' is not being passed

raw widget
#

If that is empty then the request won't fail, but updates won't be allowed.

#

You need to set it to one or all of price, quantity, promotion_code

outer dune
#

Yeah, looking at exactly that for the past few hours ๐Ÿ˜„

#

The thing is that, I am trying to dissallow updates (valid in certain cases, when the user has to remove a few things from their account, before being able to do so)

raw widget
#

Sorry I don't fully understand. Let's back up and maybe you can explain exactly what you are trying to do? If you don't want to allow for certain updates then you just don't include that update param in your configuration request

outer dune
#

Hmm. I probably have it all wrong.

Backstory: I am using the Customer Portal, however I need to turn off a few products from time to time so a user cannot downgrade (if they haven't done a few things beforehand)

raw widget
#

Got it. So yeah you should think of your default configuration as if no updates are possible. Then you build configs based on what you want to allow them to update.

#

Basically you don't want to build configs in order to stop them from updating... if you don't pass any of the params into the config then they can't update by default. Does that make sense?

outer dune
#

Yeah! Makes total sense. Ok back to the drawing board. Thanks for the discussion @raw widget. Appreciate the time you took to help me with this conundrum. ๐Ÿ™

raw widget
#

No problem! Feel free to come back here if we can help further.

outer dune
#

Thanks a ton. Will try to report back with the solution.

raw widget
#

Also @outer dune you can set default customer portal configs via your Dashboard so you can work with that too

#

Just making sure you are aware of that.

outer dune
#

I've done that yes. Have the 3 default products. My guess was trying to turn them off afterwards.

raw widget
#

Got it. Just making sure you realize that you can just create the custom configs with that default in mind.