{{block type=”catalog/product_list” category_id=”12″ template=”catalog/product/list.phtml”}}
It will list all the products under the category id “12” .
{{block type=”catalog/product_list” category_id=”12″ template=”catalog/product/list.phtml”}}
It will list all the products under the category id “12” .
{{store url=’mypage.html’}} will return the full sitr ur l . ie http://sitename.com/mypage.html/
and
{{store direct_url=’mypage.html’}} will return the full sitr ur l . ie http://sitename.com/mypage.html
eg :
var str = new Array(“First element”, “Second”, “Last”);
alert(str.length) //will return the number of elements in an array
You can compare two strings using “==” operator
eg :
var str1=”Test1″;
var str2=”Test2″;
if(str1=str2)
alert(“Message”);
You can declare an array using the constructor “Array”
var arlene1 = new Array();
var arlene2 = new Array(“First element”, “Second”, “Last”)
You can change the class name using the below given code.
document.getElementById(“idElement”).setAttribute(“class”,”className”);
The below given code will display the the content added in “newPage.phtml”
{{block type=”core/template” name=”list-categories” template=”catalog/category/newPage.phtml”}}
<?php //The following code will load the block with the given "identifier" // on the phtml page echo $this->getLayout()->createBlock('cms/block')-> setBlockId('identifier')->toHtml() ?>
To give image path you can use {{skin url=’yourimage.gif’}} .
Below given are the function with different arguments
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) – http://phpcodez/js/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) – http://phpcodez/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) – http://phpcodez/media/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) – http://phpcodez/skin/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) -http://phpcodez/
$currentUrl = $this->helper(‘core/url’)->getCurrentUrl();