#wagamumma_best-practices

1 messages ยท Page 1 of 1 (latest)

vagrant timberBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1369248996387983392

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

silent dock
#

shippingRates: [
{
id: 'free-shipping',
displayName: 'Free shipping',
amount: 0,
deliveryEstimate: {
maximum: {unit: 'day', value: 7},
minimum: {unit: 'day', value: 5}
}

lone iron
#

๐Ÿ‘‹ happy to help

silent dock
#

id: 'free-shipping', for example if I add more shipping options do I just make up ID's or are they all added in dashboard first?

lone iron
#

the ID is something you can configure

#

it doesn't have to be created in the dashboard first

silent dock
#

ok so I can just use anything in the code and it'll just work without touching the dashboard side?

lone iron
#

yes

vagrant timberBOT
unique cave
#

hi! I'm taking over this thread. let me know if you have other questions.

silent dock
#

hi I have added a test shipping rate which is not free, it displays correctly but the actual total displayed doesn't seem to be adding it on, how would this work please?

#

(the cart total without shipping was ยฃ50.00 so this should be ยฃ55.99 now(

unique cave
#

can you share your frontend code that steps this up?

silent dock
#

shippingRatesArr=[
{
id: 'standard-shipping',
displayName: 'Standard shipping',
amount: 599,
deliveryEstimate: {
maximum: {unit: 'day', value: 7},
minimum: {unit: 'day', value: 5}
}
},
]

#

const optionsExpress = {
shippingAddressRequired: true,
allowedShippingCountries: ['GB'],
shippingRates:shippingRatesArr,
emailRequired: true,
phoneNumberRequired: true,
};

#

this?

#

// Set up Stripe.js and Elements to use in checkout form.
const elements = stripe.elements(options);

    // Create and mount the Express Checkout Element
    const expressCheckoutElement = elements.create('expressCheckout',optionsExpress);
unique cave
#

thanks! and do you have a URL where I can reproduce the issue?

silent dock
#

then you'd need to go to this link (it just activates a session to show the express checkout as it's all in testing still

#

you should see the google pay button then

unique cave
#

yep I managed to reproduce the issue on your website. looking into this

silent dock
#

thanks ๐Ÿ‘

unique cave
#

can you try removing allowedShippingCountries: ['GB'], for now, to see if that changes anything?

silent dock
#

I see but what if this is the only option? they dont really need to change the rate in that instance?

unique cave
#

agreed, but you still need to do this step for it work properly

silent dock
#

so does it listen for a change on first load as well then? I dont really understand how it'd ever call the function if they dont change anything so the price would never update

unique cave
#

I'm not super familiar with this myself. can you try to follow what the docs suggest? and if it doesn't fix the issue, I'll look into it more deeply.

silent dock
#

ok not a problem I will try now thanks