$country = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getCountry();
Thursday, 31 January 2013
Thursday, 24 January 2013
Friday, 18 January 2013
Feature Product check yes/on
<?php
$featured_products=Mage::getModel('catalog/product')
->getCollection()
->addAttributeToFilter('status', 1)
->addAttributeToFilter('visibility', 4)
->addAttributeToFilter('featured', 1);
?>
$featured_products=Mage::getModel('catalog/product')
->getCollection()
->addAttributeToFilter('status', 1)
->addAttributeToFilter('visibility', 4)
->addAttributeToFilter('featured', 1);
?>
Thursday, 17 January 2013
Magento Product Load by id
<?php $_newProduct = Mage::getModel( 'catalog/produc t')->load($curr ent_product_id) ; ?>
Friday, 11 January 2013
How to call staic block any XML file
<reference name="left">
<block type="cms/block" name="sample_block" before="-">
<action method="setBlockId"><block_id>sample_block</block_id></action>
</block>
</reference>
How to call staick block in your template or .phtml files
<?php
echo
$this
->getLayout()->createBlock(
'cms/block'
)->setBlockId(
'my_static_block_name'
)->toHtml() ?>
Wednesday, 9 January 2013
Phtml page call in cms page in magento
{{block type="core/template" template="custompage/homecontent.phtml"}}
Product Available (In stock/Out of stock)
<?php
$thisProduct = Mage::getModel('catalog/product')->load($_product->getId());
if($thisProduct->isAvailable()):
echo $this->__('In stock');
else:
echo $this->__('Out of stock');
endif;
?>
Thursday, 3 January 2013
Wednesday, 2 January 2013
Subscribe to:
Posts (Atom)