This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<p class="welcome-msg"><?php echo $this->getWelcome() ?> | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// to get cart URL | |
$cartUrl = $this->getUrl('checkout/cart'); | |
//to get cart Item count | |
$_cartQty = Mage::getSingleton('checkout/cart')->getItemsCount(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_current_category=$this->getCurrentCategory(); | |
echo $_current_category; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $_helper = Mage::helper('catalog/category') ?> | |
<?php $_categories = $_helper->getStoreCategories() ?> <?php if (count($_categories) > 0): ?> | |
<ul> <?php foreach($_categories as $_category): ?> | |
<li> <a href="<?php echo $_helper->getCategoryUrl($_category) ?>"> | |
<span><?php echo $_category->getName() ?> </span> | |
</a> | |
</li> | |
<?php endforeach; ?> | |
</ul> | |
<?php endif; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Available at [your-theme]/template/categorysearch/form.mini.phtml | |
<?php | |
$catalogSearchHelper = $this->helper('catalogsearch'); | |
?> | |
<form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get"> | |
<div class="form-search"> | |
<div class="container"> | |
<input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="blink" maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" /> | |
</div> | |
<button type="submit" title="<?php echo $this->__('Search') ?>" class="search-button"><span><span><?php echo $this->__('Search') ?></span></span></button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//link for my account | |
<?php echo $this->getUrl('customer/account')?>"> | |
//wishlist URL | |
<?php echo $this->getUrl('wishlist/links')?>"> | |
//My cart URL | |
<?php echo $this->getUrl('checkout/cart')?>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$allproduct = Mage::getModel('catalog/product')->getCollection()->setOrder('entity_id','desc')->getData(); | |
$_helper = $this->helper('catalog/output'); | |
foreach($allproduct as $product){ | |
echo '<div class="product_box">'; | |
$obj = Mage::getModel('catalog/product'); | |
$productid = $product['entity_id']; | |
$_product = $obj->load($productid); // Enter your Product Id in $product_id | |
$productName = $_product->getName(); | |
$productDescription = $_product->getDescription(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true))): | |
echo "This is magento home page"; | |
else | |
echo "Oops this is not home page,sorry"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPostViews($postID){ | |
$count_key = 'post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count==''){ | |
delete_post_meta($postID, $count_key); | |
add_post_meta($postID, $count_key, '0'); | |
return "0 View"; | |
} | |
return $count.' Views'; | |
} |
NewerOlder