prestashop nextjs13
1.0.0
โครงการยังอยู่ในระหว่างการพัฒนาฟังก์ชันหายไปและจะเพิ่มในไม่ช้า
นี่คือตัวอย่างของโครงการที่สถานะปัจจุบัน
PS_URI=http://www.example.it
PS_API_KEY=THEPRESTASHOPWEBSERVICEKEY
npm install
npm run dev
คุณสามารถโทร API โดยใช้โมเดลนี่คือตัวอย่าง:
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>);
}
คุณสามารถค้นหารายการของทุกรุ่นในเอกสาร Prestashop 8: https://devdocs.prestashop-project.org/8/webservice/resources/