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

Custom methods and cart update #6832

Open
1 task done
Annetastar opened this issue Nov 16, 2022 · 0 comments
Open
1 task done

Custom methods and cart update #6832

Annetastar opened this issue Nov 16, 2022 · 0 comments

Comments

@Annetastar
Copy link

What is your question / Please describe your issue

Hello! We got a problem. On the project, we use the Recharge plugin in Shopify to create subscriptions.

Question one. We can write a custom method to get the sellingPlan for a product. However, I noticed that custom methods are only called in setup (onSSR). Can we call them, for example, by clicking on a button, and not when the page is first loaded?

Question two. We need a custom cart update method to push to a sellingPlan product to subscribe. If we use the custom method, will the cart update automatically or not? I know that the cart only changes state when using built-in hooks like addItem(), and we can't call the cart a second time ourselves. Thank you!

What version of Vue Storefront are you using?

2.3.4

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

1 participant