Admin & Frontend turned 404 Error after website change

Sometime after the magento upgrade , magento shows 404 error for the when we try to access the frontend and admin .
To fix this issue, you can follow 2 steps :

In the index.php page in your root directory change :
Mage::run();
by
Mage::run(’default’);

or

Run the below query , but take the db dabckup before you run the query
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code=’admin’;
UPDATE `core_store_group` SET group_id = 0 WHERE name=’Default’;
UPDATE `core_website` SET website_id = 0 WHERE code=’admin’;
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code=’NOT LOGGED IN’;
SET FOREIGN_KEY_CHECKS=1;

Zend Framework & MVC Introduction

Zend Framework is an open source, object oriented web application framework for PHP 5. Zend Framework is often called a ‘component library’, because it has many loosely coupled components that you can use more or less independently. But Zend Framework also provides an advanced Model-View-Controller (MVC) implementation that can be used to establish a basic structure for your Zend Framework applications. A full list of Zend Framework components along with short descriptions may be found in the » components overview. This QuickStart will introduce you to some of Zend Framework’s most commonly used components, including Zend_Controller, Zend_Layout, Zend_Config, Zend_Db, Zend_Db_Table, Zend_Registry, along with a few view helpers.

Model-View-Controller

mvc architecture

MVC Architecture

Model – This is the part of your application that defines its basic functionality behind a set of abstractions. Data access routines and some business logic can be defined in the model.

View – Views define exactly what is presented to the user. Usually controllers pass data to each view to render in some format. Views will often collect data from the user, as well. This is where you’re likely to find HTML markup in your MVC applications.

Controller – Controllers bind the whole pattern together. They manipulate models, decide which view to display based on the user’s request and other factors, pass along the data that each view will need, or hand off control to another controller entirely.

Upgrade magento to higher version

There are different ways to upgrade magento to higher version. The best approach I find to upgrade is follow the below steps:

1) Take the backup of the current database.
2) Upload the latest magento on the server in a new folder say like “newmagento”
3) Create a separate database say “newdb” and run the sql dump of the current database in that.
4) Point the new database to the latest magento by doing changes in the “local.xml” file.
5) Make the necessary changes in the database table “core_config_data” by changing the base url in the latest database “newdb”
6) Run the url of the new magento url in your browser and let it process unless it shows the magento home page.

This process will upgrade your current site to current magento version.

CCAvenue Payment Module for Magento

As CCAvenue Payment gateway is very much used in India. And E-commerce is coming up in Indian market with rapid pace. Magento is one of the most popular E-commerce open source and its capturing the Indian Market as well . It help us to have the development faster and with advance features .

If you need the CCavenue Payment Module for Magento site I can provide you.
If you have any queries please contact me at:
Email address : surjan.negi@treewalker.in
Skype: treewalker.technologies
Gtalk: treewalker.technologies@gmail.com
Phone: 080-65832315
Mobile: +91-9916024769

Get Table Name in Magento

In magento if you want to have the table name , where you don’t want to hard code the table name with prefix as well .
So access the table name use the below code :
$tableName = Mage::getSingleton(‘core/resource’)->getTableName(‘catalog_product_option’);