Monthly Archives: March 2020

  1. Magefan News and Updates - March 2020

    Hello there, Magento fans!

    Are you eager to learn about some news and updates we've have prepared for you in March?

    Read more »
  2. How to Create New CMS Block in Magento 2?

    When you create CMS Blocks in Magento 2 you open a lot of opportunities. CMS blocks allow you to share some information with your customers, announce special offers, sales, dicounts or just make your Magento 2 store pages more interesting and engaging.

    Magento enables you to create CMS blocks directly from the admin and show them on different pages of your Magento 2 store via different methods.

    In this article, you're going to learn more about these methods and how to create CMS blocks in particular.

    Follow these steps to create new CMS block in Magento 2:

    1. Go to Content > Elements > Blocks and press the Add New Block button.

    Magento 2 Blocks

    Read more »
  3. Magento 2 Image Lazy Load In Knockout Template

    To apply lazy load for images in your Knockout template, first, make sure that  Magento 2 Image Lazy Load extension is installed.

    Then insert an image into the HTML template (my-template.html) like this:

    <img data-bind="attr: {src: $parent.getPixelUrl(), 'data-original': thumbnail, alt: code_article, loading: 'lazy', width: '165', height: '165' }"/>


    <div class="options-block" data-bind="foreach: getOptionBlocks(), afterRender: initLazyLoad()">
        <div class="option-item" data-bind="attr: {'data-sku': sku}">
            <div class="image-block">
                 <img data-bind="attr: {src: $parent.getPixelUrl(),
    Read more »
  4. Testing Magento 2 Auto Language Switcher

    If you have installed Magefan Auto Language Switcher Extension for Magento 2 and don't know how to test it properly, please follow these simple steps: 

    1. Enable all Magento 2 caches.

    All live sites use enabled caches, so make sure that you have enabled all one when testing.

    2. Use Developer (Simulate Geolocation).

    There is an option in Magento 2 Auto Language Switcher that allows you to test the extension performance.  

    Read more »
  5. Fixed: Related Products Template Does Not Looks Good

    In Magento 2 Blog v2.9.3 we added the feature that many customers requested about, it is "use the default catalog related products template" instead of custom blog related product template. This helps to display related products on the blog post page in the theme design automatically. The commit related to this change can be found at GitHub.

    Unfortunately, there are thousands of themes for Magento 2, and some of them have specific JS and CSS (e.g. Porto Theme). That is why if you use Blog extension v2.9.3 or greater and the related products block does not look good, please try to do next:

    1. Create a new file in your theme directory:


    Read more »
  6. How to Preview Products in Magento 2 Dynamic Category Rule?

    According to the dynamic category, products are generated automatically based on product attributes. One of the useful options Magento 2 Dynamic Category extension offers you is to preview products in dynamic category rule.

    In order to preview products in Magento 2 Dynamic Category Rule follow these steps:

    1. Go to Catalog > Dynamic Category > Rules.

    2. Choose the Dynamic Category  Rule which you want to preview the products in. 

    3. Scroll down to the Product's Condition and click Preview Products to see the products generated according to the rule.

    Magento 2 Dynamic Category Rule Preview


    Read more »
  7. How To Check If My Magento Server Configurations Are Ready for WebP?

    In case you don't know if your webserver is already configured well and can use WebP, please follow these steps to check:

    1. Create a new testwebp.php  file in your Magento 2 root directory.

    2. Add this code to it:

    $errorSufix = '<br/>Please enable it in your hosting configuration or ask the server administrator to help you with this.</strong>';
    if (!function_exists('gd_info')) {
       echo ('<strong style="color:red">Error: GD is not enabled in PHP settings.' . $errorSufix);
    exit(); } $hasWebP = false; foreach (gd_info() as $key => $value) { if (stristr($key, 'webp')) { $hasWebP = true; break; } } if (!$hasWebP) { echo ('<strong style="color:red">Error: WebP option is not enabled in PHP GD.' . $errorSufix);
    exit(); } if (!function_exists('imagecreatefromwebp')) { echo ('<strong style="color:red">Error: imagecreatefromwebp
    Read more »