Questions tagged [category-view]

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

Filter by
Sorted by
Tagged with
4
votes
3answers
5k 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 "...
4
votes
1answer
398 views

Layered Navigation not showing the right options after overriding product list block

I've successfully override productList block to show my custom filtered product collection like this: di.xml <preference for="\Magento\Catalog\Block\Product\ListProduct" type="\Vendor\Module\...
3
votes
2answers
65 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 ...
3
votes
1answer
833 views

Magento 2 remove breadcrumb empty title category view

I am developing a custom theme which never displays the breadcrumb, so I removed it in the default.xml: <referenceBlock name="breadcrumbs" remove="true" /> This caused that the category view ...
3
votes
1answer
3k 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 ...
3
votes
1answer
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
0answers
93 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 ...
2
votes
2answers
818 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?
2
votes
3answers
14k 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( ...
2
votes
1answer
199 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
2answers
554 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?
2
votes
5answers
6k 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->...
2
votes
1answer
92 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
1answer
288 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
0answers
223 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 ...
2
votes
0answers
210 views

Adding scrollbar in category dropdown

I add 1 category name Category, and add sub categories to it. But, because there's too much sub categories, i need to scroll down the page first to see the full list of the sub categories. So my plan ...
2
votes
0answers
189 views

Show customer wishlist collection like in category view page

I want to show the customer wish list products to another customer with the layout like in category view page which include the layered navigation, toolbar option, and navigation page. Is there a ...
2
votes
0answers
71 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
2answers
2k views

Magento 2: remove the category image and description from the corresponding XML file

I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank. I need to eliminate the category image and description, more exactly the <div class="category-view"><!...
1
vote
1answer
2k views

Magento 2: How to add custom form on category page?

I am using Magento 2.1 and I am trying to add one custom form in catalog page. I override the catalog_category_view to my custom module and use this code <referenceContainer name="columns.top"&...
1
vote
1answer
400 views

All products and categories side-menu on one page

I want to display all my store products on one page, with a side menu to 'filter' on the available categories. Basicly the same view as a single categorie product list, but then with all products (of ...
1
vote
1answer
3k views

Magento 2 - Show product options and attributes in categories

I need some help to display products custom options and attributes in category view, I can't find any guide to do this. What I want to do is that if a simple product has custom options to display a ...
1
vote
0answers
40 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??
1
vote
0answers
24 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-...
1
vote
0answers
57 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. ...
1
vote
1answer
243 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 ...
1
vote
1answer
103 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.
1
vote
0answers
54 views

Removed products from a category but still showing

I removed a bunch of products from a category and it's still showing in the webshop. What I've done is: Reindexed all indexes Cleared all caches Another problem that keeps happening is that I can ...
1
vote
0answers
261 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. ...
1
vote
0answers
129 views

Sidebar next to CMS block on category page

I'm somewhat new to Magento 2 but most of it is going just fine. There is a minor issue I'm experiencing and I can't seem to figure out how I can fix this. I've added a CMS block to a category ...
1
vote
0answers
267 views

Magento 1 category page show subcategories before products

I have a magento 1 website and I want to display subcategories before products on the category page. In the admin page -> on Catalog, Manage Categories -> Display Settings -> Display Mode is set ...
1
vote
0answers
53 views

Magento 2: Display specific categories to specific usergroups

Sorry guys this might be bit silly question but I am new in Magento. I am trying to display specific categories according to specific Usergroups: For example: I have usergroups "...
0
votes
3answers
126 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\...
0
votes
1answer
847 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 ...
0
votes
2answers
128 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" />...
0
votes
2answers
1k views

How to remove the bottom toolbar using css in mobile view?

In product listing page there are two toolbars one at the top of list as shown below: another toolbar at bottom of list as shown below: Both of them are has outer div as: <div class="toolbar ...
0
votes
1answer
76 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
1answer
85 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 ( ...
0
votes
1answer
185 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
1answer
317 views

Rearrange category page in order: cat image, title, description and then products

I'm using Magetique template for Magento and I'm changing the 'listing-layout-1.xml' file. I need it to look like this Although, right now it's looking like this: And the title isn't even ...
0
votes
1answer
113 views

Magento : Check if two conditions are true (category view)

I am trying to check if two conditions are true in the Magento category view file. Specifically if parent id = 1 and if category name = Nike. Can someone please suggest how I can update the code ...
0
votes
2answers
29 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
0answers
14 views

Some subcategories not showing due to too many subcategories in a particular category (in the main category menu)

Magento 1.9.4 Porto theme We seem to have too many subcategories in a specific category and when you hover over and it drops the list down - not all of the categories are visible. Are there any ...
0
votes
1answer
19 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
0answers
34 views

How can I Create custom product sorting on category view page without use of product attribute Magento 2.4.1

I'm trying this app/code/Vendore/Sorting/etc/di.xml <type name="Magento\Catalog\Model\Config"> <plugin name="config" type="Vendore\Sorting\Plugin\Catalog\Config&...
0
votes
0answers
51 views

Magento 2.4 How created dynamic custom category layout?

How i can create dynamic custom layout for each Category and Category page? I can used catalog_category_view_id_{{id}}.xml and created custom layout for current Category{{id}} like this: http://...
0
votes
0answers
41 views

Using foreach change the position of my product collection

The best way to explain this issue is showing an example: In the product list.phtml I had the following <?php $logger->info($_productCollection->getData()); foreach ($...
0
votes
0answers
135 views

Magento 2.3.5 Layered Navigation options missing

My Layered Navigation lately shows a strange behavior but I am not sure what causes this and when exactly that happened. Not all attributes (options) are shown in the sidebar of the category pages on ...
0
votes
0answers
46 views

Magento 2 - Show Special Price on Category Page

I am trying to show the special price on the category page in the same way it shows on the item page. I copied final_price.phtml placed this code at the top : Magento_Catalog/templates/product/price/...
0
votes
1answer
180 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 ...