Monthly Archives: February 2019

  1. Magento 2 XML Sitemap Configuration

    Configuring XML SItemap for your Magento 2 website you help Google identify, crawl and analyze your website links better. Google ranks not only the website as the unity of pages but separate web pages as well.

    So having an XML sitemap on your website contributes to your SEO improvements. You can easily configure the it for your Magento 2 store manually. However, you can as well configure the Magento 2 XML sitemap autogeneration.

    Read more »
  2. Magento 2 Blog XML Sitemap Configuration

    To configure Magento 2 Blog XML sitemap please, first of all, make sure that Magento default XML sitemap has been configured properly.

    Once you have configured Magento XML sitemap for products, categories, CMS pages, blog sitemap will be generated automatically and will be available by the same path as your default XML sitemap but with "blog_" prefix.

    Example 1

    Default XML Sitemap URL:  https://domain.com/sitemap.xml
    Blog XML Sitemap URL:  https://domain.com/blog_sitemap.xml

    Example 2

    Default XML Sitemap URL:  https://domain.com/pub/en_sitemap.xml
    Blog XML Sitemap URL:  https://domain.com/pub/blog_en_sitemap.xml

    Note that you will not see any additional sitemap item in the sitemap grid in the admin panel. Blog sitemap XML will be generated automatically in the background together with the regular sitemap and you will have to submit it to Google as well.

    Once a blog sitemap is generated we strongly recommend adding its link to the robots.txt as it is done at Magefan (https://magefan.com/robots.txt).

    Read more »
  3. Prioritizing Plugins in Magento 2

    The sortOrder property for plugins in Magento 2 determines when to call them (before, after, or around a method), on condition more than one plugin is configured for the same method.

    <config>
        <type name="{ObservedType}">
          <plugin name="{pluginName}" type="{PluginClassName}" sortOrder="1" disabled="false" />
        </type>
    </config>

    Prioritizing rules are as follows:

    • Before executing the original method, Magento will run before plugins from the smallest to the biggest value in sortOrder.
    • The part of the plugin around code will also be executed from the smallest to the biggest value before calling the original method (callable).
    • The after plugin is called from the biggest to the smallest after calling the original method.

    Read more »
^Top
Chat