Item counting on search page of magento - magento

When we search a product in magento it shows result on search page with pager, BUT i want to show items counting without using pager of magento.
I want a custom code to show total number of items on search result.
If anyone get answer please update me.
Thanks

use $this->getCollection()->count() in your list.phtml file and it counts total products found in search result.

Related

Display product in list using widgets in magento

I am working on magento home page and need display products on home page. I have used widgets to display products. I want to display product in list one by one but it shows in grid. Right now I am showing the products in list.
my code is :-
{{widget type="highlight/product_popular" title="special" products_count="3" template="highlight/product/grid.phtml" class_name="highlight-popular"}}
Using this code the product is shown in grid but actually I want to display it in list like:-
1. Product1
2. product2
Please, suggest how I can do this.
whatever you are putting in your grid.phtml - change it as suggested in
base/default/template/catalog/product/list.phtml as per list mode, code followed by it

Magento Attributes search filter not correct

I have problem with my Magento Attributes search filter not correct. For example this page
http://www.siameyewear.com/catalogsearch/result/?q=Ray-Ban
As you can see. I have all the list created with magento attibutes at the left side bar.
All list have show correct as i want. But when i'm click on it such as WAYFARER ® (1) <<< There are only 1 product on a list. But it's look like magento show all my products. Normally it have have to show only 1 product as they say.
Second question.
I have set Is Anchor to yes in Category.
For example this page. http://www.siameyewear.com/rayban.html
As you can see Magento show Anchor correctly. ( below "Shop By")
But when I'm click on it. All the page getting error 404 page can't be found.
Anyone know how to fix this problem. Kindly Please help. I'm stuck with this problem for a weeks.
Thank you
For Search Filter you should delete all files under var/locks and then reindex all.

Magento - Adding quantity box to upsell / related products

I have a question regarding Magento. I want to be able to add a quantity box to the products that show up in the 'related products' list that is shown on the product detail page. This way a visitor can order a related item multple times instead of only once per action. I have been looking for a solution for this for over 2 weeks, but I can't seem to find anything usefull. Can anyone help me out?
Thanks in advance!
Think you need to edit this template: your_package/your_theme/template/catalog/product/list/upsell.phtml. If you do not have that file already in your theme, simply copy it in your theme and package following the rest of the path.
There you can add you Qty input box and add Add to Cart button and change the URL to include the qty. You should bear in mind that you may have also configurable/bundle products displayed as an up-sell, so you should cover these too.

Magento: How to sort product collection?

i have created a list_home.phtml that i call from {{block type="catalog/product_list" category_id="6" template="catalog/product/list_home.phtml"}}The category is very important because i will have 3 tabs in this homepage slider.This is a version of the product list without toolbar to include in a homepage slider, where the user should never be able to change the sorting.
However in the main catalog there is the toolbar. Currently, if the user changes the sorting there and then goes back to the homepage the sort order on the home page will also be affected!
How can i force the $collection to always sort by newest and also filter the category from the frontend's block call?
I am really almost stuck after opening around 50 tabs in the broswer and trying to research, really need some help here please.
Thanks in advance.
On the product collection you can set the order by calling ->setOrder on it.
I'm not sure of the field you would need to order by, but if you wanted to set it by price ascending you would do
->setOrder('price', 'ASC');
To filter the category you need to do this
$productCollection = Mage::getModel('catalog/category')->load($categoryId);
You can then set the sort order

Magento + get only configured products

I want to know how can I show only configured products on listing page?
With this I want to show "number of product(configured)" in particular category that is on URL.
Please help me in this, it will be really appreciated.
Thanks
You have to filter collection of product in list page by using
$collection->addAttributeToFilter('type','configurable');

Resources