Removed the below given code from catalog.xml
<reference name=”left”>
<block type=”catalog/layer_view” name=”catalog.leftnav” before=”-” template=”catalog/layer/view.phtml”/>
</reference>
Removed the below given code from catalog.xml
<reference name=”left”>
<block type=”catalog/layer_view” name=”catalog.leftnav” before=”-” template=”catalog/layer/view.phtml”/>
</reference>
Include The Below given code
<reference name=”root”>
<action method=”setTemplate”><template>page/2columns-left.phtml</template></action>
</reference>
right under the default tag in in catalog.xml page
OR
Edit the page page.xml and replace the code
<block type=”page/html” name=”root” output=”toHtml” template=”page/3columns.phtml”>
With
<block type=”page/html” name=”root” output=”toHtml” template=”page/2columns-left.phtml”>
Edit the page appcodelocalMageCoreModelSessionAbstractVarien.php
Search for the code
if (isset($cookieParams[‘domain’])) {
$cookieParams[‘domain’] = $cookie->getDomain();
}
and replace with
if (isset($cookieParams[‘domain’]) && !in_array(“127.0.0.1”, self::getValidatorData())) {
$cookieParams[‘domain’] = $cookie->getDomain();
}
1) place the code right after “ var spConfig = new Product.Config(getJsonConfig() ?>);”
spConfig.getIdOfSelectedProduct = function()
{
var existingProducts = new Object();
for(var i=this.settings.length-1;i>=0;i–)
{
var selected = this.settings[i].options[this.settings[i].selectedIndex];
if(selected.config)
{
for(var iproducts=0;iproducts<selected.config.products.length;iproducts++)
{
var usedAsKey = selected.config.products[iproducts]+””;
if(existingProducts[usedAsKey]==undefined)
{
existingProducts[usedAsKey]=1;
}
else
{
existingProducts[usedAsKey]=existingProducts[usedAsKey]+1;
}
}
}
}
for (var keyValue in existingProducts)
{
for ( var keyValueInner in existingProducts)
{
if(Number(existingProducts[keyValueInner])<Number(existingProducts[keyValue]))
{
delete existingProducts[keyValueInner];
}
}
}
var sizeOfExistingProducts=0;
var currentSimpleProductId = “”;
for ( var keyValue in existingProducts)
{
currentSimpleProductId = keyValue;
sizeOfExistingProducts=sizeOfExistingProducts+1
}
if(sizeOfExistingProducts==1)
{
alert(“Selected product id is: “+currentSimpleProductId)
}
}
2) call the function on the change event of dropdown
1) place the code right after “ var spConfig = new Product.Config(getJsonConfig() ?>);”
spConfig.getIdOfSelectedProduct = function()
{
var existingProducts = new Object();
for(var i=this.settings.length-1;i>=0;i–)
{
var selected = this.settings[i].options[this.settings[i].selectedIndex];
if(selected.config)
{
for(var iproducts=0;iproducts<selected.config.products.length;iproducts++)
{
var usedAsKey = selected.config.products[iproducts]+””;
if(existingProducts[usedAsKey]==undefined)
{
existingProducts[usedAsKey]=1;
}
else
{
existingProducts[usedAsKey]=existingProducts[usedAsKey]+1;
}
}
}
}
for (var keyValue in existingProducts)
{
for ( var keyValueInner in existingProducts)
{
if(Number(existingProducts[keyValueInner])<Number(existingProducts[keyValue]))
{
delete existingProducts[keyValueInner];
}
}
}
var sizeOfExistingProducts=0;
var currentSimpleProductId = “”;
for ( var keyValue in existingProducts)
{
currentSimpleProductId = keyValue;
sizeOfExistingProducts=sizeOfExistingProducts+1
}
if(sizeOfExistingProducts==1)
{
alert(“Selected product id is: “+currentSimpleProductId)
}
}
2) call the function on the change event of dropdown
<select onchange=”spConfig.getIdOfSelectedProduct()”
<?php
echo $_SESSION[‘core’][‘last_url’];
?>
<?php
echo Mage::helper(‘checkout/cart’)->getSummaryCount();
?>
{{block type=”core/template” name=”list-categories” template=”catalog/category/newPage.phtml”}}
IN PHTML PAGE
==============
SECURE SKIN URL -<?php echo $this->getSkinUrl(‘images/ sampleimage.gif’, array(‘_secure’=>true)) ?>
CRRENT URL – Mage::helper(‘core/url’)->getCurrentUrl();
HOME URL – Mage::helper(‘core/url’)->getHomeUrl();
MEDIA URL – Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
SKIN URL – Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
STORE URL – Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
JS URL – Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
NON SECURE SKIN URL – <?php echo $this->getSkinUrl(‘images/sampleimage.jpg’) ?>
IN STATIC BLOCK
================
BASE URL -{{base url=’yourstore/mypage.html’}}
MEDIA URL – {{media url=’/sampleimage.jpg’}}
SKIN URL – {{skin url=’images/sampleimage.jpg ‘}}
STORE URL – {{store url=’mypage.html’}}
<?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘block_id’)->toHtml() ?>