working on it ...

Filters

Explore Public Snippets

Sort by

Found 4 snippets matching: magento1.x

    public by shebin512  5135  1  8  1

    Magento get current controller ,current module , current action and route name

    Magento get current controller ,current module , current action and route name
    <?php
    
    /*
     *Magento get current controller ,current module , current action and route name
     */
    
    //1 . controller name
    Mage::app()->getRequest()->getControllerName();// will return controller name
    
    //2. action name
    Mage::app()->getRequest()->getActionName();//will return action name
    
    //3. module name
    Mage::app()->getRequest()->getModuleName();// will return module name
    
    //4. routes name
    Mage::app()->getRequest()->getRouteName();//will return routes name            

    public by shebin512  3047  1  5  0

    Bash Script to clean magento 1.x Cache

    Magento 1.x cache clean Bash script. 1. Save the code in "/path/of/the/file/.sh" 2. Give executable permission for the file "chmod a+x /path/of/the/file/.sh" 3. Run the script from your magento document root like $ /path/of/the/file/.sh
    #!/bin/bash 
    # author Shebin Sheikh
    
    # function to remove the magento cache.
    function mageCacheClear {
    
    	local current_dir=$(pwd);
    	#echo $current_dir
    	#exit
    
    	if [[ -f "$current_dir/app/Mage.php" ]]; then
    		#echo "Inside Mage Doc root"
    		rm -vrf var/{cache,full_page_cache}/ media/{js,css}/
    	else
    		echo -e "Not inside A magento 1.X's document root!"
    		exit $?
    	fi
    
    }
    
    mageCacheClear # call the function

    external by Ben McManus  126  0  2  0

    Magento1.X PATCH requirements

    Magento1.X PATCH requirements: link.txt
    https://docs.google.com/spreadsheets/d/1MTbU9Bq130zrrsJwLIB9d8qnGfYZnkm4jBlfNaBF19M/edit?pli=1#gid=0
    
    https://twitter.com/benmarks/status/619153980699099136
    
    Nice one https://twitter.com/knowj !!!
    
    

    external by Kousuke Ishikawa  139  0  2  0

    Magento1.x向け Nginx用設定ファイル(*ソースはネット上から)

    Magento1.x向け Nginx用設定ファイル(*ソースはネット上から): magento.conf
    server {
        listen 80 default;
        rewrite_log on;     
        
        server_name www.hogehoge.com;
        root /var/www/vhosts/www.hogehoge.com;
    
        location / {
          rewrite ^/index.html /ec redirect;
        }
          
        location /ec {
            index index.html index.php; ## Allow a static html file to be shown first
            try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
            expires 30d; ## Assume all files are cachable
        }
      
        ## These locations would be hidden by .htaccess normally
        location ^~ /app/                { deny all; }
        location ^~ /includes/           { deny all; }
        location ^~ /lib/                { deny all; }
        location ^~ /media/downloadable/ { deny all; }
        location ^~ /pkginfo/            { deny all; }
        location ^~ /report/config.xml   { deny all; }
        location ^~ /var/                { deny all; }
      
        location /var/export/ { ## Allow admins only to view export folder
            auth_basic           "Restricted"; ## Message shown in login window
            auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
            autoindex            on;
        }
      
        location  /. { ## Disable .htaccess and other hidden files
            return 404;
        }
      
        location @handler { ## Magento uses a common front handler
            rewrite / /ec/index.php;
        }
      
        location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
            rewrite ^(.*.php)/ $1 last;
        }
      
        location ~ .php$ { ## Execute PHP scripts
            if (!-e $request_filename) { rewrite / /ec/index.php last; } ## Catch 404s that try_files miss
      
            expires        off; ## Do not cache dynamic content
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param  HTTPS $fastcgi_https;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  MAGE_RUN_CODE default; ## Store code is defined in administration > Configuration > Manage Stores
            fastcgi_param  MAGE_RUN_TYPE store;
            include        fastcgi_params; ## See /etc/nginx/fastcgi_params
        }
    
     
        location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
            rewrite ^(.*.php)/ $1 last; 
        }
     
     
        location ~ .php$ { ## Execute PHP scripts
            if (!-e $request_filename) { rewrite / /ec/index.php last; } ## Catch 404s that try_files miss
            expires        off; ## Do not cache dynamic content
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param  HTTPS $fastcgi_https;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  MAGE_RUN_CODE default; 
            fastcgi_param  MAGE_RUN_TYPE store;
            include  fastcgi_params; ## See /etc/nginx/fastcgi_params
        }
    }
    
    
    

    List Complete ( 4 snippets total )

    • Public Snippets
    • Channels Snippets