{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
Just place it on your CMS page and clear your cache. Thats done.
Hope it Helps... Thanks
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
// Prepare the SQL
$sql = "SELECT * FROM mytable";
// Execute the SQL and return the results in to $getData
$getData = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
// Parse the results
for($i=0; $i < count($getData); $i++){
/* your code */
}
WRITE/UPDATE Queries
// $write is an instance of Zend_Db_Adapter_Abstract
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
// Prepare the SQL statement
$sql = "insert into tablename values (?, ?, ?)";
// Execute the SQL
$write->query($sql);
while ($row = $write->fetch() ) {
/* your code */
}
$session= Mage::getSingleton('checkout/session');
$quote = $session->getQuote();
$cart = Mage::getModel('checkout/cart');
$cartItems = $cart->getItems();
foreach ($cartItems as $item)
{
$quote->removeItem($item->getId())->save();
}
foreach ($cartItems as $item)
{
if($item->getId()== 2)
{
$quote->removeItem($item->getId())->save();
}
}
true local
0.1.0 Anjan_Systab systab systab.xml Anjan_Systab systab Allow Everything System Configuration Tab System Configuration Tab 10 systab.xml Anjan_Systab_Model systab_mysql4 Anjan_Systab_Model_Mysql4 systab
Anjan_Systab Anjan_Systab_Block Anjan_Systab_Helper
200 separator-top systab 100 1 1 1 text 10 1 1 1 select adminhtml/system_config_source_yesno 1 1 1 1 select adminhtml/system_config_source_yesno 1 1 1 1 select adminhtml/system_config_source_yesno 1 1 1 1
$storeId = Mage::app()->getStore()->getId();
$resource = Mage::getSingleton('core/resource');
$read = $resource->getConnection('catalog_read');
$categoryProductTable = $resource->getTableName('catalog/category_product');
$productEntityIntTable = (string)Mage::getConfig()->getTablePrefix() . 'catalog_product_entity_int';
$eavAttributeTable = $resource->getTableName('eav/attribute');
// Query database for special product
$select = $read->select()
->distinct()
->from(array('cp'=>$categoryProductTable),'cp.product_id')
->join(array('pei'=>$productEntityIntTable), 'pei.entity_id=cp.product_id', array())
->joinNatural(array('ea'=>$eavAttributeTable))
->where('pei.value=1')
->where('ea.attribute_code="special"');// Write your attribute code instead of Special
$rows = $read->fetchAll($select);
// Save all product Id which have the Special Product Yes
foreach($rows as $row)
{
$product[] =$row['product_id'];
}
".$productmodel->getDescription()."
";".$productmodel->getFinalPrice()."
";
Mohan Natarajan Powered by Blogger