This shop adapter can be used to connect your oxid shop with your storefront. This adapter is developed based on the oxid-connect plugin.
yarn install @makaira/storefront-types @makaira/storefront-shop-adapter-oxid
or
npm install @makaira/storefront-types @makaira/storefront-shop-adapter-oxid
import { StorefrontShopAdapterOxid } from '@makaira/storefront-shop-adapter-oxid'
const client = new StorefrontShopAdapterOxid({
url: '<OXID-API-BASE-URL>',
})
import { StorefrontShopAdapterOxid } from '@makaira/storefront-shop-adapter-oxid'
import { ShopProvider } from '@makaira/storefront-react'
const client = new StorefrontShopAdapterOxid({
url: '<OXID-API-BASE-URL>',
})
function Index() {
return (
<ShopProvider client={shopClient}>
<App />
</ShopProvider>
)
}
In addition if you are using typescript in your project and want to get the correct autosuggestion you have to create a new declaration file (e.g index.d.ts
) with the following content:
import '@makaira/storefront-react'
import { StorefrontShopAdapterOxid } from '@makaira/storefront-shop-adapter-oxid'
declare module '@makaira/storefront-react' {
interface StorefrontReactCustomClient {
client: StorefrontShopAdapterOxid
}
}
Argument | Required/Optional | Description | Type |
---|---|---|---|
url | required | The base api url to made requests again. | string |
Feature | Available |
---|---|
cart | |
- addItem | ✅ |
- getCart | ✅ |
- removeItem | ✅ |
- updateItem | ✅ |
review | |
- getReviews | ✅ |
- createReview | ✅ |
user | |
- login | ✅ |
- logout | ✅ |
- signup | ❌ |
- getUser | ✅ |
- forgotPassword | ❌ |
wishlist | |
- getWishlist | ❌ |
- addItem | ❌ |
- removeItem | ❌ |
No additional properties
No additional properties
No additional properties
No additional properties
No additional properties
No additional properties
No additional properties
Property | Required/Optional | Description | Type |
---|---|---|---|
rememberLogin | required | If the login should be remembered or should expire automatically after browser closing. | boolean |
No additional properties
Not implemented
Not implemented
Not implemented
Not implemented
Not implemented