Add the following code in the app/code/Elightwalk/CustomGrid/view/frontend/template/cart/minicart.phtml file to assign the config value to the javascript variable.
js
<script>
maxpriceShipping = <?= /* @escapeNotVerified */ $this->getConfigForShippingBar() ?>;
</script>
php
<div id="cart-page">
<div id="block-cart-list" data-bind="scope:'minicart-addons'" class="block">
<!-- ko template: getTemplate() --><!-- /ko -->
<script>
maxpriceShipping = <?= /* @escapeNotVerified */ $this->getConfigForShippingBar() ?>;
</script>
<script type="text/x-magento-init">
{
"#block-cart-list": {
"Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
},
"*": {
"Magento_Ui/js/block-loader": “<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>”
}
}
</script>
</div>
</div>
app/code/Elightwalk/CustomGrid//view/frontend/web/js/view/minicartaddons.js
Replace the following line of code:
With the code given below:
- var maxPrice = maxpriceShipping;
Then apply cache clean cmd
- php bin/magento cache:clean
If your changes not apply then try setup upgrade, setup compile and static:content:deploy cmd
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy -f
Then, change the price limit from the backend and show the shipping bar limit in the frontend minibar.
In conclusion, mastering the art of creating an exceptional grid in Magento can significantly enhance your e-commerce store's performance. Take advantage of the tips and techniques shared in this guide to build a visually appealing and efficient grid, improving user experience and driving higher conversions. Start optimizing your grid today and elevate your online business to new heights!
Contact us:+91 8128405131
Email send us at hello@elightwalk.com