Page 11 - Monthly Archives: 2023
- 3 min read
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 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 selling well and whichihor
- 3 min read
While working with Magento 2 you perform a wide variety of tasks from to configuring indexers and running . 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 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
php bin/magento setup:config:set
php bin/magento se:c:seihor
- 4 min read
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 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 lot of sections you'll needihor
- 10 min read
Magento 2 pagination is a necessary element for better store navigation that also improves loading speed and SEO, especially for large catalogues. Pagination splits products across multiple pages instead of loading everything at once. This improves navigation for both visitors and Google crawlers.
This guide covers all pagination settings in Magento, for pagination, and teaches how to choose the best pagination style for your store.
Key takeaways
Displaying 20-40 products per page is a recommended Magento pagination setting for large catalogues to keep the balance between speed and user experience.
Magento provides built-in pagination controls, such as View As, Sort By, Show Per Page, and Pagination Links.
Pagination creates unique URLs for product listing pages and enables search engines to discover and index more products.
Magento AJAX pagination or AJAX infinite scroll is a pagination alternative that loads products dynamically while keeping users on the same page.
Magento lacks paginationihor
- 2 min read
and Pages are a great contribution to your marketing strategy. They allow you to display or hide certain static pages from different customer groups. But these are not the only conditions under which you can use to make your CMS pages display dynamically.
In this guide, you'll learn how to enable dynamic pages in Magento and display them under different conditions.
Step 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 create a first. Then find the Display Conditions and Display Rules sections under a corresponding page (Content > Pages).
Step 2: Split Page Cache by Device (optional)
If you want to improve the performance of your pages, configure the caching options for them.
For that, go to Stores > Configuration > Magefan Extensions > Dynamic Blocks and Pages > Advanced Settings and enable the Split Built-in Full Page Cache option. Then also specify the Splitihor
- 2 min read
Configurable products definitely stand out in the list of other . 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 to the existing 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); // value id of S sizeihor
- 3 min read
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 , 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 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 be a product, category, or any other how-toihor
- 4 min read
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. and Pages 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 dynamic blocks in Magento in various scenarios.
Step 1: Create CMS Block
Before we move to the conditions you need to create a . All the conditions and display settings will be under the block Content once you install the extension.
Step 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.
Set conditions based on product attributes
If you want to display CMS blocks onlyihor
- 2 min read
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 Smallihor
- 1 min read
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 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 howihor
- 7 min read
Managing can be overwhelming, especially when the holiday season is just around the corner. If you want to display different CMS blocks based on sales, be ready for a lot of repetitive enabling/disabling. Unless you use the Magento CMS Block scheduler.
In this guide, you'll learn how to schedule CMS blocks in Magento and see when it comes in handy.
Key takeaways
Magento CMS block scheduler is a tool that lets merchants schedule CMS content by time, customer groups, store views, or cart conditions.
The default Magento doesn't offer CMS block scheduler out of the box.
The extension by Magefan enables CMS block scheduler in Magento.
Magefan Extension also enables a scheduler for CMS pages.
What Is Magento CMS Block Scheduler?
Magento CMS Block Scheduler is a feature that allows merchants to show or hide CMS blocks automatically based on a predefined schedule or different cart or customer rules. It allows store owners to automate promotion campaigns and plan content for sales aheadihor
- 2 min read
While proceeding with the , 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, will be placedihor
- 2 min read
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 . 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 Contentihor
- 2 min read
Password is a vital part of the process of creating a . 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 0 here if you want to disable thisihor
- 1 min read
While product attribute is an individual characteristic of a product, 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 .
Use the following code to create an attribute set programmatically. Create the InstallData.php file in the app/code/Vendor/Module/Setup/InstallData.php.
<?phpnamespace Vendor\Extension\Setup;
use Magento\Framework\Setup\InstallDataInterface;use Magento\Framework\Setup\ModuleContextInterface;use Magento\Framework\Setup\ModuleDataSetupInterface;use Magento\Catalog\Setup\CategorySetupFactory;use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;ihor
- 2 min read
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.
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 the feature by choosingihor
- 2 min read
Product attributes are characteristics of a product that help you offer customers a wide range of options and influence their purchasing decisions. Once you , it doesn't end there. You can also use product attributes to define , cart price 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.
<?phpnamespace 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 function __construct(EavSetupFactory $eavSetupFactory) { $this->eavSetupFactoryihor
- 2 min read
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 no customer will be created. So, no customer group will be assigned to them unless you .
4. Set the Default Value for Disable Automatic Groupihor
- 1 min read
Related products are one of the most common ways to drive more sales in e-Commerce. You have to manually or automatically through the 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.
<?phpnamespace 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() { return $this->registry->registry('current_product');}ihor
- 3 min read
Magento 2 offers you outstanding features for stock management. Except for the global , 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 Cart.
3. Specify theihor
