Go to /pub/errors/ Rename local.xml.sample into local.xml
css not loading after Magento 2 installation
sudo a2enmod rewrite sudo service apache2 restart
Adding Store Email Addresses to Magento 1 | Magento. How to edit store emails
Magento 1.6 uses three pre-defined email addresses in certain situations. By default, you can specify the General Contact, Sales Representative, and Customer Support email addresses. Each address has the default sender name and email address when you initially install your store. You’ll want to update these to your own email addresses during the configuration of […]
Someone logged into this account from another device or browser. Your current session is terminated | Magento 2 Admin session problem
Go to Admin > Stores > Configuration > Advance > Admin > Security Set “Admin Account Sharing” to Yes
simple Controller not working with Magento2
Run the following code to fix the issue.. sudo -u www-data php bin/magento setup:di:compile
Magento2 No Payment methods showing in Frontend
If you are using custom theme, and have override the file checkout_index_index.xml, then comment the file or remove it to fix the problem. design/frontend/(Name_Space)/(Theme_Name)/Magento_Checkout/layout/override/base/checkout_index_index.xml
How to remove page title (h1) from home page, cms_index_index.xml not working
Create a cms_index_index.xml file in “/app/design/frontend/(vendor)/(theme)/Magento_Theme/layout” and paste the following code – <?xml version=”1.0″?> <!– /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ –> <page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” layout=”1column” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceBlock name=”page.main.title” remove=”true” /> </body> </page> For all other Pages create cms_page_view.xml and use the same code
Override Login Page Title | How to change Customer Login Title in magento 2?
Create a customer_account_login.xml file to change title of customer login For theme – app/design/frontend/{Packagename}/{themename}/Magento_Customer/layout/customer_account_login.xml For module – app/code/{Package}/{Module}/view/frontend/layout/customer_account_login.xml Add the following line in the xml file – <referenceBlock name=”page.main.title”> <action method=”setPageTitle”> <argument translate=”true” name=”title” xsi:type=”string”>LOGIN OR CREATE AN ACCOUNT (Your Custom Title)</argument> </action> </referenceBlock>
How to Clear Magento 2 Cache ?
bin/magento cache:flush
How to enable Developer Mode in Magento 2 | How do I set Developer Mode ?
Change to production mode bin/magento deploy:mode:set production Change to developer mode bin/magento deploy:mode:set developer Another way Goto app/etc/ and open env.php Change current mode MAGE_MODE’ => ‘default’ to MAGE_MODE’ => ‘developer’
delete duplicate simple product with same attribute from a configurable product in CSV
Import configurable csv to a mysql database table then try to use bellow sql query which give you the duplicate simple product with same attribute values. delete from `table_1` where sku in ( select sku from ( SELECT `sku` FROM `table_1` Group BY `orientatie`,`material`,`papier`,`paginas`,`paper_type_cover`,`veredeling_omslag`,`levertijd`,`aantal` Having COUNT(*) > 1 ) t )
Configurable product has duplicate simple product with same attribute or not check
Import configurable csv to a mysql database table then try to use bellow sql query which give you the duplicate simple product with same attribute values. SELECT `sku`,count(*) as C FROM `table_1` Group BY `orientatie`,`material`,`papier`,`paginas`,`paper_type_cover`,`veredeling_omslag`,`levertijd`,`aantal` Having COUNT(*) > 1
How To Install Magento 2 On Ubuntu 18.04 | How to install Magento 2 with Sample Data
apt-get update #Install the server. apt-get install apache2 #Install PHP 7.2 and the required extensions: add-apt-repository ppa:ondrej/php apt-get update apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-xsl php7.2-mbstring php7.2-zip php7.2-bcmath php7.2-soap php-xdebug php-imagick php -v sudo subl /etc/php/7.2/apache2/php.ini Update the following options there.. memory_limit = 2G max_execution_time = 3600 max_input_time = 1800 upload_max_filesize […]
Locate templates in Magento 2 | How to Enable Template Path Hints in Magento 2
To enable template path hints in Magento 2 follow these steps: 1. Make sure your Magento 2 is in the default or developer mode (How to enable Developer Mode in Magento 2). 2. Go to Admin Panel > Stores > Settings > Configuration > Advanced > Developer > Debug.
Get base URL and current URL in the template file
$block->getUrl(‘hello/test’); $block->getBaseUrl();
Magento 2 not working after the command bin/magento setup:di:compile | Permission change after setup:upgrade | Magento 2 | Apache2 | Ubuntu | PHP 7.2
Always use update-upgrade commands the following way – sudo -u www-data php bin/magento setup:upgrade
Fixing: Failed to Load Resources Error After Installing Magento 2 | XAMPP | WINDOWS 10
Go to – “D:\xampp\htdocs\mage2\vendor\magento\framework\View\Element\Template\File\”. Open The file name Validator.php Search for “$this->fileDriver->getRealPath“, you will find the similar code. Replace them with it accordingly. Basically add a php function to replace ‘\\’ with ‘\’. strpos( str_replace( ‘\\’,’/’,$this->fileDriver->getRealPath($path) ), $directory ) Clear caches of Magento 2. Go to following paths and delete everything: Installation root folder / var […]
Display Position on List page Magento 1x
If you want to display Category product position on list.phtml please add bellow code for test it
Refused to apply style because its MIME type (‘text/html’) is not a supported stylesheet MIME type
After installtion magento 2 you can see a error like MIME type not supported. To fix this: Use 2 comment: php bin/magento setup:static-content:deploy -f -s standard php bin/magento cache:clean *** Exception: If you use xampp server and you see “Xampp Warning: Module ‘openssl’ already loaded in line 0” Please visit this link for solve this […]
How to Filter Products Based on Attribute Value & Attribute set | magento | Magento 1.9
You can follow the code : <?php ob_start(); ini_set(‘max_execution_time’, 0); set_time_limit(0); ignore_user_abort(true); require_once ‘/chroot/home/powerme1/powermedicalsupplies.com/html/app/Mage.php’; Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $_write = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $_read = Mage::getSingleton(‘core/resource’)->getConnection(‘core_read’); $collection = Mage::getModel(‘catalog/product’)->getCollection()->addAttributeToFilter(‘attribute_set_id’,9)->addAttributeToFilter(‘brand’, array(‘eq’ => 1674)); foreach($collection as $_product): $_product = $_product->load($_product->getId()); echo $_product->getSku() . ‘ >>> ‘ . $_product->getUpc() .'<br>’; endforeach; echo ‘<hr />’; $collection = Mage::getModel(‘catalog/product’)->getCollection()->addAttributeToFilter(‘attribute_set_id’,9)->addAttributeToFilter(‘brand’, array(‘eq’ => 1853)); foreach($collection as $_product): […]