Questions tagged [category]

Questions about product categories in the Magento catalog

Filter by
Sorted by
Tagged with
2
votes
1answer
997 views

Assign a separate theme to product pages and categories

I have magento 2 and a requirement to show a certain category, subcategories and product pages in those categories using a different layout then other product pages on my store. So just to be clear: ...
0
votes
0answers
7 views

wysiwyg custom category attribute value not getting in Magento 2

I have try to get wysiwyg attribute value in frontend this is my code :- InstallData.php <?php namespace Attribute\Categorybanner\Setup; use Magento\Framework\Setup\InstallDataInterface; use ...
0
votes
0answers
15 views

How to get contact us email from get category content tab form select drop down attribute in Magento 2.3.1

How to get contact us email from get category content tab form select drop down attribute in Magento 2.3.1 form_select category custom attribute how to get contact us from there. app/code/Vendor/...
5
votes
2answers
4k views

Magento 2 Import categories using csv

I have around 500+ categories in my csv. I'm trying to import only categories using csv. Can anyone knows how to import only categories in magento 2 using csv?
4
votes
4answers
8k views

How to call category collection on home page in magento 2?

I want to show all the category on the left sidebar on home page. Please let me know how to get all the categories by collection, or there is another way to call all the category. please let me know
1
vote
4answers
4k views

Magento 2 : Show category with images in homepage

I want to display all category list on home page. Show categories details like categories name with categories page link, categories image and categories description. Thanks.
1
vote
4answers
13k views

how we can show all categories in magento2 on home page

we have used this link and install module step by steps http://www.ibnab.com/en/blog/magento-2/magento-2-frontend-how-to-call-category-collection-on-home-page My module is installed and showing up ...
0
votes
0answers
12 views

I need to show the layered navigation according to the Category in magento 2.3.5

I need to show the filters according to the categories. Categories: Tyre Tube Filters: Brand Thickness Size Model Vehicle Need to show the filter according to category Tyre: Brand, Model, Vehicle....
3
votes
1answer
1k views

Get frontend category URL in admin area with correct base URL

I try to load categories in the admin area with store specific values. $this->categoryCollectionFactory->create() ->setStoreId($storeId) ->addAttributeToSelect(['name', 'url_key'])...
0
votes
0answers
11 views

Exclude products which are in more than one category from Cart Price Rules

I have a problem with Magento 2. We have products in more than one category. Now we would like to create a cart price rule, but we would like to exclude products for which one of the categories is ...
1
vote
2answers
5k views

Set default value for attribute in Setup Script in Magento 2

I have created install script to add an attribute to category. Default value has to be set, thus 'default' => '1', is used. InstallData.php file: public function install(...
5
votes
3answers
7k views

Magento 2: Using a Flat Catalog is Helpful for Performance?

We can configure Flat Catalog for Category & Products from Admin -> Stores -> Configuration -> Catalog -> Catalog -> Storefront Tab. If it improves the performance of Magento, then ...
2
votes
1answer
816 views

Set Category Attribute to Use Default Value

When setting the product to use the default value, setting the value to false would do it. Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $product = Mage::getModel('catalog/...
1
vote
1answer
921 views

“Could not save product ”5648“ with position 1 to category 6”

When I tried to remove the category from the product edit page the following error is getting displayed. I am saving the product manually via admin end.....
13
votes
5answers
16k views

Magento 2 : How to check if we are on a category page or product page?

Is there a way I can check that If a user on a category page,or an individual product page in Magento 2? Any help would be greatly appreciated!
0
votes
1answer
11 views

Duplicate url issue when removing products from category in magento 2.3.3

When i try to remove products from category https://prnt.sc/vl7rt3, i get duplicate url error. https://prnt.sc/vkscz9. I know how to resolve it. but need to understand when a product is removed from a ...
1
vote
2answers
927 views

Magento 2.2.2 : Move Category Navigation Section

How to move category navigation section after home page banner in magento 2.2 class="sections nav-sections" and my current site link in magento 2.2 and link and screen short please check solivr....
3
votes
1answer
816 views

Category sidebar use SEO url vs cat=

Currently on my site when I visit a top level category from the sidebar the URL is: http://example.com/top-level-category Then when I click a sub-category in the resulting sidebar the URL is: http://...
0
votes
1answer
858 views

Magento : Show Categories on Left When I am on Sub-Category

I'm new in magento 1.9 I need to showing categories in sub category page under layered navigation. I searched in internet but I can't find exact solution. Can anyone pls help me.
3
votes
3answers
1k views

Magento 2.x Elasticsearch Category Products Not Showing

I tried to upgrade my Magento 2.3.5 install to Magento 2.4.0, but am unable to get category pages to display products. Everything is in Docker, so I am using Elasticsearch 7.6 and have specified ...
0
votes
1answer
1k views

Magento 1.9 - How does pagination work on category pages

On a category page when I choose to display 12 products per page it still shows all products from that category. Where does this actually get applied to the category product collection? I'm using ...
0
votes
1answer
1k views

Magento2: How to build a custom category link widget with attributes?

I'm trying to build a category link widget similar to the core one, but that can pull in additional information from the category selected, such as the image thumbnail and maybe some custom category ...
0
votes
1answer
20 views

how to get category path in magento 1.9

I am importing categories in magento 1.9 . but when i import categories it shows error "Path provided is not a valid one" how can i get exact path of category. URGENT
0
votes
1answer
977 views

Category menu linking direct to product

I have a single product and I'd like to link straight to it from the category button is this possible? For example I have a category called "custom Cut Board" I only have one product attached to the ...
0
votes
0answers
3 views

Can I get whole categories (Item Types) as search results from my website's search bar?

Many visitors of my website search for categories instead of certain items on the search bar. However the store is not configured to show this type of results. What would be the way to define a number ...
0
votes
0answers
13 views

Magento 2.4.1 - Category anchor not saved scope view

We have a problem in our Magento 2.4.1 install with the category anchor saving. In the All Store Views scope the category is set to Anchor No. When we change the scope to the only store view we have, ...
0
votes
1answer
1k views

Magento 2 - On category save 'URL key for specified store already exists' error occurred

After migration process, I can not save category page. I try all solution but not getting the success it gives an error like below image. http://prntscr.com/irfiml
0
votes
1answer
906 views

Include in Menu for all store views in Magento 2

In Magento 2 when you edit a category by products / categories you can choose the option "include in menu". We have a multishop with several shops that use the same root category, but it is not ...
0
votes
1answer
6 views

I want to add an image uploader same like already exist in catalog/category/index/ name homepage image in same page

I want to create a image uploader on catalog/category/index/ just like homepage image which is on catalog/category/index/ page Now I am using this to create same above but not success InstallData.php ...
3
votes
3answers
989 views

magento 2 Cant show products on categories

I have added some products in one category. All products are enabled, with quantity and catalog, search option, I have also disabled cache and reindexed multiple times but on the frontend the product ...
1
vote
2answers
4k views

Add Category filter in best seller product Collection

I get best seller product for all category using below code public function __construct(\Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory ) { $this->...
0
votes
0answers
38 views

Magento 2: How to pass “form data” Rest API in create product postman

I have created product api and passed form-data in postman but i have faced issue in pass category_ids and image. Any have idea how to pass category_ids and image in postman while creating product API....
0
votes
0answers
16 views

Magento2 category class getting removed from body tag

I used below code to set the category class in body tag, but the issue I am facing is that it always get removed when cache is cleared $category = $this->registry->registry('current_category'); ...
0
votes
1answer
24 views

How to delete a product's category Magento2

I am trying to delete a product's category in magento 2 using the following code. public function deleteCategories($product_id){ $categoryIds = $this->productCategory->getCategoryIds($...
0
votes
0answers
27 views

Modify existing custom attribute value of category in magento 2.4 using rest API

As the title says, I want to modify the value of a custom attribute of each of my categories in magento 2.4 and I want to do this using REST APIs. I am using this endpoint https://magento.redoc.ly/2.4....
1
vote
1answer
1k views

Category page image upload issue

I am trying to upload Thumbnail image and image for category page but it is neither uploading nor showing any error. I have cleared cache and also done indexing but still no output Any solution??
0
votes
3answers
26 views

Edits to Category pages not showing

A couple of months ago I ran a special sale on my two stores' sites. I added info to the category page's header *("Prices have been discounted an additional 25% off now through 8-31-20! ...
0
votes
3answers
45 views

How to add custom class in Magento 2 Category page?

I want to add custom class in Magento 2 category page like in column main and sidebar sidebar-main How to add custom class with these class ? Any help is appreciated.
1
vote
0answers
38 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 ...
0
votes
1answer
808 views

How to display categories and subcategories in layered navigation magento2?

These are Categories List in admin: If I click Shop then I want to display categories and sub-categories in layered navigation filter. How can I achieve this functionality?
0
votes
1answer
39 views

Magento 2 - Filter through non anchor categories throws “The bucket doesn't exist.” exception

I am facing this issue on M2.3.5-p2 when filter through non anchored subcategory on the main category(anchored) page. Steps to reproduce From the admin set parent category anchor to Yes. For one of ...
2
votes
2answers
78 views

HTTP 500 error with a php script

The following piece of code provided by SuperDicq Remove products from all categories when price is zero) gives me a HTTP 500 error, anyone knows what's wrong? I changed the name of htaccess, put ...
0
votes
0answers
13 views

How to add simple product ID to swatch data on category page

How can I add simple product ID of the swatch on category page?
0
votes
0answers
6 views

Category Image with Category Id in Magento 2 Api

I want to show category id with category image in magento 2 rest api http://domainname/rest/all/V1/categories?rootCategory=2 this is my api response and here not show category image { "id": ...
1
vote
1answer
790 views

How to check the category collection is empty or not in magento 2?

I am getting the subcategories of a main category like this(this file is in root folder) use \Magento\Framework\App\Bootstrap; include('app/bootstrap.php'); $bootstrap = Bootstrap::create(BP, $...
4
votes
1answer
964 views

magento 2 | Categories not showing in Admin Product Edit Page

I have started working with magento earlier this year, I am running magento CE 2.2.2 I have noticed that when I go back to edit a product from the catalog I have noticed that the categories are not ...
3
votes
4answers
8k views

Magento 2.2.4 The value specified in the URL Key field would generate a URL that already exists

when I have the category in product assign and saving category below error showing The value specified in the URL Key field would generate a URL that already exists. To resolve this conflict, ...
2
votes
1answer
1k views

Drag and drop category error

I get There was a category move error. on moving(drag and drop) subcategory to another root category. How I debug this? on console I get Expected to start loader but did not find one in the dom this ...
0
votes
4answers
781 views

Export Products on a Category

Is there a way that I can export all products on a certain category via CSV or excel file?
0
votes
1answer
17 views

Magento2 How to get Store specific Category Id In custom page by using Category URL If same URL exist in both the stores?

I am having the same category in 2 stores and on the custom page, I need category detail as per current store id. I am using the below code to get a category by using the category URL. In block public ...

1
2 3 4 5
52