Home > widget-integration > CombinedProductListingsController > resolveVariantFromParentProduct
CombinedProductListingsController.resolveVariantFromParentProduct() method
Signature:
resolveVariantFromParentProduct(currentVariantId: string | number, product: Record<string, unknown> | null, fetchProductData: (productId: string | number) => Promise<unknown>, getVariantById: (variantId: string | number) => PreOrderVariant | null, getCurrentSelectedParentVariant: () => PreOrderVariant | null): Promise<PreOrderVariant | null>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
currentVariantId |
string | number | |
|
product |
Record<string, unknown> | null | |
|
fetchProductData |
(productId: string | number) => Promise<unknown> | |
|
getVariantById |
(variantId: string | number) => PreOrderVariant | null | |
|
getCurrentSelectedParentVariant |
() => PreOrderVariant | null |
Returns:
Promise<PreOrderVariant | null>