How to View Magneto SKU Number in Cart & Page View?

1. You Want cart page to view the SKU number :
You can use below code in your : app/design/frontend/youtheme/yourtheme/template/checkout/cart.phtml
<?php echo $this->__(‘SKU Number’) ?>

And add item section this : app/design/frontend/youtheme/yourtheme/template/checkout/cart/item/default.phtml
<?php echo $_item->getSku() ?>

2. You want to view the Page View :

app/design/frontend/youtheme/yourtheme/template/catalog/product/view.phtml
<!– Write SKU –>
<?php echo $this->__(‘SKU Number :’); ?> <?php
$sku = Mage::getModel(‘catalog/product’)->load($_product->getId())->getSku();
echo $sku; ?>
<!– Sku End –>

its is working for my side.

How to view Sub Categories only in Parent Categories from Magento?

<?php
$obj = new Mage_Catalog_Block_Navigation();
$current_cat     = $obj->getCurrentCategory();

$currentCatId    = (is_object($current_cat) ? $current_cat->getId() : ”);

$currentPage = (int) $this->getRequest()->getParam(‘p’, 1);
//$currentPage = $_GET[‘p’];

$pageSize = 3;

$collection = Mage::getModel(‘catalog/category’)->getCollection()
->addAttributeToFilter(‘parent_id’, $currentCatId)
->addAttributeToSelect(‘name’)
->addAttributeToSelect(‘url’)
->setLoadProductCount(1)
->setOrder(‘name’, ‘asc’)
->setPage($currentPage, $pageSize);

$totCat = $collection->getSize();
$store_cats = $collection->load();

$pageTot = ceil( $totCat / $pageSize );

?>
<div>
<ul class=’navigation’>
<?php foreach ($store_cats as $cat) : ?>
<li><a href=”<? echo $cat->getUrl() ?>”><?php echo $cat->getName() . ” (” . $cat->getProductCount() . “)” ?></a>
<?php echo $cat->getImageUrl(); ?>
</li>
<?php endforeach; ?>
</ul>

</div>

<ul>
<?php for ( $i=1; $i<=$pageTot; $i++ ) : ?>
<?php if ( $i == $currentPage ) : ?><li><?php echo $i ?></li><?php else : ?><li><a href=”<?php echo $current_cat->getUrl() ?>?p=<?php echo $i ?>”><?php echo $i ?></a></li><?php endif; ?>
<?php endfor; ?>
</ul>

And Just Put below code in your CMS (or) Static Block page inside.
{{block type=”catalog/navigation” name=”catalog.categories” alias=”all_categories_homepage” template=”catalog/navigation/category_listing.phtml”}}

How to Popular Tag add & remove in Magento?

1. Go to Admin Panel

2. Select the Catalog => Select Add Tag

3. And what tag you want add here.

And watch below video tutorial url also :

http://fastdot.co.uk/magento-ecommerce/how-to-create-and-approve-tags-in-magento.html

Add :

appdesignfrontenddefaultyourthemelayouttag.xml

<default>

<!– Mage_Tag –>

<reference name=”right”>

<block type=”tag/popular” name=”tags_popular” template=”tag/popular.phtm”>

<action method=”setTemplate”><template>tag/popular.phtml</template></action>

</block>

</reference> </default>

Remove :

go to below URL.

http://stackoverflow.com/questions/2654515/removing-the-block-popular-tags-from-the-index-view-in-magento

Here some more useful things.

that’s all 🙂

This is custome tag add in home page option : {{block type=”tag/popular” template=”tag/popular.phtml”}}

© 2020 Spirituality