Bundle data
Methods to work with Recharge bundles.
loadBundleData v1.48.0 Types
Get the entire bundle product configuration including products information.
The returned PublicBundleData includes an incentives field (Incentives or null) when the merchant has tiered discount incentives configured. That payload mirrors the tiered discount shapes described on Tiered discounts. To list or fetch tiered discounts directly for the logged-in customer via the Storefront API, use the methods on that page (listTieredDiscounts, getTieredDiscount).
- ESM
- UMD
import { loadBundleData } from '@rechargeapps/storefront-client';
const externalProductId = '7134322196677'; // Bundle's Shopify Product ID
const response = await loadBundleData(externalProductId, { source: 'online_store' });
// Load localized data - It will convert prices and other stuff to Canadian
const country = 'CA';
const externalProductId = '7134322196677'; // Bundle's Shopify Product ID
const response = await loadBundleData(externalProductId, { source: 'online_store', country_code: country });
const externalProductId = '7134322196677'; // Bundle's Shopify Product ID
const response = recharge.bundleData.loadBundleData(externalProductId, { source: 'online_store' });
// Load localized data - It will convert prices and other stuff to Canadian
const country = 'CA';
const externalProductId = '7134322196677'; // Bundle's Shopify Product ID
const response = recharge.bundleData.loadBundleData(externalProductId, { source: 'online_store', country_code: country });