• Ready for review
  • ProductsRenderer

    GitHub - magesuite/products-renderer

    The module provides an endpoint returning data (products) for the product carousel. In MageSuite the module is needed to display related products in the minicart offcanvas carousel. It can be also used to display product carousels based on external recommendation engines.

     

    Installation

    This module is required by theme-creativeshop

     

    Installation when theme-creativeshop is not used:

    composer require "creativestyle/magesuite-products-renderer" ^2.0.0

    Admin settings

    There is no admin setting for this module.

    Backend

    Add documentation for BE code

     

    Frontend

    in minicart-offcanvas.ts file the module is needed to provide related products data for the offcanvas carousel:

    /** * Defines endpoint url for fetching ProductsCarousel html * @default {'products_renderer/related/carousel/'} * @type {string} */ redererEndpoint?: string;
    /** * Sets URL for carousel endpoint * @return Resolved promise with URL for carousel endpoint */ protected _setEndpointUrl() { requirejs(['mage/url'], (mageUrl) => { mageUrl.setBaseUrl(window.BASE_URL); this._endpointUrl.resolve( mageUrl.build( `${this._productsCarouselOptions.redererEndpoint}` ) ); }); }

     

    Endpoint is also used in `magesuite-catalog-product-listing-compatibility module, in magesuite-catalog-product-listing-compatibility/view/frontend/web/js/product/list/listing-carousel-ext.js