Monthly Archives: January 2023
Hello, Magento fans,
Eager to learn about the first news and updates digest in 2023?
Here we go.
New features of the Magento 2 SEO!
As you know, a well-structured SEO strategy brings more revenue, the same as choosing the right tools. Our SEO extension is a must-have since it helps Google to discover, index and rank your store which brings more traffic as a result.
So, in the latest release, we’ve improved it for better results.
We’ve extended catalogue category pagination settings for SEO-friendly pagination pages. Besides, we’ve improved the meta title, description, keywords, H1 tag masks and crosslinks processor.
New features of Magento 2 Rich Snippets!
Every SEO specialist would confirm that structured data is more than important for improved visibility on Google.
Product, organization, search bar and FAQ snippets are important, same as is the HowTo markup. That’s why we’ve added a new HowTo widget in the latest version
Magento backorders allow customers to place orders even if the desired product is out of stock. That's a great feature since it prevents people from leaving their carts and moving to different stores. It comes in handy at times when the inventory hasn't been restocked, but you want to keep customers engaged.
Note: to prevent unexpected out-of-stock situations, you might want to enable low-stock email notifications to optimize your stock management.
Magento 2 allows you to set up backorders in two ways: globally or for a certain product. In this article, you'll learn how to apply both of these methods and tackle what backorders actually mean.
What are Backorders?
Backorder is a specific type of order placed by the customer when an item is currently out of stock. So, basically, you can buy an item the moment you visit the store. But it won't be delivered until it appears on the shelves again.
Store owners can benefit from the Magento backorders since they know what products are
While working with Magento 2 you perform a wide variety of tasks from installing extensions to configuring indexers and running static content deploy. Magento CLI is a useful tool that not only enables you to run a variety of operations but simplifies Magento development in general.
However, you might get overwhelmed by running the same commands over and over again. That's exactly when Magento 2 command shortcuts come in handy.
Surprisingly, many developers don't know about this. So in this guide, we've gathered the Magento 2 commands and command shortcuts for your convenience.
SSH
Full command | Shortcut |
---|---|
php bin/magento list | php bin/magento l |
Cache
Full command | Shortcut |
---|---|
php bin/magento cache:clean | php bin/magento c:c |
php bin/magento cache:enable | php bin/magento c:e |
php bin/magento cache:disable | php bin/magento c:d |
php bin/magento cache:flush | php bin/magento c:f |
php bin/magento cache:status | php bin/magento c:s |
Setup
Full command | Shortcut |
---|---|
php bin/magento setup:backup | php bin/magento se:b |
It's hard to overestimate the importance of making a customer's journey on your website as flawless as possible. If your store is easy to interact with, people will definitely want to come back. As it happens, lots of those interactions happen through the customer account.
That's why you have to make use of the Magento customer account configuration settings. So you can not only make engaging with your store easier but manage customer account options according to your requirements.
Want to track how many customers sign in or create an account on your store? Add Magento Google Tag Manager to your store and get in-depth data reports on customers' behaviour.
The whole process may seem a bit complicated, considering the number of options Magento provides. However, in this article, we'll guide you through all the steps you have to take.
In order to configure customer accounts in Magento 2, navigate to Stores > Configuration > Customers > Customers Configuration. As you can see, there are a
Magento pagination is a necessary element for better store navigation. You should definitely consider it to make browsing through the items you sell simpler, especially if you manage hundreds of products. Having pagination controls added on the top and at the bottom of the product listing page assists in this task greatly.
Furthermore, pagination controls help to optimize the speed of your website. The reason is the products aren't loaded all at once and there are fewer elements to process. So the loading time is reduced significantly.
In this article, you'll find out more details about Magento pagination controls and how to configure them.
Types of Pagination Controls
There are 4 types of Magento pagination controls. You can refer to the table below for more details.
Pagination control | Description |
---|---|
View As | Displays products either in the form of a list or a grid. |
Sort By | Changes the sort order of the products. You define what attributes are filterable in the Storefront Properties |
are a great contribution to your marketing strategy. They allow you to display or hide certain CMS blocks and pages from different customer groups. But these are not the only restrictions.
Today we'll focus on pages. You'll learn how to enable dynamic CMS pages in Magento and display them under different conditions.
1. Create CMS Page
It's important to note that dynamic pages are not created automatically. They just define how, when and under what conditions to display a page. So start with creating a CMS page. Then find the Display Conditions and Display Rules sections.
2. Create Conditions
You may have various pages on your store, with different information aimed at different customers. However, you may also need to display them under different conditions.
Based on cart attributes
Use cart attributes, like subtotal, shipping country etc, to define whether certain customers can access a page.
e.g. Encourage customers whose subtotal is more than $1000
Configurable products definitely stand out in the list of other Magento 2 product types. They come in handy when you want to provide your customers with multiple product options.
By default, Magento 2 doesn't allow you to assign the existing simple products to the existing configurable products from the admin panel. The only option is to create a so-called placeholder in the configuration and then add the product you need instead of it.
That kind of solution is not really helpful, since it requires too many unnecessary steps. That is why a programmatic way to perform this task might of more use.
So, to add a simple product to a configurable product in Magento 2 programmatically, refer to the method below.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $simple_product = $objectManager->create(\Magento\Catalog\Model\Product::class); $simple_product->setSku('test-simple'); $simple_product->setName('test name simple'); $simple_product->setAttributeSetId(10); $simple_product->setSize_general(193);
Google search results are becoming more elaborate than ever to deliver the almost experience to searchers. If you know how to leverage it to your benefit you'll be able to drive more traffic to your store and establish a better relationship with search robots.
HowTo structured data is a markup you use to explicitly tell Google that your pages are how-tos. While it might not be among the most popular rich snippets, it is quite important for content pages if you want to make them eligible for rich results.
Just like any other type of structured data, you will have to add the HowTo markup using JSON or microdata. To save from the hassles of code editing, we've added the HowTo rich snippet widget to the Rich Snippets Extension to help you add it directly from the admin.
Eager to find out how it works?
To add HowTo structured data in Magento 2:
1. Navigate to the page you'd like to add the HowTo markup to and jump to the Content section.
We've added the markup to the CMS page, but it could
Targeting the right people with the right message is a skill you need to develop to succeed in eCommerce. But not without a little help.
is a tool that helps you control the display of CMS blocks and pages for different customers and under different conditions.Today we'll focus on the CMS blocks and teach you to enable Magento dynamic blocks in various scenarios.
1. Create CMS Block
Before we move to the conditions you need to create new CMS block. All the conditions and display settings will be under the block Content once you install dynamic blocks and pages.
2. Set Conditions
If you display content blocks using widgets, you can define what page and place on the page to display a block on. However, you can't choose to display a block only if a product is new, or if a person browsing products or categories has already added something to the cart.
That's what dynamic block conditions cover.
Based on product attributes
If you want to display CMS
One of the ways to prevent the unauthorized usage of your store's product images is to apply watermarks to them. A watermark is a highly transparent symbol that is placed onto an image. It's typically a logo, stamp, or signature associated with your store.
This feature makes your products and services easily recognizable and also improves brand awareness.
If you would like to apply watermarks in your Magento 2 store, but don't know how to do that, this article is exactly what you need.
How to Add Product Image Watermarks in Magento 2?
In order to add product image watermarks, follow the steps described below:
1. Navigate to Content > Design > Configuration and press the Edit link on the theme you would like to configure.
2. Expand the Product Image Watermarks section.
Note: here you can find three sections (Base, Thumbnail, and Small) and plenty of fields to fill in for each of them. However, the content you have to add is quite the same in all of them, so we'll use the Small
A logo is what your customers associate your store with and what helps them to identify your brand among a huge number of others. Having your store's logo added to the invoice PDF printouts sent via sales emails and packing slips may serve as a sign of reliable service.
That's why such a technic can increase brand awareness and improve customers' overall experience. So, in this guide, you'll learn how to configure invoice and packing slip design in Magento 2.
To configure invoice and packing slip design in Magento:
1. Go to Stores > Configuration > Sales > Sales > Invoice and Packing Slip Design.
2. Press the Choose File button and upload your logo in the Logo for PDF Print-outs (200x50) field. The 200x50 size is recommended.
3. Choose File and upload the logo in the Logo for HTML Print View field.
4. Enter the Address (email address or a few of them) that will be displayed in the invoices PDFs and packing slips.
Once you finish, press the Save Config button and have a look at
When it comes to the management of content blocks in Magento, it's always overwhelmed, especially when the holiday season rolls around the corner. If you want to display different CMS blocks based on a date or time, be ready for a lot of enabling/disabling work.
Not only is it ineffective but time-consuming. So you need a more effective solution — Magento 2 Dynamic Blocks.
To schedule CMS blocks in Magento 2:
1. Navigate to Content > Blocks and press the Add New Block button to start scheduling CMS blocks in Magento.
Note: if you've already created a CMS block, move on to step #4.
2. Enable the block and fill out general block information like Title, Identifier, and Store View it will be displayed on.
3. Fill in the block Content, either in the page builder or WYSIWYG editor.
4. Jump to the Display Rules section and specify the Date From and Date To to define a period for the display of a CMS block. Once that period expires the block will be automatically disabled.
5. Set the Days
While proceeding with the checkout, your customers can see the Order Summary section, which includes the total price of the purchase, as well as the components that make it up (e.g. subtotal, tax, discounts, etc.). Each of these items has a certain place in the list and reflects the order of the total sum calculation.
This is one of the possible views of the checkout totals on the Magento checkout.
However, the checkout totals sort order can be configured from the admin panel and in this article, we'll show you how to do that.
To Configure Checkout Totals Sort Order in Magento 2:
1. Go to Stores > Configuration > Sales > Sales > Checkout Totals Sort Order.
2. Set the values in each of the following fields:
- Subtotal;
- Discount;
- Shipping;
- Tax;
- Fixed Product Tax;
- Grand Total.
Note: the lower the value, the higher in the list the following item will appear. Thus, Subtotal will be on the top of the order summary list since its value is 10, while Grand Total, having a value of 100
We can refer to the Terms and Conditions as to the special kind of agreement between a store and a customer. Customers have to agree to follow all the guidelines and rules of using your website prior to purchasing your products or services. It's a great way to avoid any kind of misunderstanding and improve client loyalty.
That's why it is important to make the terms and conditions checkbox available during Magento checkout. So, in this article, you'll learn how to do that.
How to Add Terms and Conditions Checkbox in Magento 2?
First of all, to add the terms and conditions checkbox in Magento 2, you have to create terms and conditions and only then proceed with adding the checkbox. Let's explore each step in more detail.
1. Create Terms and Conditions
- Navigate to Stores > Settings > Terms and Conditions and press the Add New Condition button.
- Set the Condition Name.
- Enable terms and conditions by choosing a corresponding option in the Status field.
- Select if you want to Show
Password is a vital part of the process of creating a new customer account in Magento. It keeps their data secured within their accounts and provides access to important information about orders, invoices, refunds, reward programs, etc.
Magento 2 provides multiple options for customer account password configuration. These include the reset password link, forgot/remind email template, maximum login failures to lock the account, the number of characters that make up a password, and much more.
So, in this article, you'll learn how to configure password options for customers in Magento 2 to ensure convenient password recovery.
To configure password options in Magento:
1. Go to Stores > Configuration > Customers > Customer Configuration > Password Options.
2. Choose the way for checking password reset requests in the Password Reset Protection Type field. Here you have four possible options:
- By IP and Email;
- By IP;
- By Email;
- None.
3. Set the Maximum Number of Password Reset Requests. Enter
While product attribute is an individual characteristic of a product, product attribute set is a group of those characteristics that define a product. You will use product attributes every time when creating products in Magento.
If you need to create multiple product attributes, doing this via the admin panel might require a lot of time. So in case, you need to do it fast, create an attribute set in Magento 2 programmatically.
Note: before you create attribute sets you have to create product attributes. So you might need to have a look at our guide on how to create product attributes programmatically in Magento.
Use the following code to create an attribute set programmatically. Create the InstallData.php file in the app/code/Vendor/Module/Setup/InstallData.php.
<?php
namespace Vendor\Extension\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Catalog\Setup\CategorySetupFactory;
While creating new accounts, your customers have to fill in some of their personal information. Depending on the policy of your store, you can add or remove the fields that contain customer name and address data and set them up according to your needs.
Magento 2 customer account settings are very flexible in this regard. So, in this article, we'll explain how to do that.
To configure customer name and address options in Magento 2, take the following steps:
1. Go to Stores > Settings > Configuration > Customers > Customer Configuration > Name and Address Options.
Note: You have to clear the Use System Values checkboxes to configure all the fields, or you can enable those checkboxes to use the default options.
2. Enter the Number of Lines in a Street Address. The default value is 2, however, you can use a different number on the scale from 1 to 4.
3. In the Show Prefix field, choose either Optional or Required to use the name prefix in the new customer account forms. You can disable
Product attributes are characteristics of a product that help you offer customers a wide range of options and influence their purchasing decisions. Once you add product attributes in Magento, it doesn't end there. You can also use product attributes to define dynamic category rules, cart price rules, related product rules, and multiple other options.
That being said, it is important for you to know how to create product attributes in Magento programmatically. Just in case you'll need to create multiple attributes faster.
To create product attributes in Magento programmatically create the InstallData.php file in the app/code/Vendor/Module/Setup/InstallData.php.
<?php
namespace Vendor\Module\Setup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class InstallData implements InstallDataInterface
{
private $eavSetupFactory;
public
It is crucial to use the correct technics to keep your clients engaged and drive more of them to your store. Since it all comes down to customer experience, you have to optimize all the processes during the customer's journey on your website, including customer account options.
Fortunately, Magento 2 gives you multiple features for the configuration of new customer accounts. And in this article, we'll provide more details about them.
To configure new customer account options in Magento 2 take the following steps:
1. Navigate to Stores > Settings > Configuration > Customers > Customer Configuration > Create New Account Options.
2. Choose whether to Enable Automatic Assignment to Customer Group.
3. If you chose Yes in the previous field, set the Default Group to which your customers will be assigned automatically.
Note: if you enable guest checkout no customer will be created. So, no customer group will be assigned to them unless you convert guest orders to customers.
4. Set the
Related products are one of the most common ways to drive more sales in e-Commerce. You have to add related products manually or automatically through the related product rules to increase the average order value. But there is one more way. You can get related products collection in Magento programmatically.
So if you want to avoid monotonous manual configuration of related products in Magento, keep reading.
To get related product collection in Magento 2:
1. Create an Extension.php file at app/code/Vendor/Extension/Block folder.
<?php
namespace Vendor\Extension\Block;
use Magento\Framework\View\Element\Template;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
class Extension extends Template
{
protected $registry;
public function __construct(
Context $context,
Registry $registry,
array $data = []
)
{
$this->registry = $registry;
parent::__construct($context, $data);
}
public function _prepareLayout()
{
return parent::_prepareLayout();
}
public function getCurrentProduct()
Magento 2 offers you outstanding features for stock management. Except for the global Magento stock options, you can also benefit from the advanced settings.
Thanks to the Magento advanced inventory, you can track quantities of multiple products and manage inventory more efficiently on a per-product basis.
Depending on your requirements, there are two ways to configure advanced inventory in Magento 2. You can either exclude stock management (short form) or include stock management (long form). The difference is in the number of options you can configure for an individual product.
In this article, you will learn how to configure Magento 2 advanced inventory using both of these methods.
To configure Advanced Inventory in Magento, go to Catalog > Products, choose a product you would like to set up advanced inventory for and press a corresponding button under Quantity.
Exclude Stock Management
1. Set the Manage Stocks field to No.
2. Complete the Minimum Quantity Allowed in Shopping