Magento 2

Create custom product link type in Magento 2: Part 3

Create custom product link type in Magento 2: Part 3

3 years ago
How to add products to a custom product link type grid in Magento 2? The dataprovider is set to $scope . '_product_listing' in vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Related.php – getGrid($scope) function, we need to create UI component like, so as per our example the custom link type code is ‘parts’ we need to create parts_product_listing.xml UI component. File Path: […]
Read More

Check if customer logged using HttpContext in Magento 2

4 years ago
Usually, we can check whether a customer is logged in via the Customer Session (Magento\Customer\Model\Session) class. Sometimes when a full-page cache is enabled, the generic class will not work as per our expectation. So in that case we can use HttpContext (Magento\Framework\App\Http\Context) class to check whether a customer is logged in or not. HttpContext class […]
Read More

Custom attributes with and without getCustomAttributes() method in Magento 2

4 years ago
Custom Attributes are the attributes that we can add with customized sources of available data types. In short, we can add Custom Attributes not available in built-in Magento. The Customer and Catalog entities use EAV entities and CustomAttributesDataInterface defines getCustomAttributes() and setCustomAttributes() methods. In this blog, we are getting an idea of how we can […]
Read More

Create your account

chatsimple