Skip to content

Commit 8e92b60

Browse files
committed
Update and improve README
1 parent e1cb2ce commit 8e92b60

File tree

1 file changed

+64
-27
lines changed

1 file changed

+64
-27
lines changed

nuxt3/README.md

Lines changed: 64 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,79 @@
1-
# Nuxt 3 Minimal Starter
1+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1835e693354349ffaa703c0bbaf2b52b)](https://app.codacy.com/gh/w3bdesign/nuxtjs-woocommerce?utm_source=github.com&utm_medium=referral&utm_content=w3bdesign/nuxtjs-woocommerce&utm_campaign=Badge_Grade)
2+
[![CodeFactor](https://www.codefactor.io/repository/github/w3bdesign/nuxtjs-woocommerce/badge)](https://www.codefactor.io/repository/github/w3bdesign/nuxtjs-woocommerce)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=w3bdesign_nuxtjs-woocommerce&metric=alert_status)](https://sonarcloud.io/dashboard?id=w3bdesign_nuxtjs-woocommerce)
24

3-
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
5+
# Nuxt 3 Ecommerce site with WooCommerce backend
46

5-
## Setup
7+
<img src="https://user-images.githubusercontent.com/45217974/106988377-f129a080-676f-11eb-94b9-a44c86ea6c79.png" alt="Project screenshot" />
68

7-
Make sure to install the dependencies:
9+
## Table Of Contents (TOC)
810

9-
```bash
10-
# yarn
11-
yarn install
11+
- [Features](#Features)
12+
- [Installation](#Installation)
13+
- [Troubleshooting](#Troubleshooting)
14+
- [TODO](#TODO)
1215

13-
# npm
14-
npm install
16+
## Features
1517

16-
# pnpm
17-
pnpm install
18-
```
18+
- Nuxt 3
19+
- Tailwind CSS
20+
- Nuxt Apollo
21+
- Responsive design
22+
- Support for simple and variable products
23+
- CSS animations and transitions
24+
- Form handling and validation with Formkit, Vee Validate and Yup
25+
- Checkout process
26+
- Animated mobile menu
1927

20-
## Development Server
28+
## Installation
2129

22-
Start the development server on http://localhost:3000
30+
1. Install and activate the following required plugins, in your WordPress plugin directory:
2331

24-
```bash
25-
npm run dev
26-
```
32+
- [woocommerce](https://wordpress.org/plugins/woocommerce) Ecommerce for WordPress.
33+
- [wp-graphql](https://wordpress.org/plugins/wp-graphql) Exposes GraphQL for WordPress.
34+
- [wp-graphql-woocommerce](https://github.com/wp-graphql/wp-graphql-woocommerce) Adds WooCommerce functionality to a WPGraphQL schema. Currently only confirmed to be working with version 0.61 of this plugin.
35+
- [algolia-woo-indexer](https://github.com/w3bdesign/algolia-woo-indexer) Sends WooCommerce products to Algolia. Required for search to work.
2736

28-
## Production
37+
Optional plugin:
2938

30-
Build the application for production:
39+
- [headless-wordpress](https://github.com/w3bdesign/headless-wp) Disables the frontend so only the backend is accessible.
40+
- [wp-graphql-cors](https://github.com/funkhaus/wp-graphql-cors) Ensures that CORS works correctly. Remember to add the domain to the store under `Extend "Access-Control-Allow-Origin” header`
3141

32-
```bash
33-
npm run build
34-
```
42+
The current release has been tested and is confirmed working with the following plugin versions:
3543

36-
Locally preview production build:
44+
- WordPress version 6.1.1
45+
- WooCommerce version 7.1.0
46+
- WP GraphQL version 1.5.0
47+
- WooGraphQL version 0.6.2
3748

38-
```bash
39-
npm run preview
40-
```
49+
2. Make sure WooCommerce has some products already or import some sample products
4150

42-
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
51+
The WooCommerce sample products CSV file is available at `wp-content/plugins/woocommerce/sample-data/sample_products.csv` or [Sample products](sample_products/)
52+
53+
Import the products at `WP Dashboard > Tools > Import > WooCommerce products(CSV)`
54+
55+
3. Clone or fork the repo and modify `.env` with the URL to the GraphQL endpoint (or set environment variables in the configuration UI for your deployment solution)
56+
57+
4. Start the server with `npm run dev`
58+
59+
5. Enable COD (Cash On Demand) payment method in WooCommerce
60+
61+
6. Add a product to the cart
62+
63+
7. Proceed to checkout
64+
65+
8. Fill in your details and place the order
66+
67+
## Troubleshooting
68+
69+
### I am getting a cart undefined error or other GraphQL errors
70+
71+
Check that you are using the 0.6.2 version of the [wp-graphql-woocommerce](https://github.com/wp-graphql/wp-graphql-woocommerce) plugin
72+
73+
### The products page isn't loading
74+
75+
Check the attributes of the products. Right now the application requires Size and Color.
76+
77+
## TODO
78+
79+
- Refactor and improve codebase with reusable components

0 commit comments

Comments
 (0)