We use cookies to make your experience better. To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies. Learn more.
Blog
-
30 Apr
In Magento 2, a VirtualType is a type of object that is created and configured using the dependency injection (DI) mechanism.
A VirtualType is not a concrete class, but rather a way to define a set of arguments and configurations that can be used to generate an instance of an object on-the-fly. This can be useful when you need to create an object that requires a complex set of dependencies or configuration options, but you don't want to create a concrete class for it.
To create a VirtualType in Magento 2, you first need to define it in the di.xml file of your module.
To define a virtual type, you need to specify the following in the di.xml file:
name: The name of the virtual type. This should be a unique identifier that is used to refer to the virtual type in other parts of the Magento 2 codebase.
type: The class that the virtual type is based on.
shared: A Boolean value that indicates whether the virtual type is a singleton or not. If set to true, -
28 Feb
To increase the prices of all products in Magento 2, you can follow these steps:
- Log in to your Magento 2 admin panel.
- Go to Catalog > Products.
- Select all the products for which you want to increase the price. You can do this by selecting the checkbox next to each product or by selecting "Select All" from the "Action" drop-down menu.
- ...
-
27 Oct
If after updating Magento (Adobe Commerce) to version 2.4.4 and higher your customers receive order emails without a list of products, then the solution below should help you solve your problem.
First of all, you need to check your email templates for "New Order" and "New Order for Guest".
If they contain such a code{{layout handle="sales_email_order_items" order=$order area="frontend"}}
then change the selected part in it as shown below
{{layout handle="sales_email_order_items" order_id=$order_id area="frontend"}}
-
21 Oct
If you noticed that your images have not appeared on your Magento2 site you can check the log file. There you can see the error below
imagecolorsforindex(): Argument #2 ($color) is out of range#0
/vendor/magento/framework/Image/Adapter/Gd2.php(347): imagecolorsforindex()
This error happens because the PHP library GD2 for PHP 8.1 has a bug.
For fixing this issue you should run the command below
bin/magento config:set dev/image/default_adapter IMAGEMAGICK
-
14 Oct
If you can't log in to the admin panel, but no error is shown, then you may have a problem with the session size.
Below is one solution to this problem.
-
20 Jul
Given
The site is working on Adobe Commerce (Magento) 2.
Site loads by HTTPS (SSL).
There is an ERR_TOO_MANY_REDIRECTS error on your server. -
24 Jun
If you have the error as in the title of this page this solution can help you.
In our case, this error happened when we synchronize live DB in dev DB.
The solution
Before anything action, you must make backup your DB
-
25 Aug
If you get this error when running bin / magento setup: upgrade command
Unable to apply data patch Magento\Paypal\Setup\Patch\Data\UpdateBmltoPayLater for module Magento_Paypal.
Original exception message: Notice:
Undefined offset: 1 in /vendor/magento/module-paypal/Setup/Patch/Data/UpdateBmltoPayLater.php on line 138
then you need to execute the following command in the Database
DELETE FROM `core_config_data` WHERE path="payment/paypal_express_bml/active";
-
2 Mar
To use our DHL Express Comprehensive Shipping for Magento® 2.x or MyDHL Express Comprehensive Shipping for Magento® 2.x modules, you must have a Site ID and Password that is not the same as your dhl.com login details.
To obtain a Site ID and Password, contact your DHL manager, he will make a request for an account to work with the DHL API.
-
26 Feb
If after running the command php bin / magento setup: di: compile your proxy class was not created, then a possible reason may be that your di.xml has line breaks in the "argument" field.