Skip to main content

Questions tagged [category-view]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
0 votes
2 answers
20 views

Adding anything after category page URL needs to be ignored

I want to change behavior of Magento Category page URL. For example, if the category page URL is https://magento246p4-beta.com/gear/bags, I want to ensure that any additional text after "bags/&...
0 votes
1 answer
15 views

Remove/Hide products on Catagory page and Search result page

We need to hide certain products on both pages, Category/Search result page. We have an attribute called "discontinued" of Yes/No type. If it is set to yes, then products should not be in ...
0 votes
2 answers
2k views

Magento 2: Left Category Sidebar from website (copy of question)

I am trying to create left sidebar category navigation for my website. But it shows only default category. It does not show any other subcategories. I activated all category is_anchor, and re-...
0 votes
2 answers
1k views

How to pass added custom "key=>value" into getCollection()?

On product lisitng page i want to get one more parameter "latitude" for all product,how can i achieve? Here is my code:- public function setCollection($collection) { $this->...
1 vote
2 answers
1k views

How to flush/clean cache programmatically in Magento 2.4 for category/product page

Like I mentioned in my question I am having a problem with cleaning/flushing cache on category/product pages. I get some code, probably for some older version of Magento but didn't work. Here it is: ...
0 votes
0 answers
24 views

Magento 2.4 CMS Blocks dont show up on category pages

i cant get the cms block to show up on categories pages. the same cms block works fine on the homepage. the category page is set to display static block and product added the cms block. i do have a ...
0 votes
1 answer
2k views

Magento 2 customizing category page

I want to customize the category page and I am using the below file path: app\design\frontend\Vendor\Theme\Magento_Catalog\layout\catalog_category_view.xml Below is xml file code: <page xmlns:...
1 vote
2 answers
5k views

Magento 2: Add custom category layout to multiple categories

I am trying to add a custom category layout to my theme. I have the standard catalog_category_view.xml and have got the update for 1 category using catalog_category_view_id_[id].xml. I want to apply ...
1 vote
1 answer
109 views

Do a 301 redirect if there is no products in the current category

As a part of the SEO optimizations, when a customer go to a category page and if there is no products in the category, can we redirect it to a 301? Eg: As a part of -ve testing, if we load the ...
0 votes
2 answers
47 views

How do I hide images and compare button in category view List mode?

Using Codazon Fastest theme, I have created ~/fastest/fastest_child/Magento_Catalog/web/css/source/_extend.less which contains the following CSS extensions: .catalog-category-view.product-item-photo { ...
1 vote
0 answers
142 views

Magento 2 Add custom products to product collection on catalog page - pagination not working

I need to add some custom products to category pages. Just to test this I've created twenty dummy products based on the last product in the category list. In ListProduct.php - ...
1 vote
2 answers
40 views

Extension for contentblocks in category grid

does anyone have any idea which extension puts the content blocks at https://www.liquid-life.de/fahrrad/mountainbikes/fullies/enduro/ into the category grid. (3rd tile) Thanks in advance. Patrick
0 votes
1 answer
250 views

keep scroll position when clicking on next page for category view M1.9

I am wanting to stop the page from returning on the top when a customer clicks on the pagination buttons for the category view pages. I have content at the top of the page for the category description ...
0 votes
1 answer
59 views

sub-category with photos in magento2

I would like to create a sub-category with photos on my site. How could you do that? As on the example pages and screenshot. https://www.moebel.de/wohnen https://www.home24.de/wohn-accessoires/
0 votes
2 answers
881 views

Porto Theme - Category View - "Add to Cart" change to view product

i know this question has been asked on other posts but i believe Porto theme uses different files/layouts. I'm trying to change the "add to cart/basket" button to "View" and take ...
0 votes
1 answer
303 views

ViewModel modification makes existing list.phtml break

I recently made a modification to catalog-category-view.xml and overrode category.products.list. It seemed to work at the time, I had badges displaying on a rendered page. Now the template file errors ...
0 votes
1 answer
635 views

Magento 2: how to change Category page design

I have a theme installed on my Magento V2.2.3 site and now i would like to change the category page design with requirements new custom fields for category option on each category if this category ...
0 votes
2 answers
70 views

Category Controller overriding to allow multiple Categories in URL

My custom module (AKA AraujoPhillips/SpecialCategories) should allow URLs with multiple categories, like: example.com/category1/category2.html example.com/sales/phones.html The following custom ...
0 votes
3 answers
526 views

Exeption: "attribute 'remove' is not allowed." in developer mode

When i enable the developer mode on my Magento 2.3.3 instance i get the following error message when calling category pages in webbrowser: Exception #0 (Magento\Framework\Config\Dom\...
1 vote
0 answers
50 views

Magento 1.9 - Hide Category product slider out of stock products

I have disabled displaying out of stock items by Admin panel. But It doesn't hide in category tab slider. All items are out of stocks as per the below snapshot.How can I get out of this issue??
0 votes
2 answers
1k views

Magento 2, Change On click instead of 'hover' for menu

In Magento 2 for the main menu, they dropdown with hover. How to change the dropdown on click instead of 'hover'.
0 votes
1 answer
386 views

Difference between Enable category and include in menu

What is the exact difference between Enable Category and Include in Menu. As both do the same thing hiding the category/sub category from front end menu. Only difference When I make "Enable category" ...
0 votes
1 answer
176 views

How to add more product data in catalog_category_view.xml?

We get more product related information in the $_product->getData() in the product detail page, but not in category page. Currently the only data available in the category page are, Array ( ...
1 vote
0 answers
44 views

Moving 'category-view' div out of 'column-main'

Using Magento 2.3.2. I want to move the category-view div out of the column-main div whilst still keeping it under the columns div. So it is a sub-div of columns (like column-main) rather than a sub-...
3 votes
5 answers
7k views

Magento 2: How to Get Subcategory Image in Category Page?

I want to display subcategory in category page with the image. I've to put below code get only subcategory name not getting the image. How to get subcategory image in category page? if($this->...
5 votes
3 answers
6k views

Execute JavaScript code after swatches are displayed in category view

I'm trying to trigger custom event whenever Magento displays the product swatches in category view. It looks like Magento uses ajax to load these swatches, they are not displayed on page load, they "...
2 votes
1 answer
383 views

Magento 2: Category Pages from Page 2 shows without products always

I'm trying to migrate a Magento 1.9.3.6 to Magento 2.3 and I found a strange problem. I've got some categories with thousands of products, I can see 64 products in my first page or 16, but if I go to ...
2 votes
0 answers
72 views

Magento sub-categories listing on category pages cache issue

I have the following static block to display my sub-categories in the categories page: <div class="category-products2"> <ul class="products-grid subGrid"> <?php $_categories=$this->...
1 vote
0 answers
291 views

Product list page Toolbar issue

I have issue regarding category page. While I click on mode switcher in grid view to list view its not working. and also try to change Sort by value and Show number of product its not working. ...
2 votes
2 answers
1k views

Magento 2: I need to change template for different categories

I need to change the template for subcategories(like able to assign any category) and list.phtml is fine. But need to change template for random categories. Any one have solution for this?
1 vote
0 answers
150 views

301 redirect loop on category view

when I try to access a category page, I get the error ERR_TOO_MANY_REDIRECTS caused by 301 redirects. Also trying by not rewritten url (like "catalog/category/view/id/309"), the result is the same. ...
3 votes
1 answer
2k views

Magento 2 : How to write controller to load category page?

I have customized a Layered navigation modules in Magento 2. However, I can't write a controller to get all content of category page and load into controller page(localhost/magento2/layerednavigation/...
3 votes
0 answers
191 views

How to display products on a homepage in a list mode in Magento 2?

I tried to use Catalog Products list to display products on my homepage (not category page). By default, all products are shown in grid mode. And I see that there is only one option of grid mode in ...
0 votes
1 answer
403 views

view custom message in product page by category id

How do I display a message (ex. AVAILABLE IN 30 DAY) in product page only for a specific category id (98, 100 and 101)? I've created <?php if($_product->isSaleable()): ?> <div class="...
0 votes
2 answers
681 views

Remove add to cart on category product

I am trying to remove the add to cart and add to compare buttons from the category page. At present I have used the following code: <referenceBlock name="product.info.addtocart" remove="true" />...
2 votes
1 answer
312 views

Magento 2: Get recently reviewed Products on Category Page

On the product view page the reviews get loaded via the following code: $_items = $block->getReviewsCollection()->getItems(); This is what the getReviewsCollection function looks like: ...
2 votes
1 answer
573 views

filtering product collection on category page based on custom customer attribute

I've been struggling with Magento\Catalog\Block\Product\ListProduct::initializeProductCollection() from a few days. I need to filter category product collection based on user's location. So ...
2 votes
2 answers
1k views

Move category title above category page image

I want to move the category title to this image: Is it possible to do it with the layout.xml or is CSS needed to move it there?
1 vote
1 answer
400 views

magento 2 Deepest Category product list page gives Error 500. Which files to inspect?

The site I'm working on the lowest category page (suppose to be list view) give the error 500. I'm not quite remember file I edited. search result also return the same error. Which files should I ...
2 votes
1 answer
215 views

How to remove SKU from product name in search results?

How can I remove SKU from product name in search results? In category view, product name is without SKU but when I search for some product, the results is including SKU in product name.
0 votes
1 answer
307 views

How can I edit files like frontend/.../category/view.phtml?

I have been trying to edit some files from the frontend folder. On this folder I have the following folders: base, default, rwd and typologancee. I have to create a specific filter which is going ...
0 votes
1 answer
519 views

Attribute not showing category

I am using Magento 2.2 for my store. I have created a custom attribute. I have modified list.phtml and catalog_product_view.xml and I have created a myatrribute.phtml. I have also enabled visible in ...
0 votes
1 answer
263 views

catalog_product_view.xml is loading from vendor folder, instead of theme folder

I'm trying to remove the category title & category images from category view page. However, when i edit the catalog_product_view.xml from the (Infortis Ultimo) theme folder app/design/frontend/...
0 votes
2 answers
261 views

Magento 2.2.6 - New categories not showing products

After created new category products not showing, it shows blank page with no error. But for other categories products shows. Any help should be appreciated.
0 votes
0 answers
26 views

Magento 2 sometimes don't show items in the second category

I have two basic categories (woman/man) with many subcategories and products. Sometimes, just sometimes the products in the second category "man" don't appear in the frontend. In the backend they are ...
2 votes
3 answers
19k views

Magento 2 How to get first level parent category of current Category?

I want to get the first level parent category of the current category. I have a code but it gets only the parent of the current category: protected $_registry; public function __construct( ...
3 votes
1 answer
4k views

Magento 2 : Sub Categories not Showing in Layared Navigation

I have install Magento 2.1.3 with Porto Theme. In category page, Few sub category display proper with products count and Faw doesn't appare/display but it has product. I tried to disable all custom ...
0 votes
0 answers
175 views

Product Prices Not Showing On Category Pages

I can't seem to find anyone else that has had this problem. But I noticed my category pages are not showing the product prices. <?php echo $this->getPriceHtml($_product, true) ?> works on ...
2 votes
0 answers
245 views

Category page, static block and layered navigation

On Magento 1.9 I have a category page with produts and static block. For static block I used a block type="catalog/product_list with a custom template. In the html template I loaded a custom ...
3 votes
2 answers
87 views

Is there a faster way for me to show 'Only X Remaining' on a category page?

1.9.3.1 - My catalog setup is using configurable products with associated simple products. My category pages show the configurable and I'd like for the 'Add to Cart' text to read 'Only X Left' if all ...