Redirect by PC or mobile phone access

Just the same domain, using the following code, you can let your computer and mobile phone show different contents. We have to design 2 pages, all named index.php, the first one will be put at your host root, and the other one will be put under wap.
Page 1.
$iswap = isset($_SERVER['HTTP_ACCEPT'])? $_SERVER['HTTP_ACCEPT']:'';
if(strpos($iswap,"wap")>0)
{
@header(”Location: /wap/”);
}

?>




Cheap Prescription Glasses, and Non-Prescription Glasses.


Page 2.





Cheap Prescription Glasses Mobile

Cheap Non-Prescription Glasses Mobile



Live Demo: www.cheapglasses.mobi

How to remove “New Products …, All Products” in Zen Cart main page?

Open tpl_categories.php under include/templates/template_default/siteboxes/

 1. Remove New Products…,

At line 80,

if ($show_this->RecordCount() > 0) {
        $content .= ‘<a class=”category-links” href=”‘ . zen_href_link(FILENAME_PRODUCTS_NEW) . ‘”>’ . CATEGORIES_BOX_HEADING_WHATS_NEW . ‘</a>’ . ‘<br />’ . “\n”;

Change the code to: Read the rest of this entry »

Can’t login to admin after installation of Magento

I am running Vista Home basic system, and I play Xampp, after I have installed Magento, I found I can not login the admin panel.

I found the problem is in Session, magento can not set session and always create it again, that is why logination does not work.

-Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-Find the code, Read the rest of this entry »

Apache HTTP server has stopped working when install Magento

Today I am up to the configuration stage in the Installation of Magento on my own localhost server but when I press continue Iget a message from windows saying ‘apache http server has stopped working, close program’ .

I am install Magento under Xampp 1.7 for windows platform, and I use Vista Home Basic System. Read the rest of this entry »