Change default search engine FireFox

When we type something in firefox URL bar and hit enter means it will show search result in any of the search engines like google, yahoo, ask etc,. If it’s using ask(for example), you can switch to your preferred search engine.  Here’s how to switch default search engine in firefox.1. In Firefox type about:config in […]

Read More…

Fix magento admin login failing in chrome browser

Login failure in chrome even though you have given correct username and password?Just follow to code to access admin page in chrome browser. Look for the line in appcodelocalMageCoreModelSessionAbstractVarien.php file. If you have found just replace that line with the follwing code In this way we can fix magento admin login failing in chrome browser […]

Read More…

Disable paste option in textbox

With the help of jQuery event.preventDefault() method we can disable paste in textbox. It can be used in the situation where user enters his confirmation email id in registration form. $(‘#confirm-email’).bind("paste",function(e) { e.preventDefault(); alert(‘You cannot pase text into this textbox’);}); Some other events: cut,copy,contextmenu(disables right click) $(‘#confirm-email’).bind("cut copy contextmenu paste",function(e) { e.preventDefault();}); It will prevent […]

Read More…

Magento shopping cart total items quantity

If you want to get cart total items quantity from magento shopping cart, you can use the below snippet. function getCartQty(){ $cartcollection = Mage::getModel(‘checkout/cart’)->getQuote()->getData(); if (isset($cartcollection[‘items_qty’])) return (int)$cartcollection[‘items_qty’]; else return 0;} With the help of the above function we can get cart total items quantity by putting echo getCartQty();

Read More…