141 lines
3.7 KiB
YAML
141 lines
3.7 KiB
YAML
|
name: bigCommerceProducts
|
||
|
# This is just so its easier to reference BigCommerce products,
|
||
|
# its not intended to be used as a actual reference,
|
||
|
# just so its easier to reference products in TibiCMS
|
||
|
meta:
|
||
|
views:
|
||
|
- type: cardList
|
||
|
mediaQuery: "(min-width: 1200px)"
|
||
|
selectionPriority: 1
|
||
|
fields:
|
||
|
- source: previewImage
|
||
|
name:
|
||
|
de: Vorschaubild
|
||
|
en: Preview Image
|
||
|
- source: bigCommerceSKU
|
||
|
name:
|
||
|
de: BigCommerce SKU
|
||
|
en: BigCommerce SKU
|
||
|
|
||
|
- type: table
|
||
|
mediaQuery: "(min-width: 600px)"
|
||
|
columns:
|
||
|
- source: previewImage
|
||
|
- source: bigCommerceSKU
|
||
|
|
||
|
- type: simpleList
|
||
|
primaryText: previewImage
|
||
|
secondaryText: bigCommerceSKU
|
||
|
|
||
|
subNavigation:
|
||
|
- name: modal
|
||
|
views:
|
||
|
- type: table
|
||
|
columns:
|
||
|
- source: type
|
||
|
defaultCallback: # Standard-Callback-Funktion, die ausgeführt wird, wenn keine andere spezifiziert ist.
|
||
|
eval: | # Der Code wird als JavaScript evaluiert.
|
||
|
//js
|
||
|
(entry) => { // Diese Funktion nimmt den Eintrag (entry) als Argument.
|
||
|
parent.selectEntry(entry) // Die Funktion selectEntry auf dem übergeordneten Objekt wird mit dem Eintrag als Argument aufgerufen.
|
||
|
}
|
||
|
//!js
|
||
|
hooks:
|
||
|
post:
|
||
|
return:
|
||
|
#webhook
|
||
|
type: javascript
|
||
|
file: hooks/products/post_validate.js
|
||
|
|
||
|
permissions:
|
||
|
public:
|
||
|
methods:
|
||
|
get: false
|
||
|
post: false
|
||
|
put: false
|
||
|
delete: false
|
||
|
user:
|
||
|
methods:
|
||
|
get: true
|
||
|
post: false
|
||
|
put: false
|
||
|
delete: false
|
||
|
|
||
|
token:${BIGCOMMERCE_WEBHOOK_TOKEN}:
|
||
|
methods:
|
||
|
get: true
|
||
|
post: true
|
||
|
put: true
|
||
|
delete: true
|
||
|
|
||
|
fields:
|
||
|
- name: bigCommerceSKU
|
||
|
type: string
|
||
|
meta:
|
||
|
label:
|
||
|
de: BigCommerce SKU
|
||
|
en: BigCommerce SKU
|
||
|
helperText:
|
||
|
de: Die SKU des Produkts in BigCommerce
|
||
|
en: The SKU of the product in BigCommerce
|
||
|
|
||
|
- name: previewImage
|
||
|
type: file
|
||
|
meta:
|
||
|
label:
|
||
|
de: Vorschaubild
|
||
|
en: Preview Image
|
||
|
widget: image
|
||
|
|
||
|
- name: isBestseller
|
||
|
type: boolean
|
||
|
meta:
|
||
|
label:
|
||
|
de: Bestseller
|
||
|
en: Bestseller
|
||
|
containerProps:
|
||
|
layout:
|
||
|
size:
|
||
|
default: "col-6"
|
||
|
small: "col-12"
|
||
|
large: "col-6"
|
||
|
|
||
|
- name: isFeatured
|
||
|
type: boolean
|
||
|
meta:
|
||
|
label:
|
||
|
de: Empfohlen
|
||
|
en: Featured
|
||
|
containerProps:
|
||
|
layout:
|
||
|
size:
|
||
|
default: "col-6"
|
||
|
small: "col-12"
|
||
|
large: "col-6"
|
||
|
|
||
|
- name: isOnSale
|
||
|
type: boolean
|
||
|
meta:
|
||
|
label:
|
||
|
de: Im Angebot
|
||
|
en: On Sale
|
||
|
containerProps:
|
||
|
layout:
|
||
|
size:
|
||
|
default: "col-6"
|
||
|
small: "col-12"
|
||
|
large: "col-6"
|
||
|
|
||
|
- name: isNew
|
||
|
type: boolean
|
||
|
meta:
|
||
|
label:
|
||
|
de: Neu
|
||
|
en: New
|
||
|
containerProps:
|
||
|
layout:
|
||
|
size:
|
||
|
default: "col-6"
|
||
|
small: "col-12"
|
||
|
large: "col-6"
|