Magento - Add External Javascript in CMS Static block
Template tag is special tag, it has text surrounded by double curly braces which has a special meaning to Magento,
for example {{store url=""}}.
Problem :
I have one javascript , "slide_home.js" and want to include in one cms Static Blocks
This javascript file is in root-directory/js/commmon/slide_home.js
Solution : (you can write this line at top of static blocks [tine mce editor] )
/*
*/
learn more from here
http://inchoo.net/ecommerce/magento/magento-cms-syntax-part1/
Magento – Write Sql query
(1) Select SQL :
$objCon = Mage::getSingleton('core/resource')->getConnection('core_write');
$result = $objCon->query('SELECT 'entity_id' FROM 'catalog_product_entity');
if(!$result) {
$rows = $result->fetch(PDO::FETCH_ASSOC);
if(!$rows) {
print_r($rows);
}
}
(2) Insert SQL :
$objCon = Mage::getSingleton('core/resource')->getConnection('core_write');
$objCon->query("insert into table name (fields) values (values) ");
Mage_Cms_Block_Widget_Interface not found
After I got information about this interface that It moved Mage_Cms_Block_Widget_Interface to Mage_Widget_Block_Interface in Magento EE version 1.6
Magento Admin login problem

Problem:
I had a new installation of magento. But I was unable to login as an administrator. I went to the admin login page, entered correct username and password but was redirected to the same login page. I could not enter the dashboard page. Error message is displayed when I enter wrong username or password. But nothing is displayed and I am redirected to the same login page when I insert correct username and password.
Solution:
I googled and found these solutions:-
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 . But this didn’t solve my problem.
2) Since I am using 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 me 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()
);
Well, I am out of this problem. Hope, this solution you also help you.