How to check cookie restriction mode enabled programmatically Magento 2?

You can check the cookie restriction mode value enabled or not for the current store using Magento 2.

Cookie Restriction mode XML config path is ‘web/cookie/cookie_restriction’ and you can check the value for the specified store using Helper class.

Magento\Cookie\Helper\Cookie class contains public function isCookieRestrictionModeEnabled() to verify Mode is enabled for the current store. Continue reading “How to check cookie restriction mode enabled programmatically Magento 2?”

How to get Sub Category details by parent id Magento 2?

Get Sub Category (Child category) Collection details by the Parent Category id in Magento 2.

Using Parent Category Id, You can explore all the children category with deep level Or You can retrieve id by Current Category

When you check the Magento Open source sample data, You can see Men Category has direct two-child categories, Tops, and Bottoms at level 3 and both have other subcategories (Jacket, Tees, Pants, Shorts, etc) at level 4. Continue reading “How to get Sub Category details by parent id Magento 2?”

How to update cart total summary section using js Magento 2?

You can reload or update cart total summary sidebar section in Magento by using Magento_Checkout/js/action/get-totals file.

A get-totals.js file used to reload a cart summary block on the cart page. Continue reading “How to update cart total summary section using js Magento 2?”