#_liamm3

1 messages ยท Page 1 of 1 (latest)

twilit hornetBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

austere zealot
#

๐Ÿ‘‹ happy to help

#

would you mind elaborating on the use-case?

plucky flame
#

We only want to ship to a few selected countries. So we would like to restrict the options a customer can select.

austere zealot
#

I'm not sure it's possible

plucky flame
#

Thanks for the quick help! I tried adjusting my expressCheckoutElement.on('click', ...) but with no success. I still see a list of all countries. Am I doing something wrong?

        const expressCheckoutElement = elements.create("expressCheckout", expressCheckoutOptions);
        expressCheckoutElement.mount("#{{ id }}");
        expressCheckoutElement.on('click', (event) => {
            const options = {
                allowedShippingCountries: ['DE', 'AT', 'CH'],
                emailRequired: true,
                shippingAddressRequired: true,
                shippingRates: [
                    {
                        id: 'free-shipping',
                        label: 'Standard',
                        displayName: "Standard",
                        amount: 0,
                    },
                ],
            };
            event.resolve(options);
        });
austere zealot
#

you need to use the lower case version of the two letters

#

e.g. de instead of DE

plucky flame
#

Ah I see. Now it works :) Thanks a lot for the help!

austere zealot
#

let me know if you need any more help

plucky flame
#

Thanks, I am fine atm. I will reach out if i need more help. ๐Ÿ‘