Ask your Question

Discover our new Professionals

Pawan Singh
Pawan Singh

Software Engineer

new delhi,  India
Sangita
Sangita

SAP Application support

Pune,  India
Hashir
Hashir

Rawalpindi,  Pakistan
Bhuwan
Bhuwan

Intern PHP Developer

Dehradun,  India
Mintu
Mintu

Faridabad,  India

Write to us

Ask Question

Move category programatically from one parent category to other parent category in Magento2

Move category programatically from one parent category to other parent category in Magento2

We have a category on root ie. rings it's child of default cateory, we want to move rings category to  another category i.e Accesories that is also on level2 (child of defualt category).

... Read More

How to Enable Template Path Hints in Magento 2

How to Enable Template Path Hints in Magento 2

How to Enable Template Path Hints in Magento 2

... Read More

Overriding Controller classes in Magento2

Overriding Controller classes in Magento2

To override controller, we need to create a new module in directory app/code/. 

Create directory app/code/Module_Namespace/Module_Name 

e.g. app/code/Letsknowit/Mymodule 

  1. Create file app/code/Letsknowit/Mymodule/registration.php 

 MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    'Letsknowit_Mymodule',
    __DIR__
);

2. Create a folder etc i.e. app/code/Letsknowit/Mymodule/etc 

   Under etc create file di.xml 

   app/code/Letsknowit/Mymodule/etc/di.xml 


    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    

3. Create View.php Controller file in Folder Letsknowit/Mymodule/Controller/Product 

 ie. app/code/Letsknowit/Mymodule/Controller/Product/View.php 

    /**
     *
     * @category    Letsknowit
     * @package     Letsknowit_Mymodule
     *
     */
    namespace LetsknowitMymoduleControllerProduct;
 
    class View extends MagentoCatalogControllerProductView
    {    
        public function execute()
        {
            // We can write our code here
            return parent::execute();
        }
    }

... Read More

Magento2: Indexing through command line

Magento2: Indexing through command line

 Indexing through Terminal or command Line

 
Go to your magento root folder and run the below commnd:
 
 php bin/magento indexer:reindex
 
Result will
 
Category Products index has been rebuilt successfully in <time>
Product Categories index has been rebuilt successfully in <time>
Product Price index has been rebuilt successfully in <time>
Product EAV index has been rebuilt successfully in <time>
Stock index has been rebuilt successfully in <time>
Catalog Rule Product index has been rebuilt successfully in <time>
Catalog Product Rule index has been rebuilt successfully in <time>
Catalog Search index has been rebuilt successfully in <time>
 
To get the indexer information you need to run 
 
 
  php bin/magento indexer:status
  
To view the list of indexers you need to run 
 
  php bin/magento indexer:info

 

... Read More

Magento2 files and folders permission

Magento2 files and folders permission

Below are the permissions needed to run the magento2, execute each command one by one


find . -type f -exec chmod 644 {} \;                      // 644 permission for files

find . -type d -exec chmod 755 {} \;                    // 755 permission for directory

find ./var -type d -exec chmod 777 {} \;             // 777 permission for var folder

find ./pub/media -type d -exec chmod 777 {} \;

find ./pub/static -type d -exec chmod 777 {} \;

chmod 777 ./app/etc

chmod 644 ./app/etc/*.xml

chmod u+x bin/magento

 

... Read More

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site