prestashop nextjs13
1.0.0
Das Projekt ist noch in der Entwicklung, Funktionen fehlen und werden in Kürze hinzugefügt
Hier finden Sie eine Vorschau des Projekts zum aktuellen Status
PS_URI=http://www.example.it
PS_API_KEY=THEPRESTASHOPWEBSERVICEKEY
npm install
npm run dev
Sie können API -Anrufe mit Modellen durchführen. Hier ist ein Beispiel:
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 (<div>
{products.map((product) => (
<div key={product.id}>
<div>{product.name}</div>
<div>{product.price_normal}</div>
<div>{product.price_reduced}</div>
</div>
))}
</div>);
}
Sie finden eine Liste aller Modelle in Prestashop 8 Dokumentation: https://devdocs.prestashop-project.org/8/webservice/resources/