11 votes
Accepted

Magento 2.4.6 : Could not validate a connection to the OpenSearch. No alive nodes found in your cluster

Replace --search-engine=opensearch with --search-engine= elasticsearch7, it will solve your issue. It is intended to bypass the Magento installation/upgrade process, you can change the configuration ...
Tu Van's user avatar
  • 6,868
11 votes

Magento 2.4.6 : Could not validate a connection to the OpenSearch. No alive nodes found in your cluster

By default OpenSearch uses SSL, but magento doesn't use it. So it needs to disable SSL plugin in OpenSearch for successful magento installation: sudo nano /etc/opensearch/opensearch.yml And add this ...
Litvinenko Sergey's user avatar
8 votes

imagecolorsforindex(): Argument #2 ($color) is out of range when running bin/magento catalog:images:resize

vendor/magento/framework/Image/Adapter/Gd2.php around line 346: - if ($transparentIndex >= 0 && $transparentIndex <= imagecolorstotal($this->_imageHandler)) { + if ($...
Konstantin G.'s user avatar
6 votes
Accepted

Which class replace for "Zend_Validate" in Magento 2.4.6?

Here I mention some other Zend classes which Replace with laminas 1). \Zend_Http_Client::POST will be \Laminas\Http\Request::METHOD_POST and 2). \Zend_Http_Client::GET will be \Laminas\Http\Request::...
Jay Parmar's user avatar
5 votes
Accepted

color picker in configuration Mismatched anonymous define() module in Magento 2

As per your error you want to add adminhtml_system_config_edit.xml on path Vendor/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml in your module and add below code: <?xml version=&...
Charmi Patel's user avatar
  • 1,137
5 votes

Which class replace for "Zend_Validate" in Magento 2.4.6?

You can simply use \Laminas\Validator\StaticValidator and execute(). execute() method is same as old is(). Example: if (!\Laminas\Validator\StaticValidator::execute($email, 'EmailAddress')) { $...
Litvinenko Sergey's user avatar
5 votes
Accepted

How to extend catalog_product_view.xml for a specific product type?

You need to override the layout like this. catalog_product_view_type_simple.xml -> Simple Product catalog_product_view_type_virtual.xml -> Virtual Product ...
Msquare's user avatar
  • 9,063
4 votes

Magento Code Review Criteria?

Magento have a large docs you can follow https://developer.adobe.com/commerce/php/coding-standards/ https://developer.adobe.com/commerce/php/best-practices/extensions/ PHP files must follow PSR-1/2 ...
DJX's user avatar
  • 178
4 votes

TypeError: addslashes(): Argument #1 ($string) must be of type string after upgrade Magento 2.4.3 to 2.4.6

Without modify core code - simple update the core_config_data table with this sql statement: UPDATE core_config_data SET value = 'welcome' WHERE path ='design/header/welcome'
BergMedia's user avatar
4 votes
Accepted

what is hyva ? A theme or a platform?

Hyvä is a theme for Magento 2 designed to improve the frontend experience of Magento stores. It uses modern technologies like AlpineJS and TailwindCSS, instead of RequireJS, Knockout.js, jQuery and ...
Charmi Patel's user avatar
  • 1,137
4 votes

what is hyva ? A theme or a platform?

The answer is simple. What you are going to purchase is a theme. But what you get is a platform! Some detailed information would be: It uses basically two libraries. AlpineJS for giving basic ...
Rajeev K Tomy's user avatar
4 votes
Accepted

Magento2.3.5: How to optimize product export scripts?

I recommend to use standard performance improvement loop: Testing (profiling) Find bottleneck Fix it and repeat https://github.com/NoiseByNorthwest/php-spx is good for quick start For example app:/...
KAndy's user avatar
  • 20.8k
4 votes
Accepted

Does Magento 2 launch all RabbitMQ consumers only by cron?

The integration of RabbitMQ with Magento 2 is more flexible than that. Magento 2 can launch RabbitMQ consumers in two ways: Command-line Interface (CLI): You can manually start a RabbitMQ consumer ...
brentwpeterson's user avatar
4 votes
Accepted

Error: Call to a member function getFieldValue() on bool in vendor/magento/framework/App/PageCache/Kernel.php:134

The solution is simple if you look at the Kernel.php line : 134, you'll find a condition like $response->getHeader('Cache-Control')->getFieldValue() . So you can set it manually like below,in ...
Dharmesh N Tukadiya's user avatar
4 votes
Accepted

Uppercase to lowercase

Yes, you can update the product titles to lowercase without using an extension by following these steps: 1.Backup your database: Before making any changes to the database, it is important to create a ...
Charmi Patel's user avatar
  • 1,137
3 votes

Magento 2: Replacement for Mage::log method?

Magento 2 ( 2.4.X ) - Magento 2 logs - Magento 2 default logs $writer = new \Zend_Log_Writer_Stream(BP . '/var/log/testlog-thala-vkk.log'); $logger = new \Zend_Log(); $logger->addWriter($writer); $...
Roshan Rakesh Yadav's user avatar
3 votes
Accepted

display products onclick category url only if attribute value is yes

Yes, I noticed your comments. You are using a product query to retrieve products, so you can simply add your attribute filter to your existing query. Product Query: https://developer.adobe.com/...
Msquare's user avatar
  • 9,063
3 votes

display products onclick category url only if attribute value is yes

when u are using PWA Magento 2.4.5 Venia Theme then you can't use classic Magento templates from modules. Magento theme is based on PHP and HTML and is part of classic Magento approach. PWA Venia is ...
K. Maliszewski's user avatar
3 votes
Accepted

How to get email template content using template id in magento 2?

Using the below helper method you can get the template data <?php namespace [Vendor]\[Module]\Helper; use Magento\Framework\App\Helper\AbstractHelper; use Magento\Framework\App\Helper\Context; use ...
Grazitti Dev's user avatar
3 votes
Accepted

Exception error : Unable to send data to service in Magento SaaSCommon module Magento 2.4.5 EE

This is a feature in Enterprise edition for using Saas (Software as a Service) features as Adobe Sensei for an example. And the catalog sync process runs hourly to allow Commerce services to use ...
Arjun B's user avatar
  • 66
3 votes
Accepted

Magento2 Invoice Print PDF editing

Your totals are left aligned, which is the issue here. When you change them to right alignment (which is default for Magento 2.4.5-p1) it will fix your problem. In order to change the totals you have ...
Daniel's user avatar
  • 2,229
3 votes

Import Stock error: systemException Warning: Undefined array key "source_code"

I had the same issue in our project. I fixed it by doing these: 1- TRUNCATE TABLE importexport_importdata; 2- TRUNCATE TABLE import_history; You can try this please take a backup from your database ...
Mohamed Elkashef's user avatar
3 votes

Customer name missing in transaction mail in 2.4.6?

{{trans "%customer_name," customer_name=$order.getCustomerName()}} Change this line to: {{trans "%customer_name," customer_name=$order_data.customer_name}} Additionally, remove ...
Pruthvi Raval's user avatar
3 votes

301 Redirection from Old Magento2 URLs to SEO-Friendly URLs

You can create 301 redirection for catalog/product/view path url to seo friendly url by below approach. Step 1: You can override catalog/product/view controller execute method. Step 2: Then you check ...
Nikunj Rawat's user avatar
3 votes
Accepted

The "componentType" configuration parameter is required for the "custom" component Magento 2

After researching for long time, I found the solution by overriding the module. Please check the below code, create module.xml file on app\code\Vendorname\Affirm\etc <config xmlns:xsi="http://...
Sunny Rahevar's user avatar
3 votes

I'm getting empty array without using session object. How we can get cart data without using session object

I noticed that you are accessing allVisibleItems directly from the cart object. But first, you should retrieve the quote and then access allVisibleItems. This will resolve your issue. Here is the ...
Deepak MageDivine's user avatar
3 votes
Accepted

Not able to download magento2.4.6-p2

Run the following command to get the path of the composer's global directory. composer config --list --global | grep 'home' Ensure that your auth.json file is located in the same directory as the ...
Tu Van's user avatar
  • 6,868
3 votes

How do I set the minimum quantity and default quantity to be different?

There is no native way to set a different Minimum Quantity and Default Quantity. Here is how Magento determines which is the "Default Quantity" : \Magento\Catalog\Block\Product\View::...
Cladiuss's user avatar
  • 1,271
3 votes
Accepted

Magento 2.4.3-p1, order out-of-stock product in list.phtml

You can try this in your list.phtml <?php $currentCollection = $block->getLoadedProductCollection(); $inStockProducts = []; $outOfStockProducts = []; foreach ($currentCollection as $product) { ...
Mitul Vadalia's user avatar
3 votes

Which class replace for "Zend_Validate" in Magento 2.4.6?

Try this code, use Magento\Framework\Validator\EmailAddress as EmailValidator; // ... if (!EmailValidator::isValid($email)) { $messages[] = __("Please enter a valid Email address on row [&...
Harun's user avatar
  • 556

Only top scored, non community-wiki answers of a minimum length are eligible