You created several checkout agreements in your Magento 2 store, but as soon as you choose PayPal as payment method in the checkout, it just won’t accept those agreements? Instead, a validation error is returned whether or not the agreement…
Disable maintenance mode for certain IP (Magento 2)
With Magento 2 it is possible to disable the maintenance mode for only a certain IP. Disabling the Magento 2 maintenance mode for your IP lets you browse the frontend and admin area as normal. All other visitors will still…
Testing the success page (Magento 2)
Want to test the Magento 2 success page after making some changes there without placing many orders in your Magento 2 store? By changing the following code in vendor/magento/module-checkout/Controller/Onepage/Success.php you only have to place one order. So look for the…
Deactivate / bypass maintenance mode for IP (Magento 2)
When working on your Magento 2 shop it is always a good idea to put it in maintenance mode. The only problem with this approach is that nobody, not even you :), can now work with the store. To bypass…
Reindex URL rewrites (Magento 2)
The URL rewrites of Magento 2 will not be reindexed when rebuilding the index via command line. I recommend using https://github.com/olegkoval/magento2-regenerate_url_rewrites to include the reindex of URL rewrites on the shell. This Magento 2 extensions allows for reindexing all URL…
Creating database backup on command line (Magento 2)
The following shell command (executed from your Magento 2 root folder) allows you to create a database backup of your Magento 2 store.
1 |
php bin/magento setup:backup --db |
Show address data (like company, name) on registration form (Magento 2)
By default, the Magento 2 registration form does not show address data such as the company, name or street. To change that, simply create customer_account_create.xml in the folder app/design/Your Vendor/Your Theme/Magento_Customer/layout and add the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="customer_form_register"> <arguments> <argument name="show_address_fields" xsi:type="string">1</argument> </arguments> </referenceBlock> </body> </page> |
Now just clear…
Product images missing on category page (Magento 2)
If the product images are missing after an upgrade for example, the following command (executed in the root of your Magento 2 shop) might help: php magento catalog:images:resize Note: Depending on the mumber of products, that might run some time.
Solving the “Required parameter ‘theme_dir’ was not passed” error (Magento 2)
The Required parameter ‘theme_dir’ was not passed is most likely caused by an invalid theme table in your database. Solution: Open the theme table and delete all rows that refer to a theme that does not exist.
Fatal error: Only variables can be passed by reference in search.phtml (Magento 2)
Do you get the Fatal error: Only variables can be passed by reference in vendor/magento/module-backend/view/adminhtml/templates/system/search.phtml error in your Magento 2 store when calling the backend? To fix that issue, simply deactivate asp_tags in your php.ini. After that, the Magento 2…