Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about product categories in the Magento catalog
6
votes
Accepted
How to filter product collection using category id in flat mode
I think Below code solve your concern
$collection = Mage::getModel('catalog/category')
->load($categoryId)
->getProductCollection();
After that you can put your …
3
votes
How to assign product category during products import
I dont know But you have to use
$product_model->setCategoryIds($categoryId)
instead of
$product:model->setCategoryId($categoryId);
Please try and let me know.
3
votes
Issue - Multi-Store Category Disable Not Working
Well No one can answer this question until and unless they see your code.
What logic theme/or menu extension has written for fetching categories.
But I can give you a hint where you start debug this …
1
vote
block type="core/template" template="template.phtml" for specific category
Go to catalog->category->select your category -> custom design
and in Custom Layout Update please write below code
<reference name="content">
<block type="core/template" template="template.phtml …
1
vote
Accepted
magento category page load time is more than2 mins
Some days ago I am working on speed optimization task on category list page.
I have done all possible way to reduce the execution time but not able achieve this. …
1
vote
Find lowest priced product in a category
The issue with @AmitBera's answer is that he has taken the product collection instead of the category collection, also $collection->getFirst(); is wrong this should be $collection->getFirstItem();. … So here is your final answer
$collection = Mage::getModel('catalog/category')->load($yourcategory_id)
->getProductCollection();
$collection
->addMinimalPrice()
->addFinalPrice() …
0
votes
Counting amount of products in category not working
Use Below code for countiong prouduct
$categoryId = '4';
$collection = Mage::getModel('catalog/category')->load($categoryId)->getProductCollection();
echo $colletion->getSize();
getSize() gives you …
0
votes
Loading different related files with catalog_category_layered
copy default list.phtml file and create new phtml with new name and youy path and follow below steps.
As far as I know what you have to do is following, put below code in your local.xml or any custom …
0
votes
Category setup and fetching CMS block from Custom Design template
please check that your template is loaded with some static content
if yes then you can try below code for that
$_current_category = Mage::registry('current_category');
echo $_current_category->get …
0
votes
Magento product price is zero, only on homepage
Try Below Code Init BLock class and use block class method.
Here your Template not pointing to catalog/product block and so that is why It is not able to find getPriceHtml method
$block = Mage::app …
0
votes
Category Wise product to be displayed?
I got your point
1) login to admin panel
2) go to System->permission->Blocks
3) click add new Block button
4) add this block catalog/product_list and set enable in dropdown and save
5) clear ma …
0
votes
How to change category location block in magento 1.8?
Goto
app/design/frontend/yourPackage/Yourtheme/template/catalog/navigation/left.php
Here you find subcategory foreach loop
foreach ($_categories as $_category):
change this foreach loop position …
0
votes
Accepted
If a product has a special price add a new category
() ;
$productposted = array();
foreach ($collection as $product){
if($product->getFinalPrice() < $product->getPrice()){
$productposted[$product->getId()] = 1; //or your sort order
}
}
$category … = Mage::getModel('catalog/category')->load($category_id);//your category id
$category->setPostedProducts($productposted);
$category->save(); …
0
votes
1.9 - Add product to category collection by ID
Try Below code fastest way to set product to category
$category = Mage::getModel('catalog/category')->load($this->getCategoryId());
if ($this->getCategoryId() == 123) {
//add product id 456 to the … collection
$productIds[$product->getId()] = 1; // here key is product id and value is position
$category->setPostedProducts($productIds);
$category->save();
} …
0
votes
How to create custom link for category?
I dont know why you want to do this, but you can achieve by .htaccess
use 301 redirect rule for that
<IfModule mod_rewrite.c>
#301 redirect
redirect 301 oldURL NEWURL
</IfModule>