Wednesday, December 21, 2011

Magento Speed Boost Up with Nitrogento

Speeding up in magento is most important key factor. Every Merchant needs that there site should run as fast so that user may not leave there site.
Nitrogento will help to boost up the performance of the Magento store

Features of Nitrogento
  • Full Page Cache for Community Edition
  • Bloc caching of 8 new entries (footer, etc.)
  • Custom bloc cache:put your block in cache
  • Auto Sprite & theme patching
  • Auto deployment of CDN & theme patching
  • Minify & Compression of JS and CSS
  • Htaccess settings (activate browser cache)
  • Simple use: setup & controlled from B.O
So get a free trail version of Nitrogento and then check your result   

Magento Easy Tabs

Now adding the tabs in your theme became easy
The new Magento easy tabs will help you to add the tabs directly through admin
Download Extension key from here.

Note:It will override your catalog related files for example view.phtml file will be overwritten by the easy tabs catalogproductview.phtml so,make sure that you take the backup and then procced

Sunday, December 18, 2011

Magento Change admin URL

For security reason now it became useful to change the url of the admin
Follow the steps to change the url
Open app/etc/local.xml
Find the following
<admin>
    <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
</admin>

Change
<frontName><![CDATA[admin]]></frontName>
to your name which u have think

 Like below:
<frontName><![CDATA[editname]]></frontName>

hope this will help you

Magento admin problem

Many times it happen developer can't able to Login into the Admin even though they have entered the correct username and password
so here is the solution

1) Use 127.0.0.1 instead of localhost in your url, i.e. using
http://127.0.0.1/magento/index.php/admin instead of
http://localhost/magento/index.php/admin . we  think it will not solve our problem.
2) Running on Windows XP, I was suggested to open “host” file from
C:\WINDOWS\system32\drivers\etc and have 127.0.0.1 point to something like magento.localhost
or even 127.0.0.1 point to http://www.localhost.com . But this also didn’t work either.
3) This solution finally helped us out of this problem. The solution was to modify the core
Magento code. Open
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php. Comment out the
lines 80 to 83. The line number may vary according to the Magento version. But these lines
are present somewhere near line 80. You have to comment the comma (,) in line: $this-
>getCookie()->getPath()//,
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
It will help you 

Invoicera Order and Invoice Connector Maximize

For Magento Community Edition
This Extension allow to send the Invoice with Invoicera in real time to the customer as soon as the order had been placed
This will your Return on Investment (ROI).for nay other update related to this extension check blog

No Browse Files or Upload Images Buttons

Sometimes Magento  not able to show Browse Files or Upload Images Buttons in the Product page 
so developer spend lot of time to fix this
Here is the easy solution
Just click on  the following link and install the extension key in your magneto connect and clear the cache and check for the product page browser button will be there

Sunday, December 11, 2011

Magento Date

As we known we are setting Magento date and time through admin which is  configured from the backend (System > Configuration > General > Locale Options > Timezone) for formatting/displaying date/time.

We used in PHP
<?php
$currenttime = time()
echo $date = date(d-m-Y,$currenttime);
?>

We used for magento
<?php
$currenttime = Mage::getModel('core/date')->timestamp();
echo $date = date(d-m-Y,$currenttime);
?>

Display ccurrent date
<?php echo $curent date = Mage::getModel('core/date')->date(d-m-Y); ?>

Predefined date formatting
<?php
$date = '12-12-2012';
Mage::helper('core')->formatDate($date,'medium',fasle);?>

Note: Mage_Core_Helper_Data::format() has following arguments
public function formatDate($date=null, $format='short', $showTime=false)
{
....
}

Short Rules of XML


If you're not familiar with it, upon encountering Magento's XML-based layout updates, you may have a question or two about the rules you must follow when modifying an XML file.
Only two set of rule need to remember with XML  is that when a tag opens, it must either be followed by a
closing tag (<xml_tag></xml_tag>) or 
self-close tag (<xml_tag/>) exactly as (X)HTML file tags would.

Creating CSS buttons vs Image buttons

Copy the image of proceed to checkout , or save the image in your PSD  your preferred file format, and save it in your magento directory skin/frontend/default/default/images

The HTML
Let’s take “Proceed to Checkout” image button in the shopping cart for the occasion (it can be found in app/design/frontend/default/default/template/checkout/onepage/link.phtml in the Magento folder structure)

<a href="<?=$this->getCheckoutUrl()?>"><img src="<?=$this->getSkinUrl('images/btn_proceed_to_checkout.gif')?>" alt="<?=__('Proceed to Checkout')?>"/>
</a>

HTML for CSS button - change the style of the button with just a swap of the background

<a class="img-btn btn-checkout" href="<?php echo $this->getCheckoutUrl()?>">
<span><?php echo Mage::helper('checkout')->__('Proceed to Checkout');?>
</span>
</a>

Swap out the ‘HTML for Image button’ code with the ‘HTML for CSS button’ code.
Note: The ‘img-btn’ class in the HTML just serves to unite all the CSS buttons in case you want to synchronize the font colors and sizes..etc.

The CSS
.btn-checkout {
    display:block;
    float:right;
    background:transparent url(../images/btn_proceed_to_checkout_rad.gif) no-repeat 100% 0;
    font-size:15px;
    font-weight:bold;
    padding-right:8px;
    }
.btn-checkout, .btn-checkout:hover {
    color:#fef5e5;
    text-decoration:none;
    }
.btn-checkout span {
    display:block;
    padding:0 17px 0 25px;
    background:transparent url(../images/btn_proceed_to_checkout_bg.gif) no-repeat;
    line-height:40px;
    }
And there you have it! - An all CSS-powered button.

<a class="img-btn btn-checkout" href="<?php echo $this->getCheckoutUrl()?>">
<span><?php echo $this->__('Proceed to Checkout')?>
</span>
</a>
And then it worked well... :)

Apply on the Place Order button
copy the file app/design/frontend/default/default/template/checkout/onepage/review.phtml in your design path, and replace :

<input type="image" src="<?php echo $this->getSkinUrl('images/btn_place_order.gif') ?>" onclick="review.save();" value="<?php echo $this->__('Place Order') ?>" />
to :

<a class="img-btn btn-checkout" href="#" onclick="review.save();"><span><?php echo $this->__('Place Order') ;?></span></a>
The “Place Order” button is now css powered and can be translated easily!

just apply and check with your own button image

Saturday, December 10, 2011

Magento New Facebook theme

Magento Facebook App is a marvelous extension which allows you to integrate social shopping via Facebook. This extension enables your customer to shop from your product catalogue that is available on your magento store through your Facebook profile

Speed up the Magento

One of the most important key factor in website is the speed performance.Some people think that with magento speed get slow
Here are some useful tips to speed up the magento and make it run fast

Enable Caching
Caching is enabled by default. So just don’t turn it off, unless really necessary, i.e. for development purposes.

Use a PHP Accelerator such as APC
Using a PHP Accelerator is now a necessity. If you use Ubuntu, installing APC is very simple:
sudo aptitude install php5-apc

It will be enable automatically.
For Magento installation in your web hosting, make sure to enable APC in php.ini configuration file by adding:
extension = apc.so

Magento Compilation

Many people are not aware of the Magento Compilation For Speeding up the Performance Magento Compilation tools is the best tools

The System → Tools → Compilation option allows you to compile all files of a Magento installation in order to create a single include path to increase performance.
In order to use this tool, the directory includes and the file includes/config.php must both be writeable.

Note: As it is important tools for Speed up the Performance but Some times it will break your website. You will be unable to view the frontend of backend of your magento website. you will need to turn this off through the magento core files. To do this you will need to:

disable and comment out the following in includes/config.php

#define(’COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’);
define(’COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

change to

#define(’COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’);
#define(’COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

it will fix Your issues

Thursday, December 1, 2011

Magento uses Zend to prepare query

As Many people are confuse with the database query. Just have a look how the Magento uses zend to run the query
As you have notice that ResourceModel files in Magento doesnot uses the Plain my sql.They are using(prpearing) from the Zend_Db.This means that Magento is using Zend for handling requests.

$read = Mage::getSingleton('core/resource')->getConnection('core_read');
echo get_class($read);


You will get the class as Varien_Db_Adapter_Pdo_Mysql which is an extension of Zend_Db_Adapter Abstract. You can create an instance of a Zend_Db_Select object using the select() method of a Zend_Db_Adapter_Abstract object. This can be used to build ‘SELECT’ queries. When building the query, you can add clauses of the query one by one. There is a separate method to add each clause to the Zend_Db_Select object. For example:


To Build this query:
“SELECT product_id, product_name, price FROM “products” WHERE price > 100.00″ //this is not a magento query


We can write:
$select = $read->select()->from(‘products’, array(‘product_id’, ‘product_name’, ‘price’))->where(‘price > 100.00′);

LinkWithin

Blog has moved, searching new blog...