Sie sind auf Seite 1von 3

How to load product of category id = 5

<?php
$category = Mage::getModel('catalog/category')->load(5);
$_productCollection = Mage::getResourceModel('catalog/product_collection')->addCategoryFilter($category)-
>addAttributeToSelect("*");
$_helper = $this->helper('catalog/output');
?>

<li id="kwick_4">

<a href="photography.html" class="bantxt">Photography</a>

<div id="bottom3">
<?php $_collectionSize = $_productCollection->count() ?>
<?php $_columnCount = $this->getColumnCount(); ?>
<?php $i=0; foreach ($_productCollection as $_product):?>
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this-
>getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
<img src="<?php echo $_product->getImageUrl() ?>" width="135" height="135" alt="<?php echo $this-
>stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
<?php endforeach ?>

</div>

</li>
========================================================================================

http://blog.ecommercesoftwaresolutionsonline.com/archives/78/value-of-attribute-urlpath-must-be-
unique.html

[1] To install ready made module customer partner- http://www.magentocommerce.com/extension/1210

[2] To create multiple users at admin side - http://www.vodahost.com/vodatalk/magento/39383-magento-


user-permissions.html

[3] To create users and their roles at admin side - http://www.yireo.com/tutorials/magebridge-step-by-


step/119-step-by-step-create-a-magento-api-user

[4] For goooglebase integration

[5] For Featured Product - http://www.magentocommerce.com/extension/reviews/module/2513/featured-


products

[6] For creating tabs - http://www.joomlavue.com/blog/21-adding-tabbed-view-to-magento-default-theme

[7] For creating custom module -


http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table

http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes

www.magictoolbox.com/magiczoom_magento/ --------> For create zoom functionality with

http://store.magentomagik.com/magik-slider.html
http://www.magentocommerce.com/extension/1829/scalena-news - for news module

http://www.design4magento.com/magento-tutorials/tips-on-building-a-magento-store/

http://www.magentocommerce.com/extension/2101/j2t-ajax-cart
http://www.rapidshareindex.com/sitemap/sitemap3.html

http://techdad.wordpress.com/tag/magento/ - free magento extensions

http://121.246.74.9/development/tai_tran/index.php
magento-community/HM_DeveloperToolbar

http://activecodeline.com/retrieving-url-paths-in-magento

http://www.isampleletter.com/201-300.html

http://www.magentocommerce.com/wiki/how-
to/change_product_image_on_view_page_to_associated_product_s_image

http://blog.blueorangetekknologee.com/magento/how-to-create-a-simple-color-thumbnail-selector-swatch-
selector-in-magento/ - For color swatcher

[1] To add attribute in new category.

<?php
require_once 'app/Mage.php';
// require_once 'app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php';
$app = Mage::app();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$setup->addAttribute('catalog_category', 'category_title', array(


'group' => 'General',
'input' => 'text',
'type' => 'varchar',
'label' => 'Category Title',
'backend' => '',
'visible' => 1,
'required' => 0,
'user_defined' => 1,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));

?>

[2] if($_product->getResource()->getAttribute('productview')->getFrontend()->getValue($_product) ==
"text"){ -> To check the attribute value

[3] To get current store name :

<?php
$storeId = Mage::app()->getStore()->getId();
$websiteId = Mage::app()->getStore($storeId)->getWebsiteId();

$store = new Mage_Adminhtml_Model_System_Store();


$store_name = $store->getStoreName1($storeId);

$obj = new Mage_Adminhtml_Block_Store_Switcher();


/*echo "<pre>";
print_r($obj->getStoreCollection($storeId));

exit;*/
echo $this->__($store_name); ?>

[4] To get any store code -> Mage::app()->getStore()->getCode()

[5] To check whether the page is home page or not

Mage::getSingleton('cms/page')->getIdentifier()=="home"

[6] How to set different filters on product collection

$currCat1 = Mage::registry('current_category');

if($currCat1->getIsActive()) {
$category1 = Mage::getModel('catalog/category')->load($currCat1->getEntityId());

$storeId = Mage::app()->getStore()->getId();
$prodCollection1 = Mage::getResourceModel('catalog/product_collection')-
>addCategoryFilter($category)->addAttributeToFilter('special_price', array('gt' => 0), 'left')-
>addAttributeToFilter('store_id', array('in' => 10));
[7]

Das könnte Ihnen auch gefallen