Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://github.com/magesuite/catalog-product-listing-compatibility

This module It allows using MageSuite product carousel as a template for "Recently viewed products" and "Recently compared products" widgets. It aligns displaying products to the other parts of the shop, using MageSuite's carousel and product tile.

...

Code Block
composer require "creativestyle/magesuite-catalog-product-bulklisting-goodscompatibility" ^2^1.0.0

Admin settings

Admin settings for the module are placed in Stores -> Configuration -> MageSuite -> Bulk Goods

Image Removed

Settings:

...

Setting name

...

Value

...

Comment

...

Is enabled

...

 Yes/No 

...

Label

...

string

...

This text will be displayed in the totals section.

...

Fee

...

number

...

This value will be added to totals, if any bulk good is in the cart.

...

Is Free shipping

...

 Yes/No 

...

Bulk goods fee will not be added if shipping is free.

If the bulk goods module is enabled, products can be marked as bulk goods in their product form:

...

Backend

Note

Add documentation for BE code

Frontend

Bul good fee is visible on the cart and checkout page:

...

The bulk goods fee is displayed getPureValue is higher than 0

...

There are no admin settings, the module is active by default.

Backend

There are no backend functionalities in the module.

Frontend

The module changes the path of Magento_Catalog/template/product/list/listing.html to the module's one MageSuite_CatalogProductListingCompatibility/template/product/list/listing.html.

It adds an additional condition to the html template to check if displayAsMagesuiteCarousel is set to true and if carouselMarkup is ready.

Code Block
<!-- ko if: displayAsMagesuiteCarousel && carouselMarkup -->
    <div data-bind="html: carouselMarkup"></div>
<!-- /ko -->

The default value of displayAsMagesuiteCarousel is in the mixin false, however, true value can be passed in a widget phtml template:

Code Block
<?php /* @noEscape */ echo $block->renderApp([
    'widget_columns' => [
        'displayMode' => 'grid',
        'displayAsMagesuiteCarousel' => true
    ],
    'image' => [
        'imageCode' => 'recently_viewed_products_grid_content_widget'
    ]
]);

The module provides a mixin to the product listing UI component, allowing usage of the carousel instead of the default view.

carouselMarkup is fetched from magesuiteCarouselRendererEndpoint ('/products_renderer/recommendation/carousel/') based on productIds array. The response from the server is expected to contain HTML markup for MageSuite carousel, which is passed to the carouselMarkup observable, and then mage.apply is called.