Home > widget-integration > RecommendationWidgetController > extractProductIdFromHref
RecommendationWidgetController.extractProductIdFromHref() method
Extracts product handle from product URL href.
Signature:
protected extractProductIdFromHref(href: string | null): string | null;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
href |
string | null |
The product URL (e.g., "/products/bronze-choker") |
Returns:
string | null
Product handle or null if not found