Hot answers tagged

2

Please create one file named "user.php" in your root of magento and copy paste below code in your file <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $params = $_SERVER; $bootstrap = Bootstrap::create(BP, $params); ...


1

Magento uses the file called view.xml which is maintained at the theme level of the application. So for example, if you are using the default theme luma you should find the view.xml under vendor/magento/theme-frontend-luma/etc/view.xml In this file, you would see <images/> node inside the node. <view xmlns:xsi="http://www.w3.org/2001/XMLSchema-...


1

It's happening because you're using NGINX, so the root folder is the pub folder. Probably the issue is not the file doesn't exist there, but the generation of static files hasn't being performed. Try these commands below to set the store in the developer mode and to generate all the static files. alias mage="php -d bin/magento" && \ mage ...


1

ResourceModel In you afterSave(): protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { if ($object->getData('related_products')) { $newProducts = json_decode($object->getData('related_products'), true); $newProducts= array_keys($newProducts); try { $oldProducts = ...


1

I think adding the translation with a language pack should do the trick + changing the language on the admin store to be the one you need.


1

Solution given below works magento opensource 2.3.3 and above (tested) It will work, set actionDisable node to true to disable the MassAction from the dropdown list of actions <actionDisable>true</actionDisable> <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:...


1

I know this post is old, but decided to add my findings of a working solution, after spending hours looking at this. First off, I had to try and understand the concepts of Magento's UI components and find a simple way to achieve this, without writing additional classes and data models. Here is some good reading material if anyone is interested: https://...


1

After Magento 2.2 you can add a searchable dropdown using the below code. <field name="category" sortOrder="50" formElement="select"> <argument name="data" xsi:type="array"> <item name="options" xsi:type="object">Namespace\Modulename\Model\Source\Category</...


1

even though it's a bit late, here is the way how to use resizeDefaultWidth. Make sure you added the component ColumnsResize : https://devdocs.magento.com/guides/v2.4/ui_comp_guide/components/ui-columns-resize.html On the documentation above, you can see this config : <argument name="data" xsi:type="array"> <item name=&...


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