PerformanceProduct
https://github.com/magesuite/performance-product
A module that collects performance improvements for products.
- 1 Installation
- 2 Admin settings
- 3 Backend
- 4 Frontend
- 4.1 Scripts
Installation
This module is required by magesuite-performance module, which is required by core metapackage.
Installation if metapackage is not used:
composer require "creativestyle/magesuite-performance-product" ^1.0.0
Â
Admin settings
Asynchronous price loading for simples of configurable product can be switched off and on in the admin panel.
Stores -> Configuration -> MageSuite -> Performance Improvements
Settings:
Option | Value | Comment |
---|---|---|
Async Option Prices | Yes/No Default value: Yes | When enabled, prices for simple products on product tiles will be loaded on demand via JavaScript to reduce rendering time for POP and product tiles. |
Â
Backend
In progress
Frontend
Scripts
swatch-async-prices.js mixin is added in order to load price information asynchronously.
'Magento_Swatches/js/swatch-renderer': {
'MageSuite_PerformanceProduct/js/swatch-async-prices': true,
},
'MageSuite_ServerSideSwatches/js/swatch-renderer': {
'MageSuite_PerformanceProduct/js/swatch-async-prices': true,
},
Â
After a swatch is clicked there is a request to /performance/swatches/prices/product_id/339/[ID]
endpoint and options.jsonConfig
od swatch-renderer widget is extended with prices data.
Â