Questions tagged [category-products]

Questions related to Category Products Management and the relation between categories and products.

239 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
2answers
4k views

Magento 2 how to filter product collection on category page with custom filters

I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products ...
4
votes
0answers
775 views

Magento 2.4 - Elastic Search Out of Stock products at end of Product Listings

I need to display Out of Stock products at end of the Listing in category page. I have overided the SetCollection method in Toolbar.php using around method(upto magento 2.3.5 without elasticsearch it ...
4
votes
0answers
79 views

Magento 2 How to duplicate the category with same structure?

I want to duplicate the category with the same structure and data. How to duplicate child categories here? It is working correctly for a single category. In my controller file, I have the parent ...
4
votes
2answers
2k views

Magento2 Add dropdown option in product listing page for configurable product

I want to change text-swatch to dropdown in category page. I want here drop down instead swatch
4
votes
0answers
326 views

Magento 2 Category Field in Backend empty, Index Table wrong?

I'm trying to add categories to my products via Admin UI but unfortunately, the field in the backend is empty and doesn't show my categories: I've had this problem since some weeks, but usually it ...
3
votes
0answers
1k views

Magento 2.2.6 Pagination not working in Category pages

We have upgraded Magento 2.2.3 to 2.2.6. After upgrade page filter is not working. It is loading all the products in category page. The drop down still says 9,18,27. But it is displaying all ...
3
votes
1answer
406 views

how to solved table catalog_product_entiry issue : M2

I found there is issue with row_id and entity_id in this catalog_product_entity. I'm not able to assign product to category, it gives this error: Something went wrong while saving the category....
3
votes
0answers
971 views

Magento2: How to show Product Weight on Filter

Need to show Product Weight on Category Page Filter, so Customer can also filter via Weight. A user can also enter the weight in Text Box & Search, so it's vice versa between Slider & Textbox....
2
votes
0answers
85 views

Null condition present on Category Products Collection Query

Currently I am on Magento 2.4.2 which was upgraded from 2.3.0. The issue which I am facing right now is that I am not able to see any products displayed on category page. After debugging the below ...
2
votes
0answers
66 views

Products not appearing on category page after upgrade from 2.3.0 to 2.4.2

I have upgraded my Magento v2.3.0 to v2.4.2 running on Mysql 8. Everything went well except products not showing up on category page. Below is the class responsible to fetch products on category page. ...
2
votes
0answers
58 views

Magento2.3: Compare slider is not working

We have customised the compare products as per our requirement. However, Its not working as expected. I'm not sure, whether the data binding is working or not. For your information, I'm using slick ...
2
votes
0answers
25 views

Get all associated categories from product collection

For a custom filter on the product collection i need to be able to get all associated categories from all products from the catalog search result. On top of that, i do not need the actual categories ...
2
votes
1answer
549 views

Magento 2 How to duplicate category products into another category

I am working on duplicate category, In my controller file, I am able to duplicate the category but I need to assign the same products to the newly created category from the old one. i.e. I have the ...
2
votes
1answer
162 views

Magento 2.5 show out of stock products at the end of the catalog

I want to display out of stock products at the end of the category page of Magento 2.5. I add this code: vendor/magento/module-catalog/Block/Product/ListProduct.php $collection = $layer->...
2
votes
1answer
361 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
34 views

Magento 2 : Product list only shows one product in one of the category, the rest works fine

Product list only shows one product in one of the category, the rest works fine. That category has more products, if you search for a product, you can access its product view and in related products ...
2
votes
0answers
66 views

Magento2: Class not found error

Product category page is not working. My Magento v2.0 Got the error below. use Magento\Framework\EntityManager\MetadataPool How can I solve the issue. ?
2
votes
1answer
503 views

product displayed in one column only instead of 2 column on phone in magento 2.3

when you view a category on desktop shows 3 column but on mobile phone it shows product only one column instead of two column of the page. whats wrong with magento 2.3.0 check the link on mobile ...
2
votes
1answer
121 views

How can i show USPS Media Mail Only For Books not for other Products?

I have different kinds of products, USPS Media mail is good for books, but not for all products. How can i restrict Media Mail Not allowed for other products. Condition: 1) If cart consists both ...
2
votes
1answer
409 views

Magento 2: Product not showing in category page

I changed reindex mode Update by Schedule and add some product using custom script. But now when I run reindex command (CLI) then none of the products are showing into category page. Product is ...
2
votes
1answer
799 views

Cannot remove products in category

I got this error when I tried to remove a product from category page Something went wrong while saving the category Currently, I'm working with Magento 2.2.3. Can anyone please explain about ...
2
votes
0answers
184 views

Magmi Multi-Store Categories Import Error

I need to assign categories for my multistore, CSV : Store : Magmi Error:
2
votes
1answer
1k views

Getting Products by category id! Magento 2.1 REST

How can I get products of specific category? For Example If I hit https://www.example.com/index.php/rest/V1/categories/[category_id]/products it should return all products of same Category [...
2
votes
0answers
429 views

Product and Category name not showing as page title

My page title only show the suffix page title, i need to uncheck the page title in category page and add the page title manually so the page title will show up and for product i need to fill the meta ...
2
votes
0answers
84 views

I would like to pull all attribute data from a specific category, using SQL or a PHP script

I figured I could do a simple SQL query since this is on my development environment: SELECT * FROM catalog_category_product WHERE category_id = 116 It looks like it returned the correct amount of ...
2
votes
2answers
3k views

Display categories and sub-categories

I'm tryng to display categories and subcategories on a cms page <?php $categories = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToSelect('*') ...
2
votes
0answers
358 views

API Magento catalogCategoryUpdate function not working after moving to SSL

I was working with SOAP on Magento like $client = new SoapClient('http://host/index.php/api/v2_soap/?wsdl'); and after moving to $client = new SoapClient('https://host/index.php/api/v2_soap/?...
2
votes
1answer
260 views

Magento 1.9 SHOP BY CATEGORY translation not affected

Magento 1.9 SHOP BY CATEGORY translation not affected how can i translate to french i'm using Porto theme please help me.
1
vote
1answer
117 views

Catalog Category permissions keeps on changing automatically in Magento 2.4.1 Enterprise Edition

We are using Magento 2.4.1 Enterprise Edition. Suddenly our built-in catalog category permissions keeps on changing automatically (category permissions are set to "Deny"). which caused PLP ...
1
vote
0answers
17 views

Category "Match products by rule" not considering store price

We are using category "Match products by rule" option for assigning products to categories. We have multiple stores with different currencies. When we save a category at the store level ...
1
vote
0answers
51 views

How to load category products in batches? Enable "Allow All Products per Page" without compromising performance

TLTR: How to load category products in batches? I want to show ALL products for a category and remove the pagination. However, that poses a huge performance concern that I need to address. Let's ...
1
vote
1answer
55 views

Error when getBlock('category.products.list') in Observer

public function __construct( Config $pageConfig, Category $categoryHelper, UrlInterface $urlBuilder ){ $this->pageConfig = $pageConfig; $this->...
1
vote
1answer
78 views

How to set a minimum qty 2 of specific category - Magento2

How to set minimum qty for specific category? For example: I have 2 categories. one - test second - test2 For test categories products : I want minimum qty should be 2. and test2 categories customer ...
1
vote
0answers
31 views

Add editable attribute column in products in category grid

I have added an extra editable attribute column in "Products in category" grid. I am using the below link to add the column. Add filtrable attribute column in products in category grid Here ...
1
vote
1answer
39 views

magento2: Category and product page not working properly - Luma Child

I've created a child theme of the Luma theme with basic theme files. I've default.xml files on the theme layout and web folder (for js and CSS). All pages are working fine but when I started adding ...
1
vote
0answers
73 views

Magento 2.3.2 - Products with same position in category sorting issue?

We recently migrated a store from M1 to M2.3 - the site has thousands of products and hundreds of categories. Within each category, there are several instances whereby more than one product has the ...
1
vote
0answers
65 views

Magento 2 - Show Subcategories and Images on Category Template

I want to show subcategories and the images on the category page. If the user clicks on Apparel the page would show all the subcategories with the subcategory image. I placed this code in my theme ...
1
vote
0answers
43 views

Add transparancy in ->backgroundColor(array(0, 0, 0))

I want to add Transparancy in this code line. I'm using Magento 1.9.3.10. I already tried ->backgroundColor(array(0, 0, 0, 0.4)) but this does not seem to work. It just show's black background. Full ...
1
vote
1answer
272 views

Magento2.3: item count is not updating in category page

We have added some of the products in one of the category. When we go to that category page, the item count is not updating. It always showing "1 Total Result". Please see the below screenshot once. ...
1
vote
0answers
23 views

How can i modify admin category product pagination in magento 2?

I want give custom pagination for category product list like more than 200 or 999. So, admin user can see more than 200 products at a time.
1
vote
1answer
800 views

Magento 2 - Assign product to category on frontend

I am creating a frontend from for Sellers to add/edit their product on website, product adding/editing is working perfect. Now I have to assign that product to a category Almost on every article and ...
1
vote
1answer
179 views

Magento 2 add parent category class to body for product listing page

I have number of subcategories under a main category called 'services'. I want to add a custom class 'service-listing' to body on all the subcategory pages under this category.
1
vote
0answers
25 views

magento 2 How to customize product list pages of all subcategories under specific category?

I want to customize all subcategory pages whose parent category is 'Services'. The customization includes following: Remove Toolbar Add filter for gender (gender is product attribute) Add custom ...
1
vote
1answer
104 views

Magento2: How to show product URL on Homepage

I have to show list of product on same category on homepage I have achieved the same using CatalogWidget but got issue with URL, It shows URL like example.net/product but I want to show URL like ...
1
vote
0answers
57 views

Sorting is not working on category page

We have dropdown, which have an option to sort the products by position, name, etc., but its not working. Could anyone please help me?
1
vote
1answer
25 views

When I use "echo" in vendor methods - products not showing, but work fine without it

I got the next code: public function getProductCollection() { if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) { $collection = $this->...
1
vote
0answers
153 views

Add new column in Category Product Grid

I need to add additional information to the catalog_category_product table. This information is to be entered and saved in the category product grid, in a column similar to Position. Task I've ...
1
vote
1answer
1k views

Magento2.3 adding the products automatically to the parent category and to the subcategories which are on higher level

I am using Magneto2.3.0 I need this adding the products automatically to the parent category and to the subcategories which are on higher level If anyone idea reply me how to achieve this requirement....
1
vote
1answer
47 views

Magento2.3.0 Categories - I wish the products which are in child category will be visible in each parent category by default

I am using in Magento2.3.0 when i create product in admin side i need to Categories - I wish the products which are in child category will be visible in each parent category by default. adding the ...
1
vote
0answers
72 views

How to configure Category product listings in Mobile?

We knew the steps to configure the product listings in Magento 2 on Desktop view and done successfully as per our need. Now, we wanted to show 2 products per row in portrait mode and 3 products per ...

1
2 3 4 5