Skip to content
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

Open
seanheartmath opened this issue May 25, 2023 · 4 comments

Comments

@seanheartmath
Copy link

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

Screen Shot 2023-05-24 at 5 35 53 PM

@seanheartmath
Copy link
Author

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:

quantity: 1, product_id: 1322, list_price: 240, name: "Subscription:Stripe Test 2"

POST to /api/cart/CART_HASH immediately after:

list_price: 240, name: "Subscription:Stripe Test 2 :price_1NBR5oGn0p4ZokFkppsHWijG", product_id: 1322, quantity: 1

I think this formatting on the subsequent POST request:

name: "Subscription:Stripe Test 2 :price_1NBR5oGn0p4ZokFkppsHWijG"

Should be:

name: "Subscription:Stripe Test 2", price: "_1NBR5oGn0p4ZokFkppsHWijG"

or

name: {Subscription: "Stripe Test 2"}, price: "_1NBR5oGn0p4ZokFkppsHWijG"

@becomevocal
Copy link
Collaborator

@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!

@seanheartmath
Copy link
Author

seanheartmath commented Jun 6, 2023 via email

@becomevocal
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants