Ensure that Placeholder image for the new image attribute is uploaded from admin panel
System > Configuration > Catalog > Catalog > Product image placeholders
Ensure that Placeholder image for the new image attribute is uploaded from admin panel
System > Configuration > Catalog > Catalog > Product image placeholders
1) Open the page catalog xml and search the for the string “catalog/product/list.phtml’
2) Include the code
<action method=”addAttribute”><name>alternate_another_imageimage</name></action>
after
<block type=”catalog/product_list” name=”product_list” template=”catalog/product/list.phtml”>
3) Call the below given code on list.phtml
$another_image = $this->helper(‘catalog/image’)->init($_product, another_image)->resize(135); // Assuming another_image is the attribute code
<?php
$this->startSetup();
$this->removeAttribute(‘catalog_category’, ‘show_line_name’);
$this->endSetup();
?>
1) Ensure that “Used in Product Listing” of the attribute is set to “yes”
2) Then use the code ?php echo $_helper->productAttribute($_product, $_product->getAttricuteCode(), attricutecode) ?>
1) Go to catalog > catalog > Manage categories and click on the category name that the product associated with
2) Click on the tab “Category Products” and there you can set the product position
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’];
?>