Skip to main content

State

PropertyDescription
productSubscribe to the product data available on PDP page
product.selectedArticleSubscribe to the price of a product size at all the selling locations
product.variantsSubscribe to all the available variants of a specific product identified by its slug.
product.metaSubscribe to the detailed information about a product, including its availability (sellable), available sizes with quantities, dimensions, weight, availability status, price details (marked, effective, selling), minimum order quantity (MOQ).
userSubscribe to get the user data
global.supportSubscribe to get contact details of the sales channel.
global.appFeatureSubscribe to get the features of the sales channel.
global.contactInfoSubscribe to get the contact information
global.locationSubscribe to get the location
global.countrySubscribe to get the country
global.defaultCurrencySubscribe to get the default currency
global.tokenDetailSubscribe to get the integration token of the sales channel
theme.globalConfigSubscribe to get the theme global configuration applied in the theme editor
theme.activeGlobalConfigSubscribe to get the active global configuration of the theme
products.wishlistIdsSubscribe to get the wishlist product ids

Example

FPI.state.product.subscribe((data) => {
console.log(data)
});
FPI.state.product.meta.subscribe((data) => {
console.log(data)
});
FPI.state.product.selectedArticle.subscribe((data) => {
console.log(data)
});
FPI.state.product.variants.subscribe((data) => {
console.log(data)
});
FPI.state.user.subscribe((data) => {
console.log(data)
});
FPI.state.global.support.subscribe((data) => {
console.log(data)
});
FPI.state.global.appFeature.subscribe((data) => {
console.log(data)
});
FPI.state.global.contactInfo.subscribe((data) => {
console.log(data)
});
FPI.state.global.location.subscribe((data) => {
console.log(data)
});
FPI.state.global.country.subscribe((data) => {
console.log(data)
});
FPI.state.global.defaultCurrency.subscribe((data) => {
console.log(data)
});
FPI.state.global.tokenDetail.subscribe((data) => {
console.log(data)
});
FPI.state.theme.globalConfig.subscribe((data) => {
console.log(data)
});
FPI.state.theme.activeGlobalConfig.subscribe((data) => {
console.log(data)
});
FPI.state.products.wishlistIds.subscribe((data) => {
console.log(data)
});

Was this section helpful?