A React-based BigCommerce checkout extension that displays recommended products to customers during the checkout process, helping increase average order value through strategic upselling.
- Smart Product Recommendations: Displays relevant upsell products during checkout
- Seamless Integration: Built specifically for BigCommerce checkout extensions
- Real-time Cart Updates: Adds products directly to the cart without page refresh
- Loading States: Smooth user experience with loading indicators and skeleton screens
- Responsive Design: Modern UI built with Tailwind CSS
- TypeScript Support: Full type safety and better developer experience
- Frontend: React 19, TypeScript
- Styling: Tailwind CSS 4.x
- Build Tool: Vite
- HTTP Client: Axios
- Platform: BigCommerce Checkout Extensions
- Node.js (v22)
- npm or yarn
- BigCommerce store with checkout extension capabilities
- Access to BigCommerce Developer Tools
-
Clone the repository
git clone <repository-url> cd upsell-extension
-
Install dependencies
npm install
npm run devThis will start the Vite development server. The extension will be available for testing in your BigCommerce checkout environment.
npm run buildnpm run previewsrc/
├── components/ # React components
│ ├── ProductItem.tsx # Individual product display
│ ├── Products.tsx # Product list container
│ ├── ProductLoadingSkeleton.tsx # Loading state
│ └── index.ts # Component exports
├── context/ # React context providers
│ └── ExtensionContext.tsx # BigCommerce extension context
├── service/ # API and business logic
│ ├── api/ # API calls
│ │ ├── getProduct.ts # Fetch product data
│ │ └── updateCart.ts # Add products to cart
│ ├── application/ # Application services
│ │ └── ExtensionService.ts # BigCommerce extension service
│ └── index.ts # Service exports
├── App.tsx # Main application component
├── main.tsx # Application entry point
└── index.css # Global styles
This extension integrates with BigCommerce's checkout extension framework:
- Extension Service: Handles communication with the BigCommerce checkout
- Cart Management: Adds products to the existing cart
- Loading Indicators: Shows loading states during cart updates
- Checkout Reload: Refreshes checkout data after cart modifications
- Extension Initialization: Automatically connects to BigCommerce checkout
- Cart ID Management: Retrieves and uses the current cart ID
- Product Addition: Seamlessly adds upsell products to the cart
- UI Feedback: Provides immediate feedback on user actions
The extension uses Tailwind CSS for styling. You can customize the appearance by:
- Modifying the Tailwind configuration in
tailwind.config.cjs - Updating component styles in the respective
.tsxfiles - Adding custom CSS in
src/index.css
Product recommendations are fetched from a Cloudflare Worker endpoint. To customize:
- Update the API endpoint in
src/service/api/getProduct.ts - Modify the product interface in
src/components/ProductItem.tsx - Adjust the product display logic as needed
-
Build the extension
npm run build
-
Upload to BigCommerce
- Package the
distfolder contents - Upload through BigCommerce Developer Tools
- Configure extension settings in your store
- Package the
-
Test in Checkout
- Enable the extension in your store settings
- Test the checkout flow with the upsell functionality
The extension should be tested in the BigCommerce checkout environment:
- Local Testing: Use the development server with BigCommerce's extension testing tools
- Staging: Deploy to a staging environment for comprehensive testing
- Production: Thoroughly test before enabling in production
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
For support and questions:
- Check the BigCommerce Extension documentation
- Review the codebase and comments
- Create an issue in this repository
- v1.0.0: Initial release with basic upsell functionality