Just another WordPress.com weblog

Archive for June, 2010

Magento : change admin URL …

Hello all..

if you want to change ADMIN url.. just like

http://www.domain.com/admin to
http://www.domain.com/NewName….

juct change this…
in local.xml from app/etc folder..
Please contact us
to ::

Thanks…..
Vishal Surani

GZip Compression is helpful to speedup magento

One of the drawbacks of Magento is currently its speed if default configuration is used. There are certain ways of making it run faster. The best one is to enable GZip compression by changing .htaccess file a little. You just need to uncomment part of the code. In my case, the speed increase was exactly 235%.

Find the following lines in your Magento .htaccess file and replace them with the following code.


############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

And also uncomment below line:

############################################
## enable resulting html compression

php_flag zlib.output_compression on

..
then also ..
if gZip compression is not enable put this in index.php at top of the file

if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start();

Thanks,
Bijal Bhavsar 🙂

Product save() not working.Giving Fatal Error

While saving product

$product->save();

If u get Fatal Error: Uncaught exception ‘Exception’ with message …

Than just put below code in your file and try to set store id:

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

This will solve your problem and will work like charm..

If this post will be helpful to you don’t forget to comment on this post.

– Meghna Vora

Magento : Get Current Category – Category Id

$layer = Mage::getSingleton(‘catalog/layer’);
$_category = $layer->getCurrentCategory();
$currentCategoryId= $_category->getId();

vishal surani

Products not showing in category view in magento 1.4.0.1

3 Steps to solve this bug of magento 1.4.0.1 version
Step1
Transfer project in new server this bug occurs.

Update database ::
Next four records MUST HAVE id = 0 (zero) in primary key field:
core_store.code=\’admin\’
core_website.code=\’admin\’
core_store_group.name=\’Default\’
customer_group.customer_group_code=\’NOT LOGGED IN\’

If step 1 is not helpful than go to step2

Step2:

Reindexing catalog from admin panel
But here there is problem of reindexing catalog search table and prices
So to solve this issue

truncate catalogsearch_fulltext;

And run below code once:

$process = Mage::getModel(’index/process’)->load(7);
$process->reindexAll();

I hope this will help to solve product not showing bug

Thanks,
Bijal Bhavsar 🙂