mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Custom attribute configuration
This commit is contained in:
parent
aa55b028c1
commit
8fc4ce1b9c
1 changed files with 29 additions and 0 deletions
|
|
@ -200,6 +200,34 @@ const stripeSupportedCountries = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Custom attributes are marketplace specific listing data (e.g. listing could have a category).
|
||||||
|
// Custom attributes can be defined through management console and code related to custom
|
||||||
|
// attributes should be changed accordingly.
|
||||||
|
//
|
||||||
|
// Here's an example what custom attributes might look like for bicycle listings. This code
|
||||||
|
// assumes that a custom attribute, called 'category', is created through management console
|
||||||
|
// with 4 possible values: 'road', 'mountain', 'track', and 'other'.
|
||||||
|
//
|
||||||
|
// When listing information is queried customAttributes is returned among other attributes:
|
||||||
|
// {
|
||||||
|
// id: 1,
|
||||||
|
// type: 'listing',
|
||||||
|
// attributes: {
|
||||||
|
// title: 'sauna',
|
||||||
|
// // and description, closed, deleted, price, etc.
|
||||||
|
// customAttributes: {
|
||||||
|
// category: "mountain",
|
||||||
|
// // and other added custom attributes as "key: value" pairs
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
const customAttributes = {
|
||||||
|
category: {
|
||||||
|
type: 'singleChoice', // possible values: 'singleChoice' (only type supported atm.)
|
||||||
|
values: ['road', 'mountain', 'track', 'other'],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// Address information is used in SEO schema for Organization (http://schema.org/PostalAddress)
|
// Address information is used in SEO schema for Organization (http://schema.org/PostalAddress)
|
||||||
const addressCountry = 'FI';
|
const addressCountry = 'FI';
|
||||||
const addressRegion = 'Helsinki';
|
const addressRegion = 'Helsinki';
|
||||||
|
|
@ -237,6 +265,7 @@ const config = {
|
||||||
sdk: { clientId: sdkClientId, baseUrl: sdkBaseUrl },
|
sdk: { clientId: sdkClientId, baseUrl: sdkBaseUrl },
|
||||||
currency,
|
currency,
|
||||||
currencyConfig,
|
currencyConfig,
|
||||||
|
customAttributes,
|
||||||
stripe: { publishableKey: stripePublishableKey, supportedCountries: stripeSupportedCountries },
|
stripe: { publishableKey: stripePublishableKey, supportedCountries: stripeSupportedCountries },
|
||||||
canonicalRootURL,
|
canonicalRootURL,
|
||||||
address: {
|
address: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue