enupal / stripe

Allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS
https://enupal.com/craft-plugins/stripe-payments/
Other
33 stars 19 forks source link

Unable to change the quantity of a product in twig #361

Closed tomfischerNL closed 11 months ago

tomfischerNL commented 1 year ago

Description

Hi @andrelopez,

My client has the option to add multiple persons to a payment (i.e. "For how many persons do you want to pay"). So I need the paymentForm quantity to be adjustable. But I cant change the quantity after initializing the form. Even not when I'm adding the adjustable quantity.

Can you let me know how I can do this?

{% set paymentOptions = {
    checkoutSuccessUrl: currentUrl ~ '/thanks?o={number}',
    checkoutCancelUrl: currentUrl ~ '?a=canceled',
        removeDefaultItem: true,
            lineItems : [
                {
                    "price": entry.stripePriceId,
                    "quantity": 1,
                    "adjustable_quantity": {
                        "enabled": true,
                        "minimum": 1,
                        "maximum": 10
                    }
                }
            ]
    } 
%}
{{ craft.enupalStripe.paymentForm('form', paymentOptions) }}

Thanks! :)

Additional info

andrelopez commented 1 year ago

Hi @tomfischerNL

I was unable to recreate your issue. Are you able to see the qty dropdown?

Screenshot 2023-08-02 at 7 24 32 pm
andrelopez commented 11 months ago

closing for now, feel free to re-open