🚚 FREE SHIPPING on all e-store orders! 

Click here to see all our spring savings

Craft Commerce Integration Demo

Authentication

Login

Don't have an account? Register

User Account

Account Information

Personal details and preferences.

You are not logged in

Please log in to view your account information.

Shopping Cart

Your cart is empty

Start shopping to add items to your cart.

Implementation Notes

This demo page showcases the integration of the Craft Commerce Headless SDK with Nuxt 3. The SDK provides native session-based authentication and cart management, which is more compatible with Craft Commerce than the previous GraphQL Authentication plugin approach.

Key Components:

  • Authentication - Uses native Craft CMS session-based authentication
  • Cart Management - Leverages the Craft Commerce cart controller actions
  • User Management - Provides profile management with the native Craft user controller

Implementation Details:

  • The SDK is initialized in plugins/craft-commerce-sdk.ts
  • Authentication logic is in composables/useCraftCommerceAuth.ts
  • Cart functionality is in composables/useCraftCommerceCart.ts
  • Payment handling is in composables/useCraftCommercePayment.ts

This implementation works alongside the existing GraphQL Authentication system, allowing for a gradual transition to the new approach.