2022 Developer Survey is open! Take survey.
27 votes

How to change the layout of the all products page?

If you need to change every category page to 2column-left, then use this layout update File : app/design/frontend/<package>/<theme>/layout/local.xml <layout> <...
user avatar
24 votes
Accepted

Show products on homepage magento 1.9

The problem is the new rwd design has two child blocks for the product list: <block type="core/text_list" name="product_list.name.after" as="name.after" /> <block type="core/text_list" name="...
user avatar
21 votes
Accepted

How to change listing per page option?

Go to admin Store > Configuration > Catalog > Storefront Now there are two things Products per Page on Grid Allowed Values Enter your desired no here with comma like 12,24,48,96 Products ...
user avatar
  • 5,709
18 votes
Accepted

Shop by category is missing when going to subcategory page

Layout wise, magento distinguishes categories as default categories and layered categories. Magento uses is anchor option in order to make this categorization. If is anchor is set to yes, then that ...
user avatar
15 votes
Accepted

How to change the layout of the all products page?

To change the product page layout: From the Admin menu, select Catalog > Manage Products. Find the product in the list, and click to open the record. In the Product Information panel on the left, ...
user avatar
  • 387
12 votes

Move out of stock products to the end of the catalog product list

Solution 1 This moves out of stock products to the end of the list on page, not all over the pagination: 1.Add event observer: <frontend> <events> <...
user avatar
  • 6,214
11 votes
Accepted

Add custom block on listing page : Magento2

You can do that if you create new module to override this block: vendor\magento\module-catalog\Block\Product\ListProduct.php to override this block, you need to create di.xml at app\code\Vendor\...
user avatar
11 votes
Accepted

Magento 2 remove category filter from list page filters?

You have to override core file into your theme, Category layered navigation comes form core file, vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml You have to get ...
user avatar
10 votes

Setting columnCount in Magento 1.9 RWD

To set the column count for a particular category, select that category in the backend under Manage Categories. Then select the Custom Design tab—here, add in the following code and modify as needed: ...
user avatar
9 votes

Select more than one item in layered navigation (multiple select/checkboxes)

If you are only interested in converting default layered navigation to check boxes the solution is very easy and placing it here. Edit the code of app/design/frontend/ourpackage/ourtheme/template/...
user avatar
9 votes

How to change the layout of the all products page?

add the following code in your local.xml file <catalog_category_layered translate="label"> <reference name="root"> <action method="setTemplate"> <template>page/...
user avatar
9 votes

Magento resize different size images to unique size. Read description.

Either set keepFrame to true, so it's always exact 160x210, or set keepAspectRatio to false. Now it is making sure both width and height won't exceed the values you feed it. But since you don't want ...
user avatar
9 votes

Magento 2 remove category filter from list page filters?

Better to use as: <?php if($filter->getRequestVar() != 'cat') { // ... } ?>
user avatar
  • 4,592
8 votes

Magento Limit number of products displayed in grid on homepage

I have run into the same issue during a site I am managing. The proposed solutions do not appeal to me, as they require creating blocks to extend the core product list class, or as proposed to ...
user avatar
  • 9,796
8 votes

How to Display All Products in One Page?

I have found another way of implementing this, which has some distinct advantages over the {{block}}-in-a-CMS-page method. Shows the native toolbar, for sorting/pagination Makes your "All" products "...
user avatar
8 votes
Accepted

Filters on custom product listing page not working

My suggestion is to look into the Mage_Catalog_Block_Product_List class. I think the problem with the filters not being applied is caused by how you initialize the product collection in the brand ...
user avatar
  • 1,241
8 votes
Accepted

Don't display swatches on product listing

In System > Configuration > Catalog > Configurable Swatches set Product Attribute to Use for Swatches in Product Listing to -- Please Select --
user avatar
8 votes

Remove Compare from Product List in Magento 2.1.6

Update your extended catalog_category_view.xml file and Find it at your extended theme path app/design/frontend/vendorname/themename/Magento_Catalog/layout/catalog_category_view.xml To remove ...
user avatar
  • 5,709
8 votes
Accepted

In magento2,Category Sorting Product list: How to remove position from attributes?

quick workaround can be add a condition in theme templates file Magento_Catalog/templates/product/list/toolbar/sorter.phtml like if $key != 'position' then don't add in drop down options : <...
user avatar
  • 3,459
8 votes
Accepted

How to get product video in product listing page in magento 2?

You can get Media collection of particular product by loading it in custom helper as below: <?php namespace Your\Module\Helper; use Magento\Catalog\Api\ProductRepositoryInterface; class Data ...
user avatar
7 votes
Accepted

Custom image attribute is not displayed on search list

Make sure the hover_image attribute is marked as 'Used in product listing'. Unfortunately, for some reason still unknown to me, you cannot set that flag for media attributes from the backend. But you ...
user avatar
  • 195k
7 votes

magento show product collection by id

Instead of using getLoadedProductCollection() method, you can create your own custom collection. It should somewhat looks like this. //use product ids that you need to show in this array $productIds =...
user avatar
7 votes
Accepted

sort products by newest, discount, most sold, reviews" in products list page

for -> Recently Viewed see here for ->Sorting by rating Copy the file app/code/core/Mage/Catalog/Block/Product/List.php to app/code/local/Mage/Catalog/Block/Product/List.php in list.php find ...
user avatar
  • 1,726
7 votes

How to get the product collection based on catalog & cart price rules?

For catalog rule, if you look at vendor/magento/module-catalog-rule/Model/Rule You will find method getMatchingProductIds() which return an array of all matching products for a particular rule. So ...
user avatar
  • 1,645
7 votes
Accepted

how to use different template file for category magento 2

You need to create a xml file catalog_category_view_id_{{id}}.xml under your theme > Magento_Catalog > layout and change list file. For detail : http://sumankc.com/2016/12/10/different-template-for-...
user avatar
  • 1,129
6 votes
Accepted

Change list.phtml to show products of multiple categories in same block

Good question! The trick here is to extend a block based on catalog/product_list. I think the best way here is to add some xml to the "Layout Update XML" section. <reference name="content"> ...
user avatar
6 votes

How to override product list page

You have to just write below xml code in your module file, In your module layout file, app/code/Vendor/Modulename/view/frontend/layout/catalog_category_view.xml File, <?xml version="1.0"?> <...
user avatar
6 votes

How to show visual swatch color on product listing page magento2

<?php/***********Display Color Attribute************/?> <?php $om = \Magento\Framework\App\ObjectManager::getInstance(); $attribute = $om->get(\Magento\Catalog\Api\...
user avatar
6 votes
Accepted

I am facing some difficulties while calling .phtml file in list.phtml of magento

The code won't work on list page because, In the reference link, the module is to display custom products which are assigned to a product. It gets data from a singl product and add it to the related ...
user avatar
6 votes
Accepted

Magento 2 How can I show custom options on product list page?

I've implement code for it. Please create block class Don't use Object Manager directly on template. I've used this for demo. <?php $_objectManager = \Magento\Framework\App\ObjectManager::...
user avatar
  • 1,657

Only top scored, non community-wiki answers of a minimum length are eligible