Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreapossidente/prestashop-nextjs13
https://github.com/andreapossidente/prestashop-nextjs13
contributions-welcome ecommerce next next-auth nextjs prestashop typescript
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/andreapossidente/prestashop-nextjs13
- Owner: AndreaPossidente
- Created: 2023-02-14T18:47:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-29T09:29:39.000Z (about 1 year ago)
- Last Synced: 2024-10-10T00:41:17.563Z (about 1 month ago)
- Topics: contributions-welcome, ecommerce, next, next-auth, nextjs, prestashop, typescript
- Language: TypeScript
- Homepage: https://prestashop-nextjs13.vercel.app
- Size: 521 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prestashop Next.js 13 Headless integration through Webservice API
The project is still in development, functionalities are missing and will be added soon
#### If you'd like to collaborate with the project contact me at [email protected]
Here is a preview of the project at current status
#### View Demo## Getting Started
1. Add the needed Environment Variables into **.env.local** file:
```
PS_URI=http://www.example.it
PS_API_KEY=THEPRESTASHOPWEBSERVICEKEY
```2. Install dependencies and start your server:
```
npm install
npm run dev
```## Models and API Calls
You can do api calls using models, here is an example:
```
import { Product } from "./Prestashop/models";export default async function ExampleComponent() {
// get the first 5 products from the webservice api
const products = await Product.find({}, { limit: 5 });
return ();
{products.map((product) => (
{product.name}
{product.price_normal}
{product.price_reduced}
))}
}
```
you can find a list of all models in prestashop 8 documentation:
https://devdocs.prestashop-project.org/8/webservice/resources/