Magento 2 missing setup folder

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…

Magento 1.9.x SMTP Pro Office365 SSL TLS version problem

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…

Magento Calendar customizations

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…

Redirect to previous page after login in Magento

Magento Redirect to previous page after login Default behaviour in Magento is to redirect to homepage after the user logs in. There is also a configuration item in Customer Configuration that states: ‘Redirect Customer to Account Dashboard after Logging in’, and can be set to Yes/No. Also there are some login redirect extensions freely available.…

Add custom attribute with validation using setup script

Custom attributes can be added through Magento Admin Panel > Catalog > Attributes > Manage Attributes , but you can also add attributes through the SQL setup file of your module. Example List of allowed parameters for attributes Extracted from Mage_Eav_Model_Entity_Setup::addAttribute: entity_type_id attribute_code backend_model backend_type backend_table frontend_model frontend_input frontend_input_renderer frontend_label frontend_class source_model is_global is_visible is_required…

Amasty Address Attributes Magento Extension Bug

Amasty Address Attributes Notice Bug Using Amasty Attributes to add Address attributes, the following error occurs after first save of Titles/Labels: Notice: Array to string conversion in /home/company/project/site/web/ app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml on line 46 #0 …/app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml(46): mageCoreErrorHandler(8, ‘Array to string conversion’, ‘…/app/design/adminhtml/default/default/template/ amaddressattr/attribute/options.phtml’, 46, Array) Test system configuration Magento CE 1.7.0.2 Amasty Address Attributes 1.0.1 Quick…