Compress MySqlDump Database Output Terminal command

Thursday, 22. September 2011

If you want to compress the output of your mysqldump here is the command you will need to use.

mysqldump -uUSER -pPASSWORD DATABASE|gzip > dump.SQL.gz

You can also use bzip2 compression:

mysqldump -uUSER -pPASSWORD DATABASE|bzip2 > dump.SQL.bz2

Enjoy!

HowTo Change Default Search Engine For Firefox Browser

Monday, 19. September 2011

As many may know, while using FireFox it is possible to search stuff directly from the address bar. Simply type your search term where the URL usually appears and press the Enter key. You will be taken directly to the search engine set by default in your Firefox configurations.

If you ever want to change this to something else such as Google.co.uk for example, simply follow the following tips

1) Open Firefox and type about:config in the Address bar and then press the enter key.
2) If you have never been here before you may have to promise you are going to be careful!
3) In the filter field enter and search for keyword.url.
4) Double click on this entry. It will open a dialog box where you can edit the URL for your preferred search engine. Please see the screenshot for more details.
5) Once, done the changes will automatically be applied on so there is no manual saving!

Enforcing WWW URLs with 301 Redirect using .htaccess file

Friday, 16. September 2011

If you want to enforce www to your URLs or simply redirect everything to a new URL with .htaccess file, this may help you.

1) Open your .htaccess file and look for these lines

Options +FollowSymLinks
RewriteEngine On

2) Underneath these lines:

301 Redirect Everything to new URL

RewriteRule ^(.*)$ http://www.new-domain.co.uk/$1 [R=301,L]

301 enforce WWW to URL

# Everything that does not start with wwww
RewriteCond %{HTTP_HOST}   !^www     [NC]
RewriteRule ^(.*)$          http://www.domain.com/$1  [L,R=301]

Cross Browser CSS Gradient Rule

Wednesday, 14. September 2011

Want a cross browser css gradient rule for your site?

You may want to try this small CSS rule that seems to work a treat for me!

Description

/*Webkit Browser: Chrome, Safari*/
background: -webkit-gradient(type, startX startY, endX endY, from(#startcolor), to(#endcolor)); 
 /*Firefox*/
background: type(startPoint,  #startcolor,  #endcolor);
/*IE - if you care!*/
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#startcolor', endColorstr='#endcolor');

Example

background: #ccc; /* fallback for older/non-css browsers */
 
background: -webkit-gradient(linear, left top, left bottom, from(#dedede), to(#000));
background: -moz-linear-gradient(top,  #dedede,  #000);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dedede', endColorstr='#000000');
How Do I Look? :)

Oh! you get the idea!

Magento Multiple Store or Website Setup with Index.php

Wednesday, 14. September 2011

There are many ways to set up a multi-store or multi-website environment in Magento and make sure specific URL requests reaches the right website or store on Magento.

One popular way is to use the index.php file. Here are steps to do to get redirect URLs to associated stores or websites using this file.

Redirect URL to Magento’s website Code

1) Open index.php file

2) Search for the line below

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

3) Change it to

switch($_SERVER['HTTP_HOST']) {
	case 'domain.com':
	case 'www.domain.com':
		$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '<your_websitecode>';		
	break;
	default:
                $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
	break;	
}

4) Search for the line below

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

Make sure the type is says website and not store:

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'website';

Redirect URL to Magento’s Store Code

Repeat the same steps as above but make sure this time around you specify store codes in place of website code. Also, on step 4, set the type to store as opposed to website

Magento Design UK – PSD to HTML Magento Template

Thursday, 8. September 2011

Zone-Connect specialise in Magento Design, PSD to HTML implementation. We are experienced in Magento Design implementation normally from PSD to amazing HTML templates that will look and feel exactly like the way the designer intended.

If you want us to help implement a Design into Magento templates or you simply need advice on Magento implementation, please get in touch with us through one of our contact details today.

Looking forward to hearing from you!

Can’t Select Payment Option on IE9 Magento Onepage Checkout

Thursday, 8. September 2011

My client reported this strange behaviour on IE9 that happens when a customer tries to checkout using onepage checkout on Magento.

What was happening in this case was when a customer is going through the checkout steps, they select the shipping method fine but when they click to go to choose the payment method, IE9 was automatically refreshing the page and take them back to the first step again!

After a bit of head scratching and testing, came to realise two issues where noticeable on this case:

1) There was a Javascript error in one of old files. So I fixed that

2) The always saviour boiler plate stuff! I noticed the site was missing the compatible quirk so I thought I should give it a try..

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7"/>
.....

3) Finally, cleared Magento cache, tried the checkout again.. and Whallah! it fixed it!

It worked for me and if you are experiencing the same problem you may want to give it a try.

Let us know if this helped you.

Magento Africa : Taking Magento To Afrikans!

Wednesday, 7. September 2011

Well, we are starting something great in Africa and Magento Africa is definitely some project to be involved with!

It has been in my mind for sometime now and I think it’s about time to get things rolling. Africa as we know is one of them places slowly getting up to speed and despite all the odds, e-commerce is another new big things that’s slowly but surely getting into the area.

In my opinion, this could not come at a better time when Magento platform is still free, widely available and supported. There are many things to be done to get the entire nation on song with things online, but I am convinced now is the time to get the point across.

Magento Africa is still at early stages and contributions, ideas and any support in relation to the subject is definitely welcome so if you are reading this and want to get involved, please drop a comment or contact me today to discuss further.

Many thanks for reading..

Fatal error: Failed opening required ../includes/downloader/pearlib/php/PEAR.php

Sunday, 4. September 2011

Fatal error: Failed opening required ../includes/downloader/pearlib/php/PEAR.php

If you have suddenly starting to see this error when accessing your Magento connect page, it’s more likely you have recently enabled the compilation mode.

You will notice that the downloader path has suddenly change to webroot/includes/downloader which is a clue the compiler is currently running.

Two ways to solve this:

1) Either temporarily disable the compiler while you are installing the extension:
System > Tools > Compilation > Disable

2) If you have access to FTP or Control Panel, upload the downloder folder to the webroot/includes folder