New answers tagged

0

View Modal (CategoryList.php) use Magento\Catalog\Model\Category; use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\View\Element\Block\ArgumentInterface; class CategoryList implements ArgumentInterface { /** * @var CollectionFactory */ private $...


0

Update app/code/Vendor/Module/view/adminhtml/ui_component/category_form.xml with below code <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <settings> <buttons> <button ...


0

I'm not sure if anyone else is still having this issue, but here is what worked for me. Upgraded from 1.9.x to 2.3.3. The issue is duplicate entries in the url_rewrite table. The issue was on removing .html suffix on just products. After backing up the url_rewrite table I ran UPDATE `url_rewrite` SET `request_path` = REPLACE(`request_path`, ".html", "") ...


0

I wondered why it still showed 404, even after adding the URL suffix (see Rishabh Rk Rai's answer) It was not working because the category was a subcategory of another. So I had to add the url part of the parent followed by the part of the subcategory obviously. e.g. www.example.com/parentcat/subcat.html


1

You should delete all the rows which have store # 0 in the table catalog_category_entity_int, catalog_category_entity_varchar, catalog_category_entity_text, catalog_category_entity_decimal, catalog_category_entity_datetime


0

Below is the code to assign the products to root Categorie programmatically <?php ini_set('display_errors', '1'); ini_set('error_reporting', E_ALL); ini_set('memory_limit','512M'); ini_set('max_execution_time', 800000); use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $...


0

Is sorted now, it was a something to do with the CSS. Created a support ticket @Porto and they send me a new line of code to add and works perfectly now.


0

As of Magento 2.3 it is no longer best practice to use flat catalog at all. Detailed info and justification for this is a little thin on the ground right now (updates should be made to answers here to reflect when more info is found.) Apparently, this is specifically for performance reasons. As this question is related to performance, this is relevant. ...


0

Using Preference :- Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\UrlRewrite\Model\Storage\DbStorage" type="Scriptlodge\UrlRewrite\Model\Storage\DbStorage" /> <...


2

Please replace your code with below code. <?php $curr_url = $_SERVER['REQUEST_URI']; $exp_url = explode('/', $curr_url); //print_r($exp_url); $classType = 'tool-another'; if(!empty($exp_url) && isset($exp_url[2]) ) { if($exp_url[2] == 'xyz.html' || $exp_url[2] == 'xyz'){ $classType = 'xyz'; } elseif($exp_url[2] == 'abc.html' || $...


1

Change below code it seems double quote is not proper ”removeItem” to "removeItem" And below one as well: ”addLinkRel” to "addLinkRel"


0

At line no 164 add the below code of Magento\Store\Model\StoreManager: if(!$storeId){ if(isset($_COOKIE['store']) && $_COOKIE['store'] !== ''){ $storeId = $_COOKIE['store']; } else { $storeId = $this->getDefaultStoreView()->getCode(); } } And then, change line no 155 of Magento\Store\Model\StoreManager => FROM : if (...


0

I have managed to solve this by fixing the parent category for my categories. I found in the database the parent category of my category is the same category itself. see image bellow the category with the id (2) was linked to parent_id = 2 so I just return the parent_id to (1) and then reindex and clear_cache and every things went good.


0

I faced a similar issue. I solved it by removing the entries which have target_path LIKE %/category/0% from url_rewrites table. Check out this forum


1

This issue occurs Because of extjs file is missing from lib/web folder. we copy the file from fresh Magento.now its working fine. But we don't know how its delete.


Top 50 recent answers are included