4 votes

Some Filters not showing on some Categories in Magento 2.4

There maybe a two possibilites: Please check whether the attribute "newest" is assigned to the attribute set of that category. There may not be products available with "newest" ...
user avatar
4 votes

How to add Categery name url in category page

Create Category Rewrites Step 1: Add the Rewrite On the Admin Panel, Marketing > [SEO & Search] > URL Rewrites. In the upper-right corner, click on Add URL Rewrites. From the dropdown list ...
user avatar
3 votes
Accepted

What does "catalog_category_view_type_default_without_children.xml" do exactly?

The catalog_category_view_type_default_without_children.xml file is used for those category which does not have any children category and has disabled the Anchor. I hope given information will be ...
user avatar
2 votes

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

$category = $categoryFactory->create()->load($id); $category->getAllChildren(false) - will return comma separated list of ids
user avatar
2 votes
Accepted

Magento 2 - Get Category show the same value

ObjectManager::get returns a singleton instance of the class, you are calling getCategoryIds from the same object even you load with a different ID, that is why it returned the same value. ...
user avatar
  • 166
2 votes

Undefined index: optgroup in vendor/magento/module-catalog/Ui/Component/Product/Form/Categories/Options.php on line 103

First! confirm your store is in an local envrionment, Use below SQL to Reset Database Category data; SET FOREIGN_KEY_CHECKS = 1; TRUNCATE TABLE catalog_category_entity; TRUNCATE TABLE ...
user avatar
  • 21
2 votes
Accepted

How to solve this Exception #0 (Magento\Framework\Exception\StateException): The bucket doesn't exist

We can resolve exception on category page “Bucket does not exist” by one of the below solution: One of reason because of Page Cache, Static resource or Indexer not updated. So try remove /var/ and /...
user avatar
2 votes
Accepted

How can I create my custom category dropdown in admin side(Create category page)

If you want to add the Categories dropdown to the Category Edit pages in admin area, you should create file app/code/Vendor/Module/view/adminhtml/ui_component/category_form.xml in your custom module ...
user avatar
1 vote
Accepted

Magento 2.4.4 order export csv wrong data

I have fixed using this, try. File name :Magento\Ui\Model\Export\MetadataProvider public function getRowData(DocumentInterface $document, $fields, $options): array { $row = []; ...
user avatar
  • 58
1 vote

Magento 2.4.4 order export csv wrong data

Just checked in version 2.4.3 and 2.4.4 and both versions works correct for Order and export into CSV First: check your locale in configuration Second: check the date in database (sales_order) How and ...
user avatar
1 vote

Magento 2.4.4 order export csv wrong data

Magento will export the created date in UTC. if your store use another timezone, the time will be diffrent in the order grid (timezone of your store) and in the exported csv. To get the order created ...
user avatar
1 vote

How to create row pattern/dynamic rows to the custom category attribute Magento 2

<fieldset name="test"> <settings> <collapsible>true</collapsible> <label translate="true">Test</label> <...
user avatar
  • 11
1 vote
Accepted

How can I display category select dropdown on frontend

1.) Create a xml file which loads your Block and Phtml file. For Example: custom_test_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
user avatar
1 vote

Get all other categories on same level as current category - Magento 2.4.3

Try This app/code/VendoreName/ModuleName/Block CustomBlock.php <?php namespace VendoreName\ModuleName\Block; use Magento\Framework\View\Element\Template; use Magento\Framework\View\Element\...
user avatar
  • 5,810
1 vote
Accepted

Get all other categories on same level as current category - Magento 2.4.3

You can simply use below 2 lines once you have fetched current category $pcategory = $category->getParentCategory(); $subcats = $pcategory->getChildrenCategories();
user avatar
1 vote

Magento 2 How to Remove Particular Product Price in Category Page?

Open your list.phtml template file. app/design/frontend/VENDOR/THEME/Magento_Catalog/templates/product/list.phtml Search for the below price code, from where your price is displayed. Replace: <?= ...
user avatar
1 vote
Accepted

Magento 2 - Category url load very slow

Generally Category pages or any page will be slow if following not taken care of : From TTFB perspective or server execution time. Varnish or Full Page cache is used. Also to make sure no block is ...
user avatar
1 vote

How to solve this Exception #0 (Magento\Framework\Exception\StateException): The bucket doesn't exist

Please try with indexing for catalog search full text data
user avatar
1 vote
Accepted

Magento 2.4 How to get category of current product from within ViewModel without using objectManager?

in order to get rid of the object manager you need to move all classes that are needed to the construct method using dependency injection. Please have a look and try this modified code <?php ...
user avatar
1 vote

How to get category name dynamicaly on product page magento2?

I am expecting you have product object. If you do not have product then first get object of product using below code. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $...
user avatar
1 vote

How to get category name dynamicaly on product page magento2?

Product can have multiple categories, like a product is selected in actual category, which could be 2nd or 3rd level, but the same product could also be selected in Sale category, or any other ...
user avatar
  • 8,828
1 vote
Accepted

How can I get the first level category list?

Try: /** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */ $collection = $this->collectionFactory->create(); $collection->addFieldToFilter('level', 2); $collection-&...
user avatar
  • 34.3k
1 vote
Accepted

Magento 2 How to order categories by entity id?

You can add the MySQL FIELD() expression to your collection: $menuitems->getSelect() ->order(new \Zend_Db_Expr('FIELD(e.entity_id, ' . implode(',', $order).')'));
user avatar
1 vote

Magento 2 Get Category Layout Name

$_category->getData('page_layout') should give you the layout name.
user avatar
1 vote

Magento2: Create toggle button yes/no in admin product page

Try this code, it works, tested: <?php declare(strict_types=1); namespace Vendor\ToggleAttribute\Setup\Patch\Data; use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface; use Magento\...
user avatar
  • 570
1 vote

Display out of stock products of specific category in list and search result page

If you're using magento 2.4 then you have to create a plugin for Magento\Catalog\Model\Layer We have to set the Go to Stores > Configuration > Catalog > Inventory > Stock Options->...
user avatar
1 vote

Automatically use Default Value for category/product Changes (always inherit "All Store Views" scope)

I faced same problem and I did this First I find eav_entity_type for catalog_catagory SELECT * FROM eav_entity_type I search attribute Id by attribute code url_key SELECT * FROM eav_attribute ...
user avatar
1 vote

Magento 2: Get root category ID programmatically in backend

Try this. <?php use Magento\Store\Model\StoreManagerInterface; class CategoryIdentifier { /** * @var StoreManagerInterface */ protected $storeManager; public function ...
user avatar
1 vote

"Unique constraint violation found" when removing .html suffix

The other answers here kind of circle around the exact issue without answering it directly. The issue here is not duplicate existing records in the url_rewrite table. The issue is existing rewrites ...
user avatar
1 vote

Magento 2 : Fatal error - Cannot instantiate abstract class Magento\Wishlist\Block\AbstractBlock

check it out by running php bin/magento setup:upgrade if the above cli command is not working then php bin/magento setup:static-content:deploy -f php bin/magento cache:clean if any file permission ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible