New answers tagged

0

Replace your code with this code class NewAction extends \Magento\Backend\App\Action { /** * Edit A Contact Page * * @return \Magento\Backend\Model\View\Result\Page|\Magento\Backend\Model\View\Result\Redirect * @SuppressWarnings(PHPMD.NPathComplexity) */ public function execute() { $this->_view->loadLayout(); $this->...


2

Please replace this node. I change from id to entity_id. <actionsColumn name="actions" class="AdminGrid\Grid\Ui\Component\Listing\Grid\Column\Action"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="resizeEnabled" xsi:type="boolean">false</...


0

If you suddenly find that your Magento is suddenly massively slow after installing or updating a module, it might be this known bug where composer update turns off all your cache! https://github.com/magento/magento2/issues/17634 I know that this happens to me about once or twice a month. I now know to immediately go into command line and run php bin/...


1

Oops, I figured it out by myself: gd extentions is mssing but I have already installed the mod! $ service apache2 restart It seems after installing php along with many modules is not enough, restarting apache is also needed!


3

You are getting this error because all of the post requests need to have a valid form_key value sent. try adding this inside your form tag. <?= $block->getLayout()->getBlock('form_key');?> BUt I'm not sure if that works for admin forms. If that does not work, try this: add this in the block that renders the form private $formKey; ...


0

I'm not sure you can fix this without affecting the integrity of your database. The correct configuration is this. store store_group store_website Try manually editing database to match above


0

Hi, Please change the menu.xml file as below. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <menu> <add id="Webkul_Marketplace::marketplace" title="Marketplace Management" module="Webkul_Marketplace" sortOrder="10" resource="...


0

At first sight, it seems that some menu item is trying to use menu resource Webkul_Marketplace::marketplace, but there is no parent id like Webkul_Marketplace::marketplace, so it will throw the error. Please check the place from where Webkul_Marketplace::marketplace is being referenced, and check whether Webkul_Marketplace::marketplace is defined in the ...


2

The field "Associate to Website" is used to associate the customer created with a particular website or to the admin. 1) When user is created with Associate to website as "Admin" then the user will not be able to login in the frontend. For this the values of store_id and website_id stored in database are 0. 2) When user is created with Associate to website ...


1

You can check the changed data by adding this code before the $contact->save(). $diff = array_diff_assoc($contact->getOrigData(), $contact->getData());


0

Actually. It is an admin configuration That needs to assign a source for inventory. Select products Catalog > Product > Action Dropdown > Assign Source


0

The 'filter_index'=>'main_table.increment_id' thing everyone keeps giving as an answer didn't help for me so here's an other way to solve this issue: In the _prepareCollection() function, just below $this->setCollection($collection); put $collection->addFilterToMap('increment_id', 'main_table.increment_id');


0

Note: From Magento 2.3.0+ Magento Flat catalog is not recommended and discouraged. https://docs.magento.com/m2/ce/user_guide/catalog/catalog-flat.html "Starting with Magento 2.3.0+, the use of a flat catalog is no longer a best practice and is not recommended. Continued use of this feature is known to cause performance degradation and other indexing ...


0

you need to add this in your di.xml in tag type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult" Your di.xml will be like this <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <virtualType name="...


0

In your Ui_component.xml place this code make inline edit work. <settings> <editorConfig> <param name="clientConfig" xsi:type="array"> <item name="saveUrl" xsi:type="url" path="route/controllerfolder/controller"/> <item name="validateBeforeSave" xsi:type="boolean">...


0

To add a list of new products on the home page of your website you can follow the below instructions 1st Method Go to the following location Admin (backend) > Content > Elements > Widgets Click on the Add Widgets. In Settings section select Type => Catalog new Product List & select your theme & press to continue. In Storefront Properties ...


0

You can take the reference from CMS module of core Magneto. This is the reference link for that https://github.com/magento/magento2/blob/2.1/app/code/Magento/Cms/view/adminhtml/ui_component/cms_block_listing.xml Like showing in this file you need to add editorConfig to configure inline edit and you also need to create controller. <item name="...


0

If you want it can be done via admin : Create a Cms Block , and as a content , inser a widget : Add widget type : Catalog Product List Set Number of Products to Display: (usually is used 4 ) Tempate : Products Grid Template For your request to be the New Products : You can either use a condition to set up a category for the new products. Or you dont wont ...


1

I guess that you want a new product collection depends created_atfield. So, you have to create a block class at your module and at that block class, you have to create a product collection and sort by DESCENDING created_at ORDER. I have create a block class at here depends on the structure of Magento\Catalog\Block\Product\NewProduct and that block class ...


2

Try Below way. Create your block file and add below code <?php namespace YourCompanyName\YourModuleName\Block; class YourCustomBlock extends \Magento\Framework\View\Element\Template { protected $_productCollectionFactory; protected $_productVisibility; public function __construct( \Magento\Framework\View\Element\Template\Context $...


0

This is working public function getSize() { if (is_null($this->_totalRecords)) { //$sql = $this->getSelectCountSql(); $sql = $this->getSelect(); $this->_totalRecords = count($this->getConnection()->fetchAll($sql, $this->_bindParams)); } return intval($this->_totalRecords); }


1

There are only two thing you need to do inorder to get massAction in your custom grid. Add protected function _prepareMassaction() to your adminhtml Grid.php file. Add an action in your controller for each of your massAction options from grid. So that when you hit this action, all the selected records ids are passed to your controller action where ...


1

Need to add to your UI component a new tag <container name="listing_top"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="template" xsi:type="string">ui/grid/toolbar</item> </item> </argument> <container name="columns_controls"> ...


Top 50 recent answers are included