Magento 2 Solutions

  • How To Install Magento 2 Extension Using Web Setup Wizard

    Download extension and move folders from archive to <your Magento install dir> < Magento Root >/app/ directory.

    Login to your Magento 2 Admin Panel.
    1. Go To System -> Web Setup Wizard. you will get following screen.
      • Magento Admin Menu
    2. Click On the component manager.
      • Component Manager
    3. Enable / Disable Module Using Component Manager. Here is the list of component which are currently available in your store and find your component which you want to enable / disable.
      • manage_module
    4. Readiness Check Error : You need to check your server configurations with your magento version using the following links and make changes as per the magento requirements.
      Step 1: Readiness Check
      Cron Job Error
      • Follow below steps for fixing check cron scripts issue:

        You need to setup cron job for every one minute on the server using the following steps.

        • Open Terminal /command prompt and change directory to your magento root directory.
        • To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:

        crontab -u magento_user -e

        You need to setup following command into your cron tab file.

        • * * * * * path to php binary -c path to php.ini file magento install dir/bin/magento cron:run | grep -v "Ran jobs by schedule" >> magento install dir/var/log/magento.cron.log
        • * * * * * path to php binary -c path to php.ini file magento install dir/update/cron.php >> magento install dir/var/log/update.cron.log
        • * * * * * path to php binary -c path to php.ini file magento install dir/bin/magento setup:cron:run >> magento install dir/var/log/setup.cron.log

        path to php binary : which php

        path to php.ini : php --ini

        magento install dir : is the directory in which you installed the Magento software; for example, /var/www

      • Follow below steps for fixing PHP Setting Check * :
        • For fix this issue you need to make changes in the php.ini file as per explain in the following link and restart your server.Required PHP settings
        • Note : When you change in the php.ini file and getting same error then need to pass php master variable value in the command like following.

        Example : Here we setup always_populate_raw_post_data=-1 using following command in the cron job.

        • * * * * * path to php binary -d always_populate_raw_post_data=-1 -c path to php.ini file magento install dir/bin/magento cron:run | grep -v "Ran jobs by schedule" >> magento install dir/var/log/magento.cron.log
        • * * * * * path to php binary -d always_populate_raw_post_data=-1 -c path to php.ini file magento install dir/update/cron.php >> magento install dir/var/log/update.cron.log
        • * * * * * path to php binary -d always_populate_raw_post_data=-1 -c path to php.ini file magento install dir/bin/magento setup:cron:run >> magento install dir/var/log/setup.cron.log
      • Now your Readiness Check is completed so please check it.

      Readiness Check Completed
      Step 2: Create Backup : You will able to take backup by selecting backup options which you want to take before installing the module.
      Back Up Selection Selection_149
      Step 3: Enable Module

      Enable Module When you click on the Enable Module button then it will take time and after then it will show process like following. Selection_150 Selection_151 Once Module Install Successfully then it will redirect to the Success Page. Module Successfully Install

    5. Once Installation is completed then it will show component in the component manager list. Component manager

  • How To Install Magento Security Patch SUPEE-8788

    The patch addresses following:

    1. Zend framework and payment vulnerabilities
    2. Ensures sessions are invalidated after a user logs out
    3. Makes several other security enhancements


    First of all you need to check out that old patches had been installed correctly or not. In magento patches depend on the other older patches, so you need to check which patches have been install in your site using any of the following methods.

    1. Scan your site at : MageReport
    2. Scan your site at :MageScan
    3. Following file lists off all currently applied patches which are applied using ssh.

      Open <your Magento install dir> < Magento Root >/app/etc/applied.patches.

    Installation Process :

    1. Please Disable Magento Compiler at System > Configuration > Tools > Magento Compiler and clear compiled cache.
    2. NOTE: if you have installed 8788v1 of the patch, it is recommended to do the following:

      Before Apply 8788v2 Patch:

      • Revert SUPEE 8788 v1 (if installed)
      • Revert SUPEE 1533 (if installed)
      • install SUPEE 3941 (if not installed)
      • install SUPEE 8788 v2

     



    Using SSH :

    Step 1: Please make sure to download the patch according to your magento verstion , download patches from https://www.magentocommerce.com/products/downloads/magento/ .

    Step 2: Upload downloaded file at your magento root directory using FTP/Cpanel.

    Step 3: Now Login in the SSH server then go to magento root directory.

    Step 4: Run Patch in your ssh terminal using following command from your magento root directory.

    For Apply Patch:

    SH PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh

    Revert Patch:

    SH PATCH_SUPEE-8788_CE_1.9.2.4_v2-2016-10-14-09-42-47.sh -R;

    Step 5: Now, clear the cache and enable compilation.

    Possible Issues :

    1. Make sure you haven’t deleted or renamed the “Downloader” directory else the patch installation will fail as it patches a file within the downloader directory. The best solution is to restore the directory, apply patch and rename Downloader folder again.
    2. Skipping patch.

      1 out of 1 hunk ignored -- saving rejects to file skin/adminhtml/default/default/media/flex.swf.rej

      patching file skin/adminhtml/default/default/media/uploader.swf

      Reversed (or previously applied) patch detected! Assume -R? [n]

      Apply anyway? [n]

      Skipping patch.

      1 out of 1 hunk ignored -- saving rejects to file skin/adminhtml/default/default/media/uploader.swf.rej

      patching file skin/adminhtml/default/default/media/uploaderSingle.swf

      Reversed (or previously applied) patch detected! Assume -R? [n]

      Apply anyway? [n]

      Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file skin/adminhtml/default/default/media/uploaderSingle.swf.rej

      The 8788 patch contains binary content. As Magento does not provide any direct download links, you have to download the patch to your computer and upload it with an file-transfer application to your server.

      Solution: We need to set transfer type to binary when using FileZilla to upload the .sh patch file to your Magento root.




    With Out SSH

    Download the zip file for the patch installation and then upload that files at your magento root directory.

    Magento version SUPEE-8788
    Magento 1.9.2.4 patch_supee-8788_ce_1-9-2-4_v2
    Magento 1.9.2.3 patch_supee-8788_ce_1-9-2-3_v2
    Magento 1.9.2.1 patch_supee-8788_ce_1-9-2-1_v2
    Magento 1.9.1.1 patch_supee-8788_ce_1-9-1-1_v2
    Magento 1.9.0.1 patch_supee-8788_ce_1-9-0-1_v2
    Magento 1.8.0.1 patch_supee-8788_ce_1-8-1-0_v2
    Magento 1.7.0.2 patch_supee-8788_ce_1-7-0-2_v2

     

    Delete all files under media skin\adminhtml\default\default\media

    1. < Magento Root >/skin/adminhtml/default/default/media/flex.swf
    2. < Magento Root >/skin/adminhtml/default/default/media/uploader.swf
    3. < Magento Root >/skin/adminhtml/default/default/media/uploaderSingle.swf


    Also checks for the following files that have been modified:

    1. < Magento Root >/js/mage/adminhtml/uploader/instance.js
    2. < Magento Root >/skin/adminhtml/default/default/boxes.css



    Check following after install patch:

    • Check all CMS, Shipping, Payment and landing pages are loading correctly without any issues.
    • Magento security patch SUPEE 8788 affects the page sessions, CMS, file upload, admin pages and downloadable products.
  • Useful commands for Magento 2

    Below are some useful commands for Magento 2

    All magento 2 commands has to be executed from magento project root directory

    1. For Re-indexing

    php bin/magento indexer:reindex

    2. For Flushing Cache

    php bin/magento cache:flush

    3. For Cleaning Cache

    php bin/magento cache:clean

    4. For Compilation

    php bin/magento setup:di:compile

    5. For Upgrading: This command is very useful as if you make any changes/install/set up magento module you will have to execute this command. Once this command execution completes, this will ask to re-run complilation command.

    php bin/magento setup:upgrade

    6. To check Magento Mode:: production/default OR developer

    php bin/magento deploy:mode:show
    php bin/magento deploy:mode:set developer
    php bin/magento deploy:mode:set production
    Please refer below articles for other commands and details of production/developer mode >> http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-mode.html >> http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-static-view.html

    7. To check Magento Module Status

    php bin/magento module:status

    8. For Static content deployment

    php bin/magento setup:static-content:deploy

  • How to install Magento 2

    This article gives you brief on how to install Magento 2 via Composer | Command line

    Just to note that i am installing Magento 2 on Ubuntu 14.04 LTS on xampp server

    PHP ver. 5.6 MySql ver. 5

    Step 1 : Setup/Install Composer.

    The first question comes into mind is what is Composer? I will answer this briefly...

    "Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you."

    To get in depth detail on Composer please visit this link https://getcomposer.org/doc/00-intro.md

    To install composer in your system, you will have to execute below command in terminal

    sudo wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar
    Step 2 : Then make the composer file executable
    sudo chmod +x /usr/local/bin/composer
    Step 3 : Download Magento 2 from repository using composer.
    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2/
    NOTE: This above command will ask you for username and password of repository account, for this you will have to create account in magento connect and create secure key(username/password). The above command will download latest version of magento in magento2 directory. The above command will also ask you to save the authorization key(username/password of repository) in magento var directory, this may be helpfull for future magento upgrade, if you save the authorization key then this will not ask you for username/password during magento upgrades.

    Step 4 : Check PHP and path settings.

    it is assumed that you have already configured PHP to use as command line, but just in case you would like to check whehter your PHP is configured to use as command Line then execute below command in terminal

    php -v
    The above command will show the version of PHP install in your system.

    Step 5 : Installing Magento 2.

    All magento related command has to be executed from magento project root directory, in our case it is "magento2" directory.

    php -f bin/magento setup:install --base-url=http://localhost/magento2/ --db-host=localhost --db-name=dev_magento2 --db-user=dev_magento2 --db-password=S8s8RF2bnmWDSmxa --admin-firstname=Local --admin-lastname=Admin --admin-email=admin@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago
    OR
    php -f bin/magento setup:install --base-url=http://localhost/magento2/ --db-host=127.0.0.1 --db-name=dev_magento2 --db-user=dev_magento2 --db-password=S8s8RF2bnmWDSmxa --admin-firstname=Local --admin-lastname=Admin --admin-email=admin@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago
    Please make sure to change the values of below options in above commands as per your local set up >>

    --base-url --db-host --db-name --db-user --db-password --admin-firstname --admin-lastname --admin-email --admin-user --admin-password --language --currency --timezone

    NOTE: Once installation completes, it will give you magento admin url, you can save it OR you can get/change magento admin url from app/etc/env.php

    Step 6 : Installing sample data

    Below command will download sample data.

    php bin/magento sampledata:deploy
    Below command will install sample data
    php bin/magento setup:upgrade
    Once sample data installation completes it may give you a message – “Please re-run Magento compile command”, so please execute following command in terminal:
    php bin/magento setup:di:compile

    if you face any memory limit issue, then please run below commands for upgrade and compilation

    php -d memory_limit=-1 bin/magento setup:upgrade
    php -d memory_limit=-1 bin/magento setup:di:compile

    For any further details on installing Magento 2 please refer: http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html

  • Solved: Magento 2 admin url gives error

    Solved: Magento 2 admin url gives error - Class Magento\Authorization\Model\RoleFactory does not exist

    This is most likely issue of var/generation directory, so apply below fixes, this may solve your admin login issue...

    1) Clear var/generation directory
    2) Check ownership and permission of var/generation directory

5 Item(s)