Skip to content

Create/Update Commerce API documentation with Axios examples #307

Answered by AugustMiller
Stalex89 asked this question in Ideas
Discussion options

You must be logged in to vote

For anyone joining late—we've overhauled the Controller Actions page. In the process, we opted to purge library-specific examples from Craft and Commerce documentation, preferring to teach only concepts that apply to all requests (like how to work with CSRF, headers, etc.) in the context of the widely-supported fetch() API.

Cart management follows the same patterns, so any params sent via Twig examples can also be sent via Ajax as FormData or a JSON payload! The core principles (covered in the Ajax section) all apply to Craft 3.x and Commerce 3.x, as well.

I encourage everyone to review the new pages and let us know how you do with your headless applications! 💞

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@360adaptive001
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by AugustMiller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
📖 commerce Craft Commerce content related issue enhancement
4 participants
Converted from issue

This discussion was converted from issue #117 on December 21, 2021 11:20.