Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [category-products]

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

0
votes
0answers
30 views

Magento 2.2.4: Could not save product “3395” with position 1 to category 1882

I am using Magento 2.2.4. Assigned a product to two categories. One of the categories is a child of the other. Following error is thrown while saving the parent category after removing the product ...
2
votes
1answer
36 views

Remove products from all categories when price is zero

For SEO reasons I want to keep products which are not being produced anymore on my website, so I edited some stuff so when I change the price of the products to 0,-. It displays a text that the ...
2
votes
0answers
37 views

Magento2 : Add New columns in “Products in Category” [closed]

I want to add new columns in Magento 2 admin category where product assign to category with product details. Please check below image for more details: Here, I have tried to add column using xml ...
2
votes
1answer
21 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
2answers
26 views

Unlink and link product to category

Need a script where current existing products needs to unlink and link to other categories. let me know the process also
2
votes
0answers
24 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 ...
1
vote
1answer
28 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
0answers
30 views

Adding Product to category programmatically getting error in Magento 2.1

When I am adding the product to a category I am getting below error : "Category does not contain specified product" The error comes from the below file : vendor/magento/module-catalog/Model/...
0
votes
2answers
33 views

How to get all the Children Categories IDs of the Specific Category in Magento2

I want to get all categories of the specific category for that I tried public function categoryHide() { $data = $this->arrayData(); $save = array(); $objectManager = \...
1
vote
1answer
22 views

How we can noindex,nofollow the category-product-url?

I want to noindex,nofollow only those product urls in which category is coming in url. For example : I have product abc.html and it is assigned to 2 categories so it can open by three ways. 1. ...
1
vote
1answer
16 views

Products Not Showing on Front End

I have had this problem for some time now, I import new products using MAGMI and after re-indexing and cache clearing the products do not display on the front end in the respective category pages. ...
1
vote
0answers
34 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. ?
1
vote
1answer
46 views

How to get products filtering by category and attributes?

I have searched about how to filter and I have tested about 20 codes but always return "". The situation is the following: - For the current category, I have 8 attributes, 7 are multiselect checkbox ...
3
votes
0answers
40 views

Magento 2: How to add quantity field in category page [duplicate]

I need to add quantity box in category page. your help will be greatly appreciated
0
votes
1answer
47 views

Magento 1.9 addAttributeToFilter() returning 0 products

I have the following code where i want product collection filtered with custom attribute. typeid = $data['categoryId']; $pagesize = $data['limit']; $pageno = $data['page']; Mage::app()-&...
1
vote
0answers
17 views

How can I show all products in a top level category sorting by the child categories?

I have this category structure below: When I access Men page all products of child categories are there, but they are showing in a random mode, i believe. I want to show the products in the main ...
2
votes
1answer
63 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 ...
0
votes
0answers
40 views

Assign product to category programmatically Magento2 receive an error

I'm trying assign product to categories using code like there Assign products: ......... $this->categoryLinkManagement->assignProductToCategories( $product->getSku(), ...
0
votes
0answers
17 views

How to get all categories and products in one collection in magento 2

How to get all categories(with levels) and it's products in one collection in magento 2
0
votes
0answers
31 views

Magento 2 keeps adding category path to product url in multistore

I have a little problem in Magento 2 Multistores... My URL rwewrites keeps adding category paths to products urls even when config settings "Use category path for product URLS" is set to "no".. I ...
0
votes
0answers
37 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 ...
0
votes
0answers
27 views

how to sort products on custom attribute and then on sku in magento 2 category page

how to sort products on custom attribute (i.e. brands) first and then on sku in magento 2 category page For example if 10 products have same brand then it should sort that 10 products on SKU
0
votes
1answer
29 views

Magento 2 Product Form Categories Sort Alphabetically From the Backend

I want to sort Categories alphabetically of the product form, how can I? For more clarification please look onto the below picture. As I checked, by default Magento 2 sort according to the category ...
0
votes
0answers
32 views

how to use product watermark image in category image in magento 2

i need to display watermark on category image like product image.i want to use default watermark image of admin which are used in product image it should be added in category image too can anyone help ...
0
votes
1answer
35 views

Best seller items in category magento 2

I have used below code to filter products by category id. $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $catalog_ids = 4; $productCollection = $_objectManager- >create('...
0
votes
0answers
29 views

Magento2: custom script for category product sort order position

I need custom script run for specific category products position and use this spreadsheet to change the sort order of the specific category "position" If anyone idea reply me as soon as.
0
votes
2answers
49 views

Get Product Collecton by category with filters in magento 2

I need to filter category product collection with Instock items and only simple products. I have used below code to implement it.But the out of stock products also fetching with the collection. ...
0
votes
2answers
76 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.
4
votes
1answer
67 views

Magento2 - Show Instant Purchase on product listing

By default Instant-purchase button is shown on product details page, but I want it also to be shown on Product listing as well. I searched in backend, but didn't find any solution. How can this be ...
0
votes
1answer
17 views

How can I show specific products on homepage in Magento 2?

How can I show specific products on homepage? It has to be client friendly to do in CMS. I tried displaying a category then changing the sort order on products in category.
0
votes
0answers
14 views

How can open Category item in new tab?

How can open Category item in "new tab"? In home page all item open in new tab because I have used target="_blank" but this attribute not working on my category page. my category root path is /...
1
vote
1answer
33 views

Magento 2 in how to splited in bulk import child categories using(,)?

how to split in child categories in bulk import categories using (,)? Default Category/Tools,Default Category/Tools/Electrical Supplies,Default Category/Tools/Electrical Supplies/Boxes,Switches,...
0
votes
1answer
48 views

Multiple add to cart from product list

I'm trying to create a custom list.phtml template for one particular category that will function as a way for a wholesaler to quickly add lots of products tot he cart at once. I have the attached ...
1
vote
1answer
15 views

Could not add pagination while fetching product as per category ID

I am using end point API to fetch product as per category id and want to add pagination on it but in my code its not happening like this. I am explaining my code below. $quoteUrl ='http://example.com/...
0
votes
1answer
67 views

Change sorter in category select box to <ul> <li>

I want to change sort by select box into <ul> <li> type by using javascript so I can change style css for it. How can i do this?
2
votes
0answers
165 views

Product assigned categories are not visible in administration

My products are assigned to multiple categories. Here's the issue: In frontend, I can see products listed in each category viewed. In administration category edit page (Catalog > Categories > ...
0
votes
0answers
15 views

magento 2.2.6 Simple Product will be output when searching on the category page

magento 2.2.6 Simple Product will be output when searching on the category page. If you solve the same problem, please tell me how to do it.
1
vote
1answer
32 views

which one is the main category of product

I need to take the main category . i try the following code $product = $objectManager->create('Magento\Catalog\Model\Product')->load($itemid); $cats = $product->getCategoryIds(); print_r($...
3
votes
0answers
49 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....
0
votes
0answers
122 views

sql error while adding any products to category : M2

Something went wrong while saving the category.SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (mydb....
0
votes
0answers
16 views

Magento specific Categories are not displaying in layered Fiter Navigation

I am working on a Magento website 1.9.3.7 and there is an issue in category display in navigation filter. Only some category is displaying in layered navigation filter but newly categories are not ...
0
votes
1answer
246 views

Magento 2 - Import product position in category from CSV

I've noticed the only way to update the product position in a category is to manually do it from the back-end or change the database from PHPMyAdmin. Is there an easier way to process this in bulk, ...
2
votes
1answer
30 views

Show only products on a new category page which have a certain product attribute enabled

I want to create a new category page which shows all products which have a certain product attribute (speed_delivery) set to yes. I was thinking about to create an empty category, catch its product ...
0
votes
1answer
51 views

Products Collections not loading using block in cms magento 2?

app\code\Namespace\Module\Block <?php namespace Namespace\Module\Block; class Catproduct extends \Magento\Framework\View\Element\Template { protected $_storeManager; ...
1
vote
1answer
478 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
1
vote
3answers
39 views

Product collection by category id, gives zero products

The following code, returns an empty collection in most categories, even if the category indeed has products: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $...
0
votes
1answer
39 views

Magento 2 Products assigned to category issue

For some reason we are experiencing a issue with our Magento site with products randomly being added to a certain category. We have removed them several times but they randomly appear in that ...
0
votes
0answers
28 views

Custom product limit value change if i change category

If a user set custom value for "Product per page" (eg: ?product_list_limit=48) the value is restore to default (admin value) if user change category. Why? In magento 1 the user custom value was ...
1
vote
1answer
144 views

How to get product parent category id and category id separatly in magento 2.2.6 using product ID?

Problem definition: I have product under below category: Beauty --> Sun --> my-some-product-name. where 'Beauty' is root category and 'Sun' is the subcategory of 'Beauty'. Currently, I am ...
2
votes
2answers
77 views

Magento2: Not in value Category ids product collection issue

Product collection issue $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection'); products = $productCollection->addAttributeToSelect('*') ...