Page 24 - Blog
News, insights and resources from the world of e-commerce
- 2 min read
Reviews are a great way to learn more about your customers or their preferences and product tendencies on your Magento 2 store. So, it is always a good idea to keep track of your reviews and engage in a dialogue with your customers.
For this, you need a new review notification set up on your Magento 2 store. Unless you want to make checking the reviews page a routine.
Although there are no review notifications in Magento 2 by default, you can always use Magento 2 Admin Email Notifications by Magefan for your greatest convenience.
It allows you to configure new review notifications in your Magento 2 store in 2 ways:
Admin Notification
Email Notification
Let's learn more about both of them.
Follow these steps to configure new review notifications in Magento 2:
1. Navigate to Stores > Configuration > Magefan Extensions > Admin Notifications > Admin Panel Notifications.
2. Enable New Reviews Notification option so you will receive notifications about new reviews to yourihor
- 2 min read
Low stock in Magento 2 can sometimes be the reason for losing your potential customers.
It is very important to check the product stock statuses to be aware of the amounts of them left.
However, you can't constantly go from page to page or reload the product grid to check the quantity. That is what Magento 2 low stock email notifications are for.
So, in this article, you will learn how to enable low stock email notifications in Magento 2 with extension.
Follow these steps to enable Low Stock Notification in Magento 2:
1. Go to Stores > Configuration > Magefan Extensions > Admin Notifications > Admin Email Notifications > Low Stock Notification.
2. Enable low stock notification and set the Notification Time.
3. To set Notify for Quantity Below go to Catalog > Inventory > Product Stock Options > Notify for Quantity Below. Set the number of products below which low stock email notification should be sent.
4. Enable the Use MSI option if you use .
Note: you willihor
- 1 min read
Magento 2 Cache can influence a lot of things in your store, especially the loading speed.
Someone might disable the Magento 2 caches during deployment or they are disabled after some admin configuration.
Sometimes, your website runs slowly and you don't even know the disabled cache causes it.
That is why it is useful to have the disabled cache notification sent to your admin.
Magento, by default, doesn't offer such notifications, but extension has you covered.
To enable disabled cache notification in Magento 2, navigate to Stores > Configuration > Admin Panel Notifications and enable the corresponding option.
Once you enable this option, you will receive a notification about disabled cache in your admin panel:
Check how it works in this short video:
With the Magento 2 Admin Email Notification extension you know when caches are disabled to enable them and prevent unwanted errors.
However, you can also learn how to configure and with this extension. Thus you can monitorihor
- 4 min read
Magento 2 robots.txt file is one of the most important parts in the . This file is a set of instructions given to the web crawlers “guiding” them on which pages of your website to crawl and index.
It mainly consists of the allowed and disallowed instructions that are used to block some pages from being indexed by search crawlers. Confused already?
In this guide, you'll learn what is Magento 2 robots.txt, where you can find and configure it. We'll also share the best practices for the robots.txt. So stay tuned.
What is Magento 2 Robots.txt File?
Magento robots.txt. is a text file used to instruct web crawlers on how to crawl pages on your website. It's essential to establish kind of a relationship between your website and crawlers. When you configure Magento robots.txt file you set instructions for web robots on what pages of your website to index or .
Robots.txt Best Practices
Before we move to the configuration you need to make sure the Magento robots.txt is optimized for SEO. Useihor
- 3 min read
Hello there, Magento fans!
First Spring News and Updates are here!
First of all, we would like to introduce our newly developed extension— a splendid tool that allows you to improve order management and save tons of your time.
Easier, faster, smoother order management process is not a “Magento dream” anymore :)
You will enjoy the process of Magento order management with this module!
extension allows you to run deployment commands avoiding website breakdown.
Now it works even more "smoothly" since we have fixed the error on the vanilla Magento 2 installation with no sample data.
It appeared during static content deployment when no storefront theme was selected in design settings. However, you shouldn't encounter it again.
NEW feature of Extension!
Now you will be able to convert images hosted on other domains/servers. Doesn’t it sound fantastic?
We hope you will like this feature as dozens of our customers have enjoyed this feature so far.
Do you use the MagicToolboxihor
- 2 min read
How you can easily scan your Magento 2 order grid and find the orders you need? Definitely not with the information default Magento 2 Order Grid provides you.
What you can do instead is use the extension and add some colors to your order grid. As you might have guessed, in this article you will learn how to add order status colors and where to change them.
So, let's get to it.
To add order status colors to the sales order grid in Magento 2:
Navigate to Stores > Configuration > Magefan Extensions > Better Order Grid.
Enable Order Status Color and don't forget to Save the configuration.
Once you add order status color in the order grid, it will be easier to scan:
You can change the colors for each in case you don't like the colors set by default.
To change order status color in Magento 2:
Go to Stores > Order Status and choose the order status you want to change the color for.
Set the order status Color and press the Save Status button.
When you go to the order grid to check it, you willihor
- 2 min read
can be quite daunting, due to the limited information in the default order grid. Although Magento order gird is missing a lot of things, product image and product information are the most important.
So, to see what was ordered directly from the grid, you need to add products to the sales order grid in Magento. Today you'll learn how.
You can check out this short video of the process or follow the instructions below.
Add Product Images to Order Grid in Magento
1. Navigate to Stores > Configuration > Magefan Extensions > Better Order Grid.
2. Choose the Image on Hover option in the Product Column Template field.
Once you save the Image on Hover option, you'll see the product image in the order grid. All bought product details will be displayed on hover.
Add Product Attributes to Order Grid in Magento
If you want to display product attributes directly in the order grid, go back to the extension configuration. Choose Grid as the Product Column Template and choose if you wantihor
- 1 min read
Sales are a great period for your customers to save some money purchasing your products. However, none of them actually knows how much it takes to organize, arrange and manage sales and orders.
Coupon code sometimes doesn't apply or is used multiple times, or becomes invalid. So, to organize your order grid during sales, you can add coupon codes to the order grid in Magento 2 and easily find orders with discounts.
You just need Extension for this. And in this article, you will learn how to add coupon code column in the order grid.
Take these steps to add coupon code to the order grid in Magento 2:
1. Navigate to Sales > Orders and unfold the Columns menu.
2. Find the Coupon Code in the order attributes and check it.
3. Once you add the coupon code, it will appear in the order grid.
And that's it. You don't need to have any technical skills to add a discount to the sales order grid since Magento 2 Better Order Grid module does it for you.
You won't only be able to see the couponihor
- 2 min read
Managing orders in Magento 2 can be really time-consuming since it takes quite some time to filter, find and process them. That is why to provide a better customer experience, you need to optimize order management. And that is exactly what extension can help you with.
It allows you to customize Magento 2 order grid as per your needs to find orders you're interested in easier and filter them faster. So, let's find out how to configure Magento 2 Better Order Grid.
Take the following steps to configure the Custom Order Grid extension:
1. Navigate to Stores > Configuration > Magefan Extensions > Better Order Grid and Enable Extension.
2. Choose to Hide Orders With Statuses and display only orders with certain statuses in the grid.
3. Select the Product Column Template. You can choose to display Image on Hover or Grid.
Note: when you choose the grid product column template, you need to choose Product Column Display Info: Thumbnail, Name, SKU, Price, Qty Ordered, etcihor
- 4 min read
The newsletter is a great opportunity for you to notify your customers about some special offers or sales running as well as provide them with updates and news on your Magento store.
Email marketing remains a powerful type of marketing, and it is one of the best ways to establish strong relationships with your customers and bring companies higher sales if they developed well-planned strategies.
Magento allows you to manage newsletters directly from the admin and in this article you're going to learn how to configure them.
Article Contents
Step 1: Configure Newsletter Subscription Options
Step 2: Create Newsletter Template
Step 3: Send Newsletter Template
Step 4: Configure Newsletter Subscribers
Follow these steps to configure newsletters in Magento 2:
Step 1: Configure Newsletter Subscription Options
When managing newsletters on your Magento store the very first step you should take is to check the newsletter general configuration. There are some options that define newsletterihor
- 5 min read
The out-of-stock situations are not the most welcomed ones. However, you still can turn them to your advantage. Question is, how?
may be one of the options to go for. Yet, Magento 2 product alerts can do the trick much better. By using them, you interact with your customers more, improving their engagement and loyalty at the same time.
In this article, you're going to learn what are Magento product alerts, how to configure them and manage product alerts run settings.
Ready to start?
What are Magento 2 Product Alerts?
Magento 2 product alerts is a system of notifications customers subscribe to on the product page to receive email notifications about any change in the product price or product stock status. Correspondingly, there are 2 types of product alerts in Magento 2: Product Price Alert and Product In-Stock Alert.
Thus, customers can get the product they are interested in for a more suitable price when they want to. Or get a product they want to buy right after it is backihor
- 2 min read
Magento 2 being a multifunctional e-commerce platform allows you to create products from the admin panel. There are plenty of options to fill out to , which obviously takes some time.
And what if you have to create a huge amount of products, especially during the development or testing?
The easiest, in this case, would be to create products programmatically. And that is exactly what you're going to learn in this article.
Use the following method to create a simple product in Magento 2 programmatically:
getObjectManager();
$state = $objectManager->get('\Magento\Framework\App\State');
$state->setAreaCode('frontend');
$product = $objectManager->create('Magento\Catalog\Model\Product');
try {
$product->setName('Test Product');
$product->setTypeId('simple');
$product->setAttributeSetId(4);
$product->setSku('test-SKU');
$product->setWebsiteIds(array(1));
$product->setVisibility(4);
$product->setPrice(array(1));
$product->setImage('/testimg/test.jpg');ihor
- 4 min read
Every store works hard trying to make their customers happy. However, sometimes it happens that people want their money back. This is an inevitable step in .
In such cases, people request a refund which in Magento is called Credit Memo.
And in this article, you will find out what is it and how to create it. Besides, you will learn about a solution that will help you to get rid of refunded orders.
What is Credit Memo in Magento 2?
Magento 2 Credit Memo is a document that defines how much money will be returned to the customer. How you create credit memos in Magento 2 generally depends on the payment method used while placing the order.
Based on this there are 2 types of credit memos: Online and Offline.
Offline Credit Memo means the refund will be saved just in the Magento database and the funds won't be transferred to the bank, therefore no money will be actually returned. It is used in case the offline payment method (e.g. money and check) was used while placing an order.
Online Creditihor
- 2 min read
WebP — is a modern image file format many websites use in order to reduce image size and improve website performance. But let's not forget that big-size images can slow down your application loading too.
Consider using WebP images in your application for Magento 2?
Here is how.
If you have a third-party application (e.g. application for iOS, Android, etc.) and use it for your Magento 2 store, you can display images in WebP format there, even if you only have the PNG, JPG, or other format images.
The only thing you need is our extension installed on your Magento 2 store.
So, to display WebP images in third-party applications you have to define the getWebPUrl function in the aplication code. Find the example below:
function getWebUrl(imageUrl) { /* @var string */ imageUrl = imageUrl.trim(); var baseUrl = 'https://mystore.com/'; var imageFormat = imageUrl.split('.').pop(); var mediaBaseUrl = 'https://mystore.com/pub/media/'; var staticBaseUrl = 'https://mystore.com/pub/static/';ihor
- 4 min read
In Magento 2 you can create plugins (interceptors) that allow you to extend functionality and execute your own code before, after, or around any PHP class public method.
For example there is a PHP class with public functions "setName", "getName", "save":
<?phpnamespace VendorName\ModuleName\Folder;class SomeModel{ private $name; public function setName($name, $storeId = 0) { $this->name[0] = $name; } public function getName($storeId = 0) { return $this->name[$storeId]; } public function save($fields, $customData) { /* some save logic here */ }}
How to create plugin in Magento 2?
1. Create the etc/di.xml file in folder and add the following code there:
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="VendorName\ModuleName\Folder\SomeModel"> <plugin name="mycompany_mymodule_plugin_modulename_Folder_somemodel" type="MyCompany\MyModule\Plugin\ModuleName\Folder\SomeModelPlugin"ihor
- 2 min read
Downloadable products in Magento 2 have no physical form and require practically nothing to manage. You don't need to cover manufacturing, publishing, shipping or delivery, etc. And that is what makes downloadable products so popular.
In Magento 2, except for creating a downloadable product, you have to configure the general Downloadable Product Options.
These steps to configure Downloadable Products Options in Magento 2:
Go to Stores > Configuration > Catalog > Catalog and find the Downloadable Product Options section.
Choose the Order Item Status to Enable Downloads which defines if the order needs to be Invoiced or Pending for a customer to be able to download the product.
Set the Default Maximum Number of Downloads available for 1 customer once he purchases the downloadable product.
Choose if you want the downloadable product to be Shareable, which means customers will receive the download link via email and will be able to share it, or No if you want a customer to logihor
- 2 min read
One of the primary tasks of any storeowner is to make the shopping experience as diverse and advanced as possible. Magento 2 custom options can help with that. They help you to provide your customers with an opportunity to choose product options as to their needs without relying on the product attributes.
Such functionality allows you to categorize products, create cart price and . Thus, you may configure it for your own store too. And this is exactly what you'll learn today.
How to Configure Magento 2 Custom Options?
1. Navigate to Catalog > Products and choose the product you'd like to configure customizable options for or Add New Product if needed.
Note: you can't configure Magento custom options for simple products that already constitute the .
2. Scroll down to the Customizable Options section and press the Add Option button.
Specify the Option Title and Type.
Check if you want this option to be Required.
Note: once you check the Required option's box, the corresponding custom optionihor
- 3 min read
In the you learned how to create new tables in Magento 2 database. In this one, you will learn more about the models used to work with the Magento 2 database which allows you to read, edit and delete the data.
Magento 2 and Magento 1 uses the Model/ResourceModel/Collection ORM (Object-relational mapping) for these purposes. To implement this concept you need to create 3 files (model, resource model, collection).
1. Create the Model file:
app/code/VendorName/ModuleName/Model/Somemodel.php
add the following code to it:
<?php
namespace VendorName\ModuleName\Model;
class Somemodel extends \Magento\Framework\Model\AbstractModel{ protected function _construct() { $this->_init('VendorName\ModuleName\Model\ResourceModel\Somemodel'); }}
The _construct initializes the resource model. Pass the name of the resource model class (create it in the next step) to the _init method.
Model is what you will most often work with. This class must be inherited from ihor
- 2 min read
When developing an online store based on Magento 2, you might face the problem of extending the standard Magento 2 or functionality.
Editing Magento core files or modules is not allowed because these changes will be overwritten during the .
So, how to make changes to the storefront (frontend) template file, css, js?
WARNING! The following instructions cannot be used to override the layout files.
Override module view-files in the app/code folder.
Let's say you need to change this file:
app/code/Magefan/Blog/view/frontend/templates/post/view.phtml
Make its copy in the theme folder with the following path:
app/design/frontend/ThemeVendor/themename/Magefan_Blog/templates/post/view.phtml
Make the necessary changes to the newly created theme file.
If your own theme is missing from your Magento installation, create new theme.
Override module view-files in the vendor folder.
Let's say you need to change this file:
vendor/magefan/module-blog/view/frontend/web/css/blog-custom.css
Make its copy inihor
- 2 min read
If you get an error "An element with a “root” ID already exists" in your Magento 2, it is, most likely, related to a third-party extension that calls methods to re-render a page.
To fix the "An element with a “root” ID already exists" error:
1. Find a PHP file and a line that throws an exception.
2. Open CLI (terminal), navigate to the Magento root directory, and run the following commands to find the proper file:
grep vendor/ -re ' ID already exists'grep app/ -re ' ID already exists'
As a result, you will get an output similar to this:
vendor/magento/framework/Data/Form.php: 'An element with a "' . $elementId . '" ID already exists.'vendor/magento/framework/Data/Test/Unit/FormTest.php: $this->expectExceptionMessage('An element with a "1" ID already exists.');vendor/magento/framework/Data/Structure.php: new \Magento\Framework\Phrase('An element with a "%1" ID already exists.', [$elementId])
3. Then open each file (except *Test.php) and put a and exit function before each throws an exceptionihor
- 2 min read
If you want to change type from dropdown to text in Magento 2, all you need to do is to run the following SQL queries (please make a Database backup before execution):
1. This query will change the attribute settings and convert it to a text attribute.
UPDATE eav_attribute SET backend_type = "varchar", frontend_input = "text", source_model = ""WHERE attribute_code = "MY_ATTRIBUTE_CODE";
2. This query will copy dropdown attribute data to the text attribute value table and replace the option IDs with their actual labels (text).
INSERT INTO catalog_product_entity_varchar SELECT null as value_id, pei.attribute_id, pei.store_id, pei.entity_id, aov.value as value FROM catalog_product_entity_int pei LEFT JOIN eav_attribute_option ao ON pei.attribute_id = ao.attribute_id LEFT JOIN eav_attribute_option_value aov ON ao.option_id = aov.option_id WHERE pei.value IS NOT NULL AND pei.attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = "MY_ATTRIBUTE_CODE") AND aov.store_id =ihor
