Magento 2 Invoice addComment() error
In Magento 2.4.8, calling Invoice::getComments() before Invoice::addComment() can cause a fatal Call to a member function addItem() on array error due to inconsistent handling of the comments data key.
In Magento 2.4.8, calling Invoice::getComments() before Invoice::addComment() can cause a fatal Call to a member function addItem() on array error due to inconsistent handling of the comments data key.
While working in a local dev environment using Docker, I’ve had Magento 2 missing setup folder from time to time, on environments using Warden or SwiftOtter/Den. Also found reports that it happens using ddev. The most common situation is when switching between branches having different magento2 versions, therefore having different magento2-base module versions. This is…
If you recently stopped receiving emails from your Magento 1.x shop and you are using an Office 365 SMTP account configured in Aschroder SMTP Pro extension, then you might find this in your logs: ==> var/log/system.log <== Warning: stream_socket_enable_crypto(): SSL: Success in /home/cbeauty/public_html/lib/Zend/Mail/Protocol/Smtp.php on line 206 ==> var/log/exception.log <==ERR (3): Zend_Mail_Protocol_Exception: Unable to connect via…
Clone from your repository, importing your database and setting up to go live Creating a new vanilla Magento 2.3 instance in AWS LightSail is pretty easy and straightforward, with just a few clicks you can have your Magento 2 shop up and running, but deploying your already made Magento 2 from your repository, importing your…
One reason for this, other than the ones already mentioned in the numerous stackexchange posts, can be having an incorrectly referenced resource loading on the current page, which causes the regeneration of the captcha in session, without refreshing the frontend shown captcha image. For example, I was having a JS file referencing an image, which…
After Porto theme removal (which includes Smartwave Megamenu), when accessing Categories page in the backend, you get an error report which contains: This is because the extension added new category attributes that reference source models which have been removed. To solve it, first DO A BACKUP of the database, then run this query to see…
Magento 1.x custom customer attribute not visible in REST API2 Attributes ACL, while custom customer address attribute is visible. To debug why attribute does not show up on the ACL from REST Attributes page in Magento backend, we need to look at b/app/code/core/Mage/Api2/Model/Resource.php in getEavAttributes() method. You can log here and see why it gets…
Insert attribute option and return option id in Magento 1.x This article presents three methods to add attribute options in a loop and return the inserted option_id correctly. If you do this in a loop to add the options, you may find out that if you just try to getOptionId($value) on the attribute will return…
The Hardware Recommendations Macbook Pro 15″ Anything between 2012-2015 will perform good with a Quad Core CPU (i7) and 16GB of RAM. Regarding the latest 2016 model, you can find out why MacBook Pro 2016 isn’t loved by developers .. yet. Please comment if this turns out as an advantage in the end, but I doubt..…
This error message is caused by a Magento 1.x bug that has always been there (at least up to current 1.9.3.1 version), but few gave it attention or observed it. I explained it in detail here: http://stackoverflow.com/a/41490292/1470684
If you are using MINGW64 Git Bash and getting escaped character codes like ←[32m, ←[39m, ←[33m, ←[34m, ←[37m in the output of Symfony app/console, do this to fix the display: MINGW64 > Options > Terminal > Type Change xterm to xterm-256color Restart MINGW64 Same issue is discussed here, regarding Laravel Artisan Console character codes…
Add Custom Javascript to Sales Order Create This is a simple example of how you can add a JS file to the Sales Order Create page. Ofcourse, you can take it further and add css and other custom content. For this, to follow best practices, you’ll have to create your own module if you don’t have…
Magento custom block Ajax in adminhtml Adding a custom ajax loading block to Magento admin sales order create process As to not overload the create order process with a lot of AJAX, you can use the already mighty powers Magento comes with. There is a function defined in sales.js, that allows reloading many blocks at…
Copy this file: \lib\Varien\Data\Form\Element\Date.php to the local code pool: app/code/local/Varien\Data\Form\Element\Date.php Now you can customize the calendar setup. To add an option for disabling past dates, change getElementHtml() function as below: Then, in your blocks, when adding a date field, you can specify in the addField options array: If you want to change the align of…