#somewolfy_code

1 messages ¡ Page 1 of 1 (latest)

peak daggerBOT
#

👋 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/1310795358015852625

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

steel sleet
#

hello! taking a look, gimme a while

#

I'm assuming that you're using Checkout Sessions?

#

If you're using Checkout Sessions, it is possible to do a cross sell, but you can only cross sell one product. If you want to offer multiple optional add-ons for products, you'll need to build that functionality into your own site so that the customer can select whatever they want. Then you create the Checkout Session with the selected products

red grotto
#

I am building the functionality of choosing those options into my own site. Im mostly wondering, how do I display those options as add-ons to a single product in the Checkout Session?

#

For exemple :
Product1
-Size : Large
-Color : Red
-Options : Grippy base

#

I already created different pricing for each size in the Dashboard

#

So I do have their PriceIds. Its adding those add-ons on top of that and make then appear as options onto one product thats concerning me

steel sleet
#

how do you want then to appear as options on one product? How do you envision them to look?

red grotto
#

Let me do a little mock up in paint

#

Kinda something like this for when you check out

#

I'll do another mock up for the page Im buidling

steel sleet
#

that's on your site though, how do you want it to look like in the Checkout Session?

red grotto
#

In the checkout session, Id like it to look like one product with options attached to it, not as a large mug item, a candy red item and a grippy base item

#

It's so it dosent look like 3 different items to the buyer. Just one with customised add-ons

steel sleet
#

ah, that's not going to be possible. The way I would do it would probably be to tack on a [Add on] to the product name so that it's more evident it's an add on

red grotto
#

Aaah okay that's a bit unfortunate. I'll try and figure out something to make sure the user is really aware of what they get when ordering then!

nova ore
#

hi

peak daggerBOT
#

@nova ore looks like you're in the wrong place, this thread is for someone else's question.

Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.

nova ore
#

api stripe with whmcs no work

#

#help api stripe with whmcs no work, before October it worked and now it doesn't work anymore, I've updated whmcs but it keeps giving an error when completing the payment

steel sleet
#

@nova ore again, this is someone else's thread / question. Please go to #help to start a new thread / question.

red grotto
#

I may have found a work around! I think I might be able to set a custom descrition to my priceId when creating a session :

 const session = await stripe.checkout.sessions.create({
    line_items: [
      {
        price: '{{PRICEID}}',
        quantity: 1,
        description: 'Custom description for the product',
      },
    ],
    mode: 'payment',
    success_url: `${YOUR_DOMAIN}/success.html`,
    cancel_url: `${YOUR_DOMAIN}/cancel.html`,
    automatic_tax: {enabled: true},
  })

  res.redirect(303, session.url);
});
steel sleet
red grotto
#

It seems that the stripe API does not allow that change anymore, tho. Is there some sort of work around so I could set the options in the description before opening the session?

steel sleet
red grotto
#

I would not mind that! In the end, all my data for my products is sent to me from stripe to my database so all my up to date prices are on there. Would that keep adding new products in my stripe dashboard at every purchase?

steel sleet
#

the inline product and prices will automatically be archived so it wouldn't clutter things up

#

i suggest trying it out in test mode, then you'll know how it works / looks