GitHub

DaffMagentoUpsellProductsTransformers

import { DaffMagentoUpsellProductsTransformers } from '@daffodil/upsell-products/driver/magento'

Adds upsell product info to the product driver response.

@Injectable()
class DaffMagentoUpsellProductsTransformers {
  transformMagentoUpsellProducts(
    daffProductResponse: DaffProductDriverResponse<DaffProduct>
    magentoProduct: MagentoProductWithUpsell
    mediaUrl: string
  ): DaffProductDriverResponse
}

() Methods

transformMagentoUpsellProducts
DaffProductDriverResponse

Transforms magento upsell products with the product preview transform and stores those upsell products in the products array and nested in the main product.

Parameters
ParameterdaffProductResponse: DaffProductDriverResponse<DaffProduct>
Description
ParametermagentoProduct: MagentoProductWithUpsell
Description
ParametermediaUrl: string
Description