Monthly Archives: February 2023
Hello, Magento fans,
Catch the news and updates that took place this February. The winter is almost over, so get ready for the sunny days and new great things from Magefan.
New features of the Magento 2 Dynamic Categories!
Saving time while updating Magento catalog is key to effective management. And dynamic category is a perfect tool for improving the creation and updating of categories.
Now, it works even better, since we’ve improved compatibility with Magento Commerce and Commerce on Cloud.
Besides, we’ve fixed an issue with the Idle (backlog items) appearing repeatedly because of the enabled "UPDATE BY SCHEDULE" index mode. The SQL error on the dynamic product attribute value update that appeared on Magento Commerce is fixed as well.
New features of Magento 2 Product Tabs Extension!
If you’ve planned on displaying product attributes in the description, you can now do that with the current product attribute
The Shopware Blog homepage or blog index page is the first page people land on after they click on the blog link in the top navigation menu. That's why, for people to stick around you need to make sure this page is engaging, easy to navigate and informative.
In this guide, you'll learn how to configure a blog homepage in Shopware Blog extension.
To configure blog homepage in Shopware:
1. Navigate to Extensions > My extensions, find the Blog by Magefan among your extensions and click Configure.
2. Specify the Title of the blog homepage that will be displayed at the top.
3. Set the Display Mode to define what blog posts to display on the blog homepage.
4. Select the Posts Sort By method that defines how blog posts will be displayed on the blog index page. You can sort posts by Publish Date, Position or Title.
5. Select the Blog Index Templates.
6. Define how many blog Posts to display per Page.
7. Configure blog homepage SEO and define Meta Title, Meta Keywords and Meta
Once you set up a blog on your Shopware store, the traffic to your website to your blog will be coming from the search results. However, it is also important that people who have initially come to see your products can discover your blog too.
So, today you'll learn how to add a blog link to Shopware's top navigation menu with the Shopware Blog extension.
To add a blog link to Shopware top navigation:
1. Go to Extensions > My extensions, find a Blog by Magefan among your extensions and click Configure.
2. Move down to the Category Top Navigation section.
3. Enable the Display Blog Link option and set the Link Text.
4. Choose whether to Include Blog Categories in the menu and set Maximum Depth for them.
Press Save once you finish and go to the storefront to check what the blog link looks like in the top navigation.
If you've decided to include blog categories in the top navigation, there will be a flyout menu with all the categories listed. However, if you want to include only
February 24, 2022.
The day when the full-scale war started changed the lives of all Ukrainians and the world. Since 2022, February 24 is not just another day on the calendar. For us, it’s the beginning of a new era.
We thought it would last for a few days or just a few weeks. And these few days turned into 365 days of war and it's not over. Every day of this war is hard less or more for each of us.
Although the first days were full of fear, tears and ignorance, we began to act and fight. We united in one strong nation, one big family that could resist anything.
We'd like to share how the lives of our team members changed this year.
Viktoria:
"If I say that 2022 was a difficult year, it won't cover even a tiny bit of all the horrors we, Ukrainians, had to face. I consider it to be a turning point in my life that made me sort out my priorities and become much more mature. At the same time, I fell in love with our country, culture and people all over again. This is why I know that
Since blog posts go through multiple steps before being published, you'll probably need a few people to manage every step. However, instead of allowing each user to access all Shopware Blog sections, you can make only particular sections available to them.
For that, you'll need to create a user role in Shopware and enable certain permissions for them. Not only is it is more secure, but more convenient as well.
To enable access to Shopware Blog pages in the admin:
1. Go to System > Settings > Users & permissions and press the Create role button.
2. Fill out the Basic information by giving this role a Name and Description.
3. Move to Permissions > Content and tick blog sections you want to grant blog authors access to.
Here you can choose whether a user can View, Edit, Create and Delete Blog Categories, Blog Comments, Blog Posts and Blog Tags.
Don't forget to Save the role and proceed with creating blog authors and assign this role to them.
Assigning authors to your blog adds credibility and establishes you as a niche expert. In Shopware, you can create multiple authors, so each can contribute content to your blog.
In the free version of the Shopware Blog Extension, the role of blog authors is performed by the admin user. So, to create a new author for your blog on Shopware, you simply need to create a new user.
To create a blog author in Shopware:
1. Go to Settings > System > User & permissions and press the Create new user button.
2. Fills out the user's First and Last Names, and Email address.
3. Upload a Profile Picture.
4. Give a User name and a Password that will be used to log in.
5. Enable the Administrator option if you want this blog author to be an administrator, though it is not recommended.
6. Select the User interface language and Timezone.
7. Enter the Job title and assign a Role.
Once you Save a user, they will be able to log in to your Shopware admin panel and create blog posts.
However, you wouldn't
Blog tags are used to "label" or link similar blog posts together to simplify navigation through a blog. All blog posts can then be gathered on the same tag page and help readers find relevant content.
With the Shopware Blog Extension, you can not only create blog tags but manage search robots for them as well. And today you'll learn how to do that.
To create a blog tag in Shopware:
1. Go to Content > Blog Tags and press the Add New Tag button.
2. Fill out the General blog tag information.
- Enable your tag and give it a Title that will be displayed on the frontend.
- Create a tag description in the Content section.
3. Manage blog tag Display Settings.
- Choose the Template for the blog tag page.
- Define how many Post Per Page to display.
4. Fill out the Search Engine Optimization section. Enter the URL Key, Meta Title, Keywords and Description and set the meta Robots for the tag page to define how you want it to be indexed and crawled:
- INDEX, FOLLOW
- NOINDEX, FOLLOW
- INDEX, NOFOLLOW
Blog categories help you to categorize your blog posts and make it easier for people to find the content they are interested in. Shopware Blog Extension enables you to create an unlimited number of categories and assign multiple blog posts to them.
So, today, you'll create a blog category for your Shopware store.
To create a blog category in Shopware:
1. Navigate to Content > Blog Categories and press the Add New Category button.
2. Fill out the General blog category information.
- Enable the category.
- Give it a Title and Position.
Note: Position defines where to display a category in the category tree in sidebar. The higher the number, the lower the position.
- Choose whether to Include a category in Menu. It defines if a category will be displayed in the top navigation.
- Write the category description in the Content field.
3. Manage category Display Settings.
- Choose how to Sort Posts By: Position, Title, and Publish Date (default).
- Choose a Template.
- Define how many Posts Per Page
Blogging consistently creates a source of free organic traffic and a community of people who share your ideas. That's why blogging is one of the most popular, free marketing tools for eCommerce. So, if you aren't blogging on Shopware already, it's never late to start. And the first step is to install the Shopware Blog Extension.
In this guide, in particular, you'll learn how easy it is to create a blog post on Shopware.
To create a blog post on Shopware:
1. Navigate to Content > Blog Posts and press the Add post button.
2. Fill out the General blog post information.
Here you need to Enable your blog post, give it s Title, assign it to Categories and write blog Content.
3. Enter the Short Content of the post that will be displayed on the blog homepage and other post lists.
4. Fill out Display Settings.
Choose the blog Author and add some Tags related to your blog post. You can also define whether to Include this post in Recent Posts and set a Position for the blog post.
If you decided to remove Shopware Blog Extension by Magefan, please follow the steps below, also you can contact our team for a free consultation in case you have any issues with Magefan's extension.
Removing file instructions depends on the way the Blog extension has been installed in.
1. If you can find the extension files in the folder
custom/plugins/MagefanBlog
then run the following command:
bin/console plugin:uninstall MagefanBlog
Then remove this folder and run:
bin/console plugin:refresh
bin/console cache:clear
2. If the extension was installed via the composer and its files were located in the folder
vendor/magefan/shopware-plugin-blog
then run composer CLI command to remove it
bin/console plugin:uninstall MagefanBlog
composer remove magefan/shopware-plugin-blog
Once extension files have been removed, run these Shopware CLI commands:
bin/console plugin:refresh
bin/console cache:clear
If you need to update Shopware Blog Extension by Magefan, please follow the steps below. Note that the update instructions depend on the method the Blog extension was installed with.
Update using composer (Method 1)
If the Blog module was installed via the composer (check if vendor/magefan/shopware-plugin-blog folder exists), then you need to run these simple CLI commands in Shopware directory:
composer remove magefan/shopware-plugin-blog
composer require magefan/shopware-plugin-blog ^x.x.x
# replace x.x.x with the version you want to use
bin/console plugin:refresh
bin/console plugin:install --activate MagefanBlog
bin/console cache:clear
To install Shopware Blog Extension by Magefan, please use one of these installation methods.
Installation Method 1 - Installing via Composer (recommended)
- Open command line
- Using command "cd" navigate to your Shopware root directory
- Run CLI commands:
composer require magefan/shopware-plugin-blog
bin/console plugin:refresh
bin/console plugin:install --activate MagefanBlog
bin/console cache:c
Installation Method 2 - Installing using an archive and FTP
- Download Blog Extension ZIP-Archive from magefan.com website (not GitHub or other sources).
- Extract files.
- Copy the custom folder from the archive to your Shopware root folder web.
- In a command line, using "cd", navigate to your Shopware root directory
- Run CLI commands:
bin/console plugin:refresh
bin/console plugin:install --activateMagefanBlog
bin/console cache:clear
Cookies can hardly be treated as a new concept. Most web users know that cookies generate small-sized files to store user-related information. We can all agree that cookie messages can be irritating. But it is a necessary measure to obtain customers' consent for collecting their personal data, which is as important as terms and conditions.
So, if you were wondering whether Magento 2 has some cookie settings that can be configured, then the answer is Yes. You can easily configure cookie settings in Magento right from the admin panel and adjust them to your store's requirements.
In this article, you'll refresh your memory of the subject and learn how to configure Magento 2 cookies, and how to edit cookies policy and message.
What are Cookies?
Cookies can be referred to as small files of information that are generated by the web and saved on your computer. They store users' online session data, such as their navigation or the number of visits to a particular page. Cookies are mostly used
Product page optimization is one task that is never crossed out of the eCommerce TO-DO list. You need to optimize product page SEO, create more engaging images and update product information regularly to keep people coming to your store.
Product attributes, in particular, are essential on the product page since they hold a quick summary of the product details. However, unfortunately, Magento allows you to add new attributes to the storefront only in the More information product tab.
So, in this guide, you'll learn how to display current product attributes in the product short descriptions or any other place on the product page.
You can do that with the Current Product Attribute Widgets that com with the Product Tabs Extension.
Add Сurrent Product Attributes to Product Description
To display current product attributes on product pages in Magento:
1. Navigate to Catalog > Products and chose a product to which you want to add current product attributes.
2. Scroll down to the product
It is vital to keep track of all products you can sell, especially when managing Magento MSI. Magento provides multiple options for that, the most basic being salable quantity. It reflects a sum of items from all sources and allows you to see how many products you have left.
However, there is no way to filter products by salable quantity in Magento. At least, there isn't an easy way to do that since most guides show you how to do it programmatically.
Since Magento 2 Extended Product Grid & Mass Actions Extension offers you this feature by default, we want to share how easy it is to filter products from the admin panel.
To filter products by salable quantity in Magento 2:
1. Navigate to Catalog > Products and open the product Filters.
2. Find the Salable Quantity field, type the number you'd like to filter the salable products by and press the Apply Filters button.
Once you apply the filter, you will see the products with the salable quantity you've just entered in a corresponding
No matter how hard you try to prevent your store's data from a sudden disappearance, there is always a slight risk of different attacks or system failures. No matter how well-organized your store operation is, anything from installing Magento 2 extensions and deploying changes to updating Magento can cause some data to get lost.
To prevent this from happening you need backups. And luckily, you can back up Magento 2 in multiple ways.
Today, you'll learn about each of them in particular, so a copy of all the necessary data is created and can be easily restored.
Create Magento 2 Backup via Admin Panel
To create and schedule backups in Magento 2:
1. Go to Stores > Configuration > Advanced > System > Backup Settings.
2. Enable the backup by choosing Yes in the corresponding field.
3. Select Yes in the Enable Scheduled Backup field if you want to back up your data regularly.
4. Specify the Scheduled Backup Type. You've got 4 options here:
- Database
- Database and Media
- System
- System (excluding
Since Magento architecture is structured in a way to store data in different database tables, all data have to be reindexed when you make any changes to your store. And while you can reindex Magento via CLI or even the admin panel, this process is still time-consuming.
In this guide, we want to help you optimize the process.
Since the Catalog Category Product indexer takes the longest to execute we'll take it as an example for this article. So, you can optimize Magento reindex execution time by changing with batch_size of the Catalog Category Product indexer.
However, to get a better picture of how this works, let's define what is a batch size and why you need to modify it.
How Magento Reindex Works?
Batch size is a number of indexes that will be processed at a time, one MySQL query.
Imagine that you have a store with 40k products, and you do some changes, like updating prices in bulk, to all of your products. This will cause 40K indexes to be invalidated.
Magento splits data for
Providing high-quality service requires you to optimize multiple processes in your store, including order management. That being said, looking for certain order details might take some time, especially with hundreds of products.
Nevertheless, Magento allows you to eliminate the hard work. You can get order data by increment ID in Magento in multiple ways, the same as you can get current product or current category.
So, in this article, you'll learn how to use each method.
Get Order Data by Increment ID Using Factory Method
The factory method is used the most frequently. Use the following code:
protected $orderFactory; public function __construct( \Magento\Sales\Model\OrderFactory $orderFactory ) { $this->orderFactory = $orderFactory; } public function getOrderByIncrementId() { $orderIncrementId = 10000003; $order = $this->orderFactory->create()->loadByIncrementId($orderIncrementId); }
Get Order Data by Increment ID Using API Repository
Here is one more option. You might as well use the
With thousands of blog posts appearing on the web monthly, simply writing good content is not enough to lure more readers in. You need to come up with something to set your content apart from others in search results. Fortunately, Google and other search engines have already introduced that "something". It is structured data.
Except for the BlogPosting article schema our Blog extension already adds to the blog posts by default there is also a HowTo structured data. While the former merely tells Google that your content is a blog post, the latter makes your blog post eligible for rich results.
Today, you'll learn what exactly is HowTo schema markup, why you need it for your blog posts in Magento and how to add them easily with no coding skills.
What is HowTo Structured Data?
HowTo is a special type of structured data that helps you to define your content as a how-to, especially if your blog posts provide a set of steps for completing a task (including text, images and videos).
Customers build some associations with your brand right after they land at your store for the first time. This is why it is important to configure the default page (the one associated with the store's base URL) since this is where people land if some page is not accessible.
Thus, having these default pages configured helps to guide your clients through the website and eliminates any confusion that might appear on the way.
This article is exactly what you need if you want to know how to set up default pages in Magento 2.
To configure default pages in Magento 2:
1. Go to Stores > Configuration > General > Web > Default Pages and enter the Default Web URL.
2. Choose what page should be displayed for the CMS Home Page.
3. Specify the Default No-route URL.
4. Select the CMS No Route Page from the available options in the dropdown list.
5. Choose the CMS No Cookie Page to be displayed when cookies are disabled.
6. Specify whether to Show Breadcrumbs for CMS Pages.
Don't forget to press
While looking through various Magento 2 product types, you can't miss downloadable products. As the name suggests, these are digital products that can be downloaded — books, software, videos, etc. This type of content is becoming more and more popular these days. As a result, you can benefit greatly from having them in your store's catalogue.
Creating downloadable products via the admin panel may be rather challenging since it requires lots of steps. Fortunately, there is a programmatic way to optimize the process.
The following code will help you to create a downloadable product in Magento 2 programmatically:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get(\Magento\Framework\App\State::class);
$state->setAreaCode('frontend');
try {
$product = $objectManager->create(\Magento\Catalog\Api\Data\ProductInterface::class);