I wrote a function that outputs the current category and its children in a certain order, like so: function Orderlist($param2) { $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $category = $objectManager->get('MagentoFrameworkRegistry')->registry('current_category');//get current category $catId =$category->getId(); $subcategory = $objectManager->create('MagentoCatalogModelCategory')->load($catId); $subcats = $subcategory->getChildrenCategories(); foreach ($subcats as $subcat) { if ($subcat->getIsActive() and str_starts_with($subcat->getName(), $param2)) { $subcat_url = […]
Magento2
I have an issue with a Magento shop after upgrading from 2.4.0 to 2.4.5-p1, when I open the product list on any of the categories it won’t show more than 10 items. The pagination at the bottom seems to reflect the correct amount of items (ie. when there are 36 […]
I have added a new column in quote_item table and want to add this field as a parameter in cart API payload but I don’t how this will happen. This is what I get when i try to hit add to cart api. Please let me know. I am new […]
I’m trying to use the sales_order_place_before event to remove or add products to the order only after successful payment but facing a few different problems. There are a few different solutions I could find, but every time I’m there is a different issue: Products I’m adding are not correctly deducted […]
Upgrading from Magento 2.3.x to 2.4.5-p1, having sorted through the various PHP 8.1 issues, running setup:upgrade from the cli finishes, but the front end reports the standard Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following modules are outdated: error. There are some really basic […]
Magento 2.4.2-p1 Smartwave Porto 13 Amasty extensions I offer special ‘Expedited Christmas is guaranteed for orders by 12/20’ shipping option for $25. Last Christmas, we set it up via the Shipping Rules Amasty extension which connected through the [freeshipping] shipping option where the price was overriden directly in the ‘Expedited […]
I’m getting this error on admin category page. I’m not sure where to start to debug. Error: Call to undefined method ProfFiCompanyAccountUiDataProviderModifierDummy::setCategory() in /app/code/ProFi/ShopbyProFi/Plugin/Catalog/Model/Category/DataProvider/ModifyDataProvider.php:52 Would you have any idea? Thank you
Im trying to save a new redirects into the urlrewrite model but it seems that save() doesn’t exist in those factorys: MagentoUrlRewriteModelUrlRewriteFactory or MagentoUrlRewriteModelResourceModelUrlRewriteFactory or Magento/UrlRewrite/Service/V1/Data/UrlRewriteFactory (missing save method) this is my code: <?php declare(strict_types=1); namespace ItonomyCreateRedirectsConsoleCommand; use MagentoUrlRewriteModelUrlRewrite as BaseUrlRewrite; use MagentoUrlRewriteModelResourceModelUrlRewriteCollectionFactory; use MagentoUrlRewriteServiceV1DataUrlRewriteFactory; use SymfonyComponentConsoleCommandCommand; use SymfonyComponentConsoleInputInputInterface; use […]
I have been trying to configure Elasticsearch in the Magento installation for a few days but I can’t get it to work completely, I see it close but there is always something that fails. I installed Magento disabling this module but now I want to do it right and enable […]