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
4 votes

"Error while checking if topic is synchronous" on setup:upgrade

Check for communication.xml file (add it if missing) to the module with the consumer. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/message-queues/config-mq.html
David's user avatar
  • 41
4 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
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
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
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
3 votes
Accepted

Returning configurable_options and variants are null for configurable products in custom product collection graphql query

After 2 days of investigation i have found the solution. in product data entity_id is missing. that was the issue. I have passed entity_id in array and it's working fine. hope it help someone . $...
Adarsh Ediyottil'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
2 votes

Magento 2: How to setup Elasticsearch from CLI?

If you use elasticsearch 7 use these commands (change values according to your needs): magento config:set catalog/search/engine 'elasticsearch7' magento config:set catalog/search/...
Gerard de Visser's user avatar
2 votes

Magento 2.3 Delete Inventory Source

While Muhammad Hasham’s answer gives a bit of context, it doesn’t explain why this action is disabled and how to do it anyway if it’s absolutely necessary. According to the documentation: To ensure ...
bfontaine's user avatar
  • 167
2 votes

ReferenceError: mageplazaSearchProducts is not defined

Thanks to @Gianr's answer I managed to fix this by doing the following: Place the htmlentities tag around the product description $this->getProductDescription($product, $store) in file app/code/...
Fidelity's user avatar
  • 130
2 votes
Accepted

Magento 2 community edition

strong text Magento 2 Community Edition (CE) and Magento 2 Enterprise Edition (EE) are two different editions of the Magento 2 platform, and they have different features, functionalities, and ...
Noor Mohamed's user avatar
2 votes

Magento Docker container stops at "Running Magento install script"

Add the environment variable BITNAMI_DEBUG = "true" in my case I was using MariaDB 10.9 but this image fails in this case with a max db version of 10.6
user112059's user avatar
2 votes

Unable to change/resize the logo from Magento admin after installing a custom theme

For anyone looking for this in 2023 the argument name in the the reference block is wrong. it should be: <argument name="logo_width" xsi:type="number">417</argument> &...
totneschap's user avatar
2 votes
Accepted

Error on constructor while saving form into the database

Can you please replace this code and compile it public function __construct(Context $context, PageFactory $resultPageFactory, PostFactory $postFactory) { $this->resultPageFactory = $...
Dotsquares's user avatar
2 votes

Magento 2.3 Accidentally delete vendor/magento folder in root directory content [WHM/cPanel] using rm-rf

Just run the composer install command again. This way the folder inside the vendor will be recreated
Jonas Hcr's user avatar
2 votes
Accepted

Update on "Add Store Code to URLs" Setting and URL Redirection

you can add this in .htaccess for apache RewriteEngine on RewriteRule ^se/(.*)$ $1 or this for nginx rewrite ^/se/(.*)$ $1 last;
Marius's user avatar
  • 198k
2 votes

Magento Code Review Criteria?

Code Standards and Conventions: Check if the code follows Magento coding standards and best practices. This includes naming conventions, file structure, indentation, proper commenting, and adherence ...
Mufaddal Dhansurawala's user avatar
2 votes

Difference between async/ and bulk/async in Magento 2

The right way depends on what you want to override, but to answer your difference query, asynchronous web endpoints takes a single object as a request payload, e.g. { "product": { &...
Ahmad's user avatar
  • 652
2 votes
Accepted

update magento 2.3.2 to 2.3.3 with composer "no matching package found."

Magento 2.3.3 does not support composer version 2 yet. You should use composer version 1 or search for a workaround for composer version 2 with Magento 2.3. You can switch to composer version 1 with ...
Tu Van's user avatar
  • 6,763
2 votes

Magento 2 : Missing field "image" in google search console

Ensure that each product page contains proper schema markup, specifically the itemprop="image" attribute. This attribute should be applied to the main product image on the page. Review your ...
Hafiz Arslan's user avatar
2 votes

How I can seed products into database directly?

Get all Simple products (sku, qty, stock_status) : select catalog_product_entity.sku, cataloginventory_stock_item.qty, cataloginventory_stock_status.stock_status from ...
Hafiz Arslan's user avatar
2 votes
Accepted

Using if statement in phtml

You can use the following code conditionally to display different CSS based on your condition: <?= $block->salebleqty() <= 0 ? 'red' : 'green' ?> For example: <div class="left-...
Tu Van's user avatar
  • 6,763
2 votes

Remove or replace add to cart button on a product in catalog by condition programmatically

To prevent the product from Adding to cart you can use below code: app/code/Vendor/Extension/etc/events.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
user3411's user avatar
  • 134
1 vote

Which class replace for "Zend_Validate" in Magento 2.4.6?

Zend_Validate replaced with laminas-validator The following modules are affected by this change: Magento_Store Magento_User Magento_GoogleAdwords (backend) Magento_Framework (translation and ...
Ramavtar Sharma's user avatar
1 vote

Which class replace for "Zend_Validate" in Magento 2.4.6?

Zend usage deprecated since 2.4.6 Now you can use Laminas.
MP Raj's user avatar
  • 502
1 vote

Magento 2.3 | Custom module with route but returns 404

Why do you have two routes nested ? Is there a reason ? I think this is what is messing with your code; you should be creating etc/frontend/routes.xml to get a frontend route and you don't have to put ...
Claims's user avatar
  • 1,146
1 vote

Magento2.4.5: Order total showing of a same product with diffrent size options in order detail page?

I became curious too about this and tried to replicate it. I had no chance to end up with the same issue, all the time the checkout being exactly on products ordered as expected. Are you sure you are ...
Madalin's user avatar
  • 11
1 vote
Accepted

How to add bcc for forgot password emails in Magento 2

Please check this function sendEmailTemplate on vendor/magento/module-customer/Model/EmailNotification.php ,and try to override and add BCC email in $bccEmail like below. $transport = $this->...
Harish kuril's user avatar
1 vote
Accepted

Magento2.4.5: How to Products images on order detail page?

you can use Viewmodel for replace object manager. file: Override sales_order_view file. app\code{{vendor}}{{modulename}}\view\adminhtml\layout\sales_order_view.xml <?xml version="1.0"?>...
S.P's user avatar
  • 1,524

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