Skip to content

Conversation

@pbennett1-godaddy
Copy link
Contributor

Summary

This PR implements comprehensive shopping cart functionality for the storefront, including cart mutations, component updates, and UI enhancements.

Key Changes

Cart Mutations & API Integration

  • Added cart mutations for creating, updating, and managing cart operations (orders-storefront-mutations.ts)
  • Implemented cart queries for fetching and syncing cart state (orders-storefront-queries.ts)
  • Added local cart storage utilities for persisting cart data (cart-storage.ts)
  • Updated catalog and order schema to support new cart endpoints

React Components

  • Cart Component: Enhanced with full CRUD operations, cart item management, and checkout redirect
  • Product Card: Added add-to-cart functionality with multi-variant support
  • Product Details: Integrated cart operations with SKU selection
  • Product Grid: Added first SKU selection for multi-variant products
  • Line Items: Updated to handle currency formatting for major units
  • Implemented useAddToCart hook for reusable cart logic

Localization

  • Added storefront-specific translations across all supported locales (25+ languages)
  • Includes translations for cart actions: add to cart, remove from cart, view cart, checkout, etc.

Provider Updates

  • Added channelId to GoDaddy provider configuration
  • Updated catalog and orders storefront environment configurations

Bug Fixes

  • Fixed first SKU lookup for multi-variant products
  • Fixed currency formatting to handle major units properly
  • Changed cart operations to use product id instead of sku

Changeset

  • Changeset added (docs)

Test Plan

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2025

🦋 Changeset detected

Latest commit: b097886

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@godaddy/react Patch
nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wcole1-godaddy wcole1-godaddy merged commit c484494 into main Nov 21, 2025
3 checks passed
@wcole1-godaddy wcole1-godaddy deleted the cart-components-and-mutations branch November 21, 2025 04:15
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

Successfully merging this pull request may close these issues.

3 participants