Questions tagged [category]

Questions about product categories in the Magento catalog

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

Magento 2 Category page add custom view mode

On category page I want to add addition view mode as "expand" with "grid" and "list" mode. If any one has created custom view mode for category page then help.
1
vote
0answers
78 views

Magento 1 : How to add custom filter in list page like price or name?

I'm building the frontend of the category page, among the filters that I have to create custom filter. I have no problem taking the data and having it available in the ...
0
votes
0answers
17 views

getCurrentCategory() returns Root Category every time on Magento 2

I detected that some categories on my site don't show the correct products. Instead, show ALL products assigned to the root category. I made a test adding this to my list.phtml: $block->getLayer()-...
2
votes
1answer
664 views

Get category name by ID

This is my Vendor/Module/Block/BlockFile.php <?php namespace Vendor\Module\Block; class CategoryList extends \Magento\Framework\View\Element\Template { public function getId() { return ...
5
votes
3answers
184 views

Get category id

How can I get ID from this code which is typed into CMS page content? {{block class="Vendor\Module\Block\CategoryList" category_id="49" template="Vendor_Module::subcategorylist.phtml"}} I need to ...
0
votes
1answer
92 views

How to display data using block code?

This is my code: app/code/Vendor/Module/view/frontend/templates/storecategories.phtml <div> <h3> <a href=""> <?php $categoryId = 65; $_objectManager =...
0
votes
2answers
493 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 = \...
0
votes
1answer
97 views

How to display categories and subcategories using category ID?

I want to show root category with it's child categories on home page. I've done my code so far, but nothing happens. Vendor/Module/Block/CategoriesCollection.php <?php namespace Vendor\Module\...
0
votes
0answers
139 views

some category image not showing magento 2

My Code is $_obj = \Magento\Framework\App\ObjectManager::getInstance(); $category = $_obj->create('Magento\Catalog\Model\Category')->load($cat_id); $fullCategoryPath = $category->...
1
vote
1answer
42 views

Magento 2: Current category not found

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');//get current category I have a ...
2
votes
0answers
45 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
154 views

Apply catalog price rule on all products of one category

i have different cataloge price rules for different products of different categories. Now i want to add a new minus discount to a category with 60 products (-5%), which i implemented successfully. ...
2
votes
2answers
87 views

How to make a Category parent link not cliquable and just the subcatgories cliquables M2

I have a category with id =41 and have 2 child i want to see the parent category and her child but just make the parent category link not cliquable any idea please and thanks in advance
1
vote
0answers
166 views

Magento 2 move page main title into div with product_list_toolbar

I want to move the page main title on the category list page into custom div and also include the product_list_toolbar into that div. The problem I face is that I can not simply move the ...
1
vote
0answers
12 views

How to Apply shopping cart rule for group products if there child products are not in same category in magento 1.9

I want to apply shopping cart price rule on category but that category have group products and there child products are not in same category. when i apply rule on group products then after i add ...
2
votes
0answers
112 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
48 views

Blocked mixed content error in console when I try to edit a product in my magento

When I try to click next product page in my magento admin panel, The loading never stop and when I go to console, it says like this.: I tried using, firefox,chrome,safari but same problem occurs. I ...
0
votes
0answers
67 views

Magento 2 - Dynamically hide empty categories based on attribute selected in a cookie

I'm trying to hide empty categories based on an attribute selected previously. Basically I have a vehicle parts website and a customer can choose a vehicle model and I've changed the products ...
0
votes
1answer
46 views

Mass Activating Magento Categories

Thanks guys for the help in getting the cat ids in magento. Found this script to mass enable categories based on IDs <?php setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $file = fopen(...
2
votes
3answers
118 views

Export Category IDs

Used this script for ages but now need the actual category Ids to be exported. public function getAttributes() { $data = array(); $data[] = array (‘field’ => ‘id’, ‘label’ => ‘ID’,’...
2
votes
1answer
127 views

Sort collection by discount

I want to sort my collection by discount percentage for my sale category, I don't know if it is possible in Magento
-1
votes
1answer
456 views

removing categorty in product page is giving error [duplicate]

We are facing issues - https://prnt.sc/mgdybf why we are not able to remove the Deal and Pre Owned category. Could not save product "26652" with position 0 to category 435 What is this error ...
0
votes
3answers
50 views

Magento 1 Redirect only works once, works again after refreshing cache

I want to add a simple redirect if a customer is not logged in when trying to access one of my categories. Now, I have created a test.phtml file and added it in my theme page/test.phtml with ...
1
vote
1answer
1k views

Multiselect category dropdown on admin form

I have created custom CRUD on new database table. I just wanted to save comma separated categories in a field. I have this code for multiselect categories: $fieldset->addField( 'categories', ...
0
votes
2answers
589 views

Magento 2 Remove paypal icon from category pages side bar

want to remove paypal icon from category pages:
0
votes
0answers
30 views

Config product options not appearing as select on category page

I've set up a config product with an attribute for colour. If I set this attribute to appear as a text or visual swatch and also set the attribute to be visible on catalog pages the swatches will ...
-1
votes
1answer
35 views

M1.9.x - Trying to get custom attribute in Navigation.php / Menu Creation

I am trying to get the page_title (custom category attribute) in Navigation.php (menu build up) to use as the html title attribute. For example this is were we would use the extra attribute in an ...
0
votes
0answers
35 views

Do I need to select the root category when adding a new product?

Root category: Root Sub categories: Sub1, Sub2 When I add a new product for one of the sub categories, should I select also the root one?
0
votes
1answer
37 views

Specific view page for products (product info) from specific category in Magento 1.9

We devided all the products into two categories: "Main products" "Accessories" All listed products from the category "Main products" are opened with our custom template: catalog/product/...
1
vote
1answer
105 views

How to duplicate category title and move description below product grid

I'm just diving into template/block/layout customization in Magento 2.2 and I'd like to move my category title from being left aligned to being aligned above the description. Currently it's like this:...
0
votes
1answer
338 views

Magento 2. How to get All Parent Categories Ids from current category ID

I'm getting the current category Id using Registry like $categoryId = $this->_registry->registry('current_category')->getId(); and to get the parent categories I tried this $objectManager =...
0
votes
1answer
32 views

import categories from magento 1 to 2

I need to import categories on magento 2 that I exported from magento 1, Is it without issue, I mean is it risky for magento 2 store. Help me please if you have any proposition?
2
votes
1answer
375 views

In Magento 2,I can't Open Categories With New URL

If I add new URL then it's showing 404 error when it open frontend side.If it open with old URL it's working. For Ex. I have added new URL "business-card-gift-card-holders123" for category.It's ...
0
votes
1answer
107 views

how to hide child of configurable product in Category page magento 2

I want to display configrable product without child product in Category page and when i access the product page of the configurable product i get the child according to my choice So how to do that ...
0
votes
1answer
53 views

Subcategories of disabled Categories are still accessible

I have the following scenario: + Primary Category <---- DISABLED | +-- Secondary Category <---- ENABLED | +---- Tertiary Category <---- ENABLED So the primary category is not web-...
0
votes
0answers
73 views

How to import categories/work with category ID's when doing a Dataflow - Profiles import from 1.9.1 to 1.9.4

Magento 1.9.1 to 1.9.4 We setup a bit newer version of Magento on a new server. The old install still currently running is Magento 1.9.1. I am getting ready to do a Dataflow - Profiles export/import ...
0
votes
1answer
323 views

Migration tool causing url_rewrite duplicates in Magento 2 leading to missing categories in Navigation

I am currently attempting to Migrate data from Magento 1 to Magento 2. I ran the Ubertheme Magento "Data Migration Pro" tool several times in the course of trying to Migrate our information over from ...
0
votes
0answers
60 views

Category Date component showing wrong value

I have created a DateTime category attribute schedule_start, I have also created a bakend model for this attribute and before saving attribute value I am formatting the date time value as per the ...
0
votes
1answer
32 views

How to get all current category products in magento 2

I want to get all the products available on the current category page I tried this code public function getProduct() { $check = $this->_registry->registry('current_category')->...
0
votes
1answer
49 views

The value of attribute “Is Active” must be set -error always when trying to create category via SOAP

I'm trying to create a category via SOAP $category_data = [ 'parentId' => 2, 'name' => 'NIMI', 'is_active' => 1, // also tried 'isActive' => 1 'position' => 1, '...
0
votes
0answers
51 views

Category in admin side not loading

After clicking in any category the page is not loading .Please find the below screenshot of the page. Any body know why it is like this?
0
votes
1answer
219 views

How get Category Id and Category Label

I get product like this way, but how can I get sub category now and ids and label? $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $categoryFactory = $objectManager::...
0
votes
0answers
20 views

Error on system log

I having a numerous errors like below on /var/system.log, Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "1484" already exists. [] [] Item (Magento\Catalog\Model\Category\...
0
votes
0answers
22 views

The bundle products are not shown in the categories

I have created a bundle product, but when searching for it in the category where it is assigned, it does not appear. I'm sure of the next points. -The product is Enabled -I refresh Cache / Indexers -...
0
votes
1answer
131 views

Magento 2 Products missing in category pages post Migration

I've recenty attempted to Migrate my products and categories from Magento 1 to Magento 2 via Ubertheme and run across a strange issue. I have two categories, "Brands" and "Type", which have a number ...
0
votes
0answers
22 views

Navigation Bar Dropdown Issue

I've currently made me Magento site (v1.9) on to a live site and after this being uploaded I now have an issue of my categories in my nav bar are constantly dropped down (they don't go up or down, ...
0
votes
0answers
34 views

Magento security patch supee-10752 on magento 1.9 and mirasvit full pgae cache conflict

After installing security patch supee 10752 on magento 1.9 site. site is showing error 500 for logged in customer on category ,sub category pages and home page. After some debugging we come to ...
0
votes
0answers
57 views

Magento 1.9.2. - Update breadcrumb with ajax filter category

I created a filter in my layered navigation that covers all the categories of my site. The effect with ajax seems to work correctly and the contents update just like other normal filters. The problem ...
0
votes
1answer
29 views

Magento 2 : custom template file for different categories

I want to set custom template file for different categories. How to set custom phtml file for different categories using XML file? Any help would be appreciated.
2
votes
2answers
63 views

Getting error while adding category Magento2

I am getting below error while saving category. This error are from log file. [2019-01-18 12:03:51] main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a76e6b4a_demo....