Type Alias: GetBundleInfo()
GetBundleInfo = () =>
Promise
<Nullable
<ParsedBundleSettingsResponse
>>
Function
Retrieves information about product bundling settings
Returns
Promise
<Nullable
<ParsedBundleSettingsResponse
>>
A promise resolving to the Bundle settings data if any is set on product
Example
//
const bundleData = await window.mimeeqApp.actions.getBundlingDebugInfo();
const logBundleData = () => {
Object.keys(bundleData).forEach((key) => {
console.group(key);
if (Array.isArray(bundleData[key])) {
console.log(`Array with ${bundleData[key].length} items`);
bundleData[key].forEach((item, index) => {
console.group(`[${index}]`);
console.log(item);
console.groupEnd();
});
} else if (typeof bundleData[key] === 'object' && data[key] !== null) {
Object.keys(bundleData[key]).forEach((subKey) => {
console.log(`${subKey}:`, bundleData[key][subKey]);
});
} else {
console.log(bundleData[key]);
}
console.groupEnd();
});
};
logBundleData();
//