Skip to main content
17 votes
Accepted

How is magento 2 better than magento 1?

This question may be opinion based but I'm just going to enlight some results from the offical white paper regarding Magento 2 performance and scalability Test Configuration Magento Enterprise ...
Raphael at Digital Pianism's user avatar
13 votes
Accepted

How to override a Zend class?

There is no "local code pool override" mechanism anymore. Instead you can use preferences in di.xml for any class that is instantiated by the Magento object manager, i.e. used via Dependency Injection ...
Fabian Schmengler's user avatar
12 votes
Accepted

How to use zend_debug:dump in Magento2

You can use simply following way: \Zend_Debug::dump($someVar)
Sohel Rana's user avatar
  • 35.9k
12 votes

Magento 2.4.3: Zend removed?

I guess I was missing laminas/laminas-serializer? I ran: composer require laminas/laminas-serializer --no-update composer update bin/magento setup:upgrade rm -rf var/generation var/view_preprocessed/ ...
Kalvin Klien's user avatar
11 votes
Accepted

what are the zend components using by magento2?

Here's a quick breakdown of the components: All those are from Zend Framework 2: "zendframework/zend-stdlib": "~2.4.6", "zendframework/zend-code": "~2.4.6", "zendframework/zend-server": "...
Raphael at Digital Pianism's user avatar
9 votes
Accepted

Uploading multiple files in custom module does not work in Magento 2

Ok so I got multiple files upload work by using name="review_media[]" as below <input type="file" name="review_media" id="review_media" accept="image/*" multiple="multiple" /> and updated the ...
CodeGenius's user avatar
8 votes
Accepted

Magento 2.3.3 Class 'Zend_Reflection_Class' not found

Please run composer require zf1/zend-exception composer require zf1/zend-reflection I had the same issue and that solved.
xtremprovider's user avatar
7 votes

Magento 2: How to use Zend Date

In Magento2 - Replaced Zend_Date with native PHP DateTime object/functions. So you can use PHP DateTime function in Magento-2 You can get current date by below code. For Example. $currentDate = (...
Suresh Chikani's user avatar
7 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
6 votes
Accepted

How to add custom text fields in Magento 2 admin module page

You can create text boxes on admin page by creating form.php in this path yourvendor/modulename/block/form.php Create _prepareForm() function and in that function define the structure of text boxes ...
Manthan Dave's user avatar
  • 9,826
5 votes
Accepted

Magento Module creation gives error

Giving full permission (775) to var and pub directory after upgrade. Run the command using . chmod -R 775 var pub run php bin/magento setup:di:compile command php bin/magento setup:upgrade clear ...
Manthan Dave's user avatar
  • 9,826
5 votes
Accepted

Replacement of Zend_Barcode in Magento 2.3.x

The Zend_Barcode has not been removed, only upgraded. You can use this class: \Zend\Barcode\Barcode. Associated composer package => zendframework/zend-barcode Best Regards
Raf's user avatar
  • 66
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
4 votes
Accepted

->order('v.entity_id IS NULL') gets translated incorrectly

Please try with: ->order(new Zend_Db_Expr('v.entity_id IS NULL'));
michael's user avatar
  • 2,770
4 votes

How is magento 2 better than magento 1?

Magento 2.0 can be differentiated from its earlier version and has many unique features which can be listed as below: Compatibility with Popular Platforms like MSSQL and Oracle. Enhancement in ...
CedCommerce's user avatar
4 votes
Accepted

Can't find function iconv_strpos after server migration

That means iconv PHP extension is off. Did you setup your server yourself? Contact hosting and tell them to install iconv for you.
Konstantin Gerasimov's user avatar
4 votes
Accepted

How to get the current time for a specific timezone?

$now = new DateTime(); $now->setTimezone(new DateTimezone('Europe/Copenhagen')); echo $now->format('Y-m-d H:i:s');
PЯINCƎ's user avatar
  • 11.7k
4 votes
Accepted

Magento 1.9 Override zend lib xml file?

To alter a locale file without directly editing the library, copy the files to the local code pool and edit the copy: Make a directory : app/code/local/Zend/Locale/ Copy Data.php file from : lib/...
Nisha Jangid's user avatar
4 votes
Accepted

Magento 2.4.3: Zend removed?

That's because Magento removed some laminas packages. You can see the difference between the 2.4.2 version of the composer.json and the 2.4.3 one. Not sure why they did it tho. You can fix this by ...
Vincent Marmiesse's user avatar
3 votes

How to use Union query in a Magento 2 collection

This is problem with getting count form the union query i referred the following link and fixed the issue. https://stackoverflow.com/questions/11731655/how-to-do-a-count-on-a-union-query https://...
Krishnan Daiva's user avatar
3 votes
Accepted

How to update multiple rows of a table in a single query?

Your best bet is likely to use an insert query with the ON DUPLICATE KEY UPDATE command, like this: INSERT INTO `cataloginventory_stock_item` (item_id, qty, is_in_stock) VALUES (1, 1, 1), /*...
tjons's user avatar
  • 1,831
3 votes

Should I be worried about the latest Zend-Mail RCE Vulnerability similar to the PHP-Mailer/Swift Mailer Vulnerability if I use Magento?

Yes, you should be worried about this. Magento also published a post on their security center, describing a temporary workaround until they released a patch: https://magento.com/security/news/new-zend-...
Aad Mathijssen's user avatar
3 votes
Accepted

How to get current local time with Zend

Figured out a way myself! $time = new Zend_Date(Mage::getModel('core/date')->timestamp()); $day_number = $time->get(Zend_Date::WEEKDAY_DIGIT); $current_time = $time->get(Zend_Date::...
Metal Mathematician's user avatar
3 votes

Magento 2.1.9 upgrade to 2.2.0 - Error on setup:upgrade with Magento_Sales table

I had a similar issue: Error converting field `info` in table `magento_logging_event` where `log_id`=3 using Magento\Logging\Setup\ObjectConverter. Turned out that a long serialized value in ...
Fabian Schmengler's user avatar
3 votes

Magento 2.1.9 upgrade to 2.2.0 - Error on setup:upgrade with Magento_Sales table

Setting the field contents to NULL solved my issue. UPDATE `sales_order_item` SET `product_options` = NULL WHERE `product_options` = ''; UPDATE `sales_order_payment` SET `additional_information` = ...
PG Sutariya's user avatar
3 votes
Accepted

magento2 registration php

To register the module, you need to create a registration.php file with the following content: app/code/[VendorName]/[ModuleName]/registration.php <?php \Magento\Framework\Component\...
Pratik Oza's user avatar
  • 3,992
3 votes
Accepted

What to replace deprecated Class 'Zend_Rest_Client' with in Magento 2.3?

You are correct in that Magento deprecated the Zend_Rest module and a bunch of others. You can find a full list here https://devdocs.magento.com/guides/v2.3/release-notes/backward-incompatible-changes/...
Sam's user avatar
  • 1,910
3 votes

Update composer zendframework packages to laminas

Zend Framework has been outdated however Magento 2.3.4 still references Zend Framework rather than swapping to the now supported Laminas Framework. There's nothing for you to do here, better to wait ...
Max's user avatar
  • 63
3 votes

Magento2 write updated query using connection & Zend format

Try below code $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager $resource = $objectManager->get('Magento\Framework\App\...
Jinesh's user avatar
  • 266
3 votes
Accepted

Zend_Mail function not working in magento 2

I recommend you use magento logic to send mail https://github.com/DominicWatts/ReviewReminder/blob/d048dbf0ec436f84be89b2f497eecceb1df3a79d/Helper/Order.php#L551-L600 /** * Send transactional ...
Dominic Pixie's user avatar

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