-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Products added to subscription channel printing a price string and hash #34
Comments
This could be an issue with a missing comma or a timing issue. When I click 'Subscribe' on the PDP, this is what I observe in browser network logging: POST to the BC endpoint when the Cart is created:
POST to /api/cart/CART_HASH immediately after:
I think this formatting on the subsequent POST request:
Should be:
or
|
@seanheartmath we we initially developed the app, this was done because Cart Metafields weren't broadly available. Now they are: https://developer.bigcommerce.com/docs/rest-management/carts/metafields To do this, high level:
Does that seem like something you'd be interested in contributing back to the codebase? We set up some time to dive into the details if you need more info! |
Hi Nate,
Thanks for the info, that makes sense. I am interested in contributing to the project, I’m a little busy this week but I’ll look at the fixes you proposed and start thinking about implementing a potential fix on my side. I’d be happy to meet and discuss in detail with you sometime next week when you have availability.
Thanks,
Sean Callahan
Senior Web Developer, HeartMath<https://www.heartmath.com/>
From: Nate Stewart ***@***.***>
Reply-To: bigcommerce/subscription-foundation ***@***.***>
Date: Monday, June 5, 2023 at 8:16 PM
To: bigcommerce/subscription-foundation ***@***.***>
Cc: Sean Callahan ***@***.***>, Mention ***@***.***>
Subject: Re: [bigcommerce/subscription-foundation] Products added to subscription channel printing a price string and hash (Issue #34)
@seanheartmath<https://github.com/seanheartmath> we we initially developed the app, this was done because Cart Metafields weren't broadly available. Now they are: https://developer.bigcommerce.com/docs/rest-management/carts/metafields<https://developer.bigcommerce.com/docs/rest-management/carts/metafields>
To do this, high level:
* The Cart API needs to be extended with new metafield add / update methods: https://github.com/bigcommerce/subscription-foundation/blob/main/backend/services/bigcommerce/cart/index.ts<https://github.com/bigcommerce/subscription-foundation/blob/main/backend/services/bigcommerce/cart/index.ts>
* The Cart POST / PUT handlers need to be updated to also add / update a Cart Metafield to store the Stripe Price ID for the item: https://github.com/bigcommerce/subscription-foundation/blob/main/src/pages/api/cart/[...uri].ts#L46<https://github.com/bigcommerce/subscription-foundation/blob/main/src/pages/api/cart/%5B...uri%5D.ts#L46>
* The webhook listener needs to be changed to read the cart_id on the order, fetch the Cart Metafields and use that info to determine the Stripe Price ID, instead of parsing the product name to find it: https://github.com/bigcommerce/subscription-foundation/blob/main/src/pages/api/webhooks/index.ts#L98<https://github.com/bigcommerce/subscription-foundation/blob/main/src/pages/api/webhooks/index.ts#L98>
Does that seem like something you'd be interested in contributing back to the codebase? We set up some time to dive into the details if you need more info!
—
Reply to this email directly, view it on GitHub<#34 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXO6MLFXTIQCBHRNYY3WUQ3XJ2OKJANCNFSM6AAAAAAYODA224>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@seanheartmath alright, let's meet up to discuss this then! Shoot me some times to my bigcommerce.com address (nate.stewart) that work for you next week and I'll send over an invite. |
Every product I add to the subscriptions channel prints out extraneous data when added to the cart such as :
Subscription:Stripe Test 2 :price_1NBR5oGn0p4ZokFkppsHWijG
The text was updated successfully, but these errors were encountered: