New answers tagged

0

If you mean you want to run this convert command on several png files, you could try: find . -iname *.png -execdir convert {} -interlace none {} \; This would be equivalent to running for every .png file: convert <mypngfilename> -interlace none <mypngfilename> where <mypngfilename> is, obviously, the name of the png file. Make sure you ...


0

Just create or edit requirejs-config.js file from below path. /app/code/AAA/ZZZ/view/frontend/requirejs-config.js And place below code in requirejs-config.js var config = { map: { '*': { 'payment': 'XXX/YYY/view/frontend/web/js/view/payment/method-renderer/cashondelivery-method' } } }; Define this js in your custom file as : ...


0

to be able to preview your image you need to add this key/value 'type' => 'image' in your sending data. Otherwise Magento will consider the file as document. Hope it helps.


0

At, Test\GiftCard\Api\Data\GiftCardInterface interface getChecksum(),setChecksum() should have method singnature means it Like: <?php namespace Test\GiftCard\Api\Data; interface GiftCardInterface extends \Magento\Framework\Api\ExtensibleDataInterface { /** * * @return string */ public function getChecksum(); /** *...


0

You can update the MSP Recaptcha to the latest version 2.1.2 by running the following command in the terminal. composer require msp/recaptcha:2.1.2 php bin/magento s:up Hope it helps!!!


0

I had exactly the same problem. You first have to do your columns like this: <column name="product_sku" class="Xx\StockMovements\Ui\Component\Listing\Columns\Product"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</...


0

In my case it was caused by a utf8_encode error on a copyright-character in requirejs-config.js in the Mageplaza/Core module. When Magento creates the bundle files it uses json_encode($contents, JSON_UNESCAPED_SLASHES) to create the json string for the bundle. When this fails, it returns an empty string without showing any errors.


0

First check, if you did not run out of disk-space, before resolving to the configuration-related resolution. You seem to have a too low maximum size for your innodb_data_file_path in your my.cnf, In this example innodb_data_file_path = ibdata1:10M:autoextend:max:512M you cannot host more than 512MB of data in all innodb tables combined. Maybe you should ...


0

I simply did the following in my form. public function __construct( .... \Magento\Customer\Ui\Component\Listing\Column\Group\Options $groups, array $data = [] ) { .... $this->groups = $groups; parent::__construct($context, $registry, $formFactory, $data); } .... $fieldset->addField( 'customer_group_id', 'select', [...


0

Create the file in the path: app/design/frontend/[vendor_folder]/[theme_folder]/Magento_Paypal/web/template/payment The file <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <div class="payment-method" css="_active: getCode() == isChecked()" afterRender="initListeners"> <div ...


0

Copy the below file /vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express-in-context.html and create a new file in the below path: /app/design/frontend/[vendor]/[theme]/Magento_Paypal/web/template/payment/paypal-express-in-context.html After your changes, please run below commands: php bin/magento setup:static-content:deploy ...


0

First run below command to collect phrases bin/magento i18n:collect-phrases -m -o [test.csv] You can see test.csv file in your Magento root folder. Open file in excel and change 2nd column content Second run below command bin/magento i18n:pack test.csv de_DE -d Note:- Change test.csv file based on your requirements. de_DE change based on your ...


1

The Issue: My team recently ran into this on v2.3.1 of Magento Community, and it appears that you may have an attribute with an attribute_model of type Magento\Eav\Model\Entity\Attribute when the system is actually expecting type Magento\Catalog\Model\ResourceModel\Eav\Attribute For reference, you can check out the line of code where that error is being ...


0

Try to use: \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $test = $this->categoryCollection ->create() ->addAttributeToSelect('parent_id') ->addAttributeToSelect('name') ->addAttributeToFilter('parent_id', 'your_id') ->setOrder('name', 'ASC') ->load();


0

You have to use objectManager to initiate classes in your command classes as shown below -: /** * @var ObjectManagerInterface */ protected $_objectManager; /** * @var State */ protected $_state; /** * Construct function for class UpdateSummary * * @param ObjectManagerInterface $objectManager */ ...


0

we have to define column headers in .csv same as in database table, either we keep it empty data in .csv but we must enter as header.


1

https://meetanshi.d.pr/8DaaOk you need to add your variable in this address template to add your custom variable to billing address


0

It's not enough to change that single line of code $this->scopeConfig->isSetFlag('cataloginventory/options/show_out_of_stock'); is called throughout the code in different ways and manners. The best approach would be to find every single call for this config and change it with plugins or preference if the methods are private, which they mostly are as it ...


0

you can change images order with the third-party tool, having even only 3 columns in the file (if it's and update) - product ID, column with images and column with images position.


0

You can also create your own cron file and schedule with your specific time. Create crontab.xml file here app/code/YourModule/YourNamespace/etc/crontab.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd"> <group id="...


0

We need to pass the instance of CustomerSearchResultsInterface, not the interface. \Magento\Framework\Api\SearchResults is the instance of the interface. But, it's safe if you don't set the instance of $result. Changes your plugin: public function afterGetList(CustomerRepository $subject, \Magento\Framework\Api\SearchResults $results) { ...... } Or ...


0

You are going to need to install an extension This should get you started https://www.weltpixel.com/google-analytics-enhanced-ecommerce-tag-manager-magento-2.html


1

You can find the official pdf here


1

In your map.xml file you have to add this code into the bottom of the Source tag and the Destination tag <ignore> <document>paygent_last_id</document> </ignore> <ignore> <document>sales_flat_order</document> </ignore> I hope that can help you


0

Install Data Migration Tool 1) Check your Magento 2 version :- sudo php bin/magento --version 2) Install Data Migration Tool from repo.magento.com :- composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:<magento_version> 3) Configure Magento 2 ...


2

I solved editing /vendor/magento/module-customer/etc/webapi.xml <route url="/V1/customers" method="POST"> <service class="Magento\Customer\Api\AccountManagementInterface" method="createAccount"/> <resources> <!-- resource ref="anonymous"/ --> <resource ref="self"/> </resources> </route> ...


-1

I have written code for resizing any products images in Magento 2 according to your desired width and height. I will describe how to resize images In Magento2, Update product image in Magento2, Remove white frame in Magento 2, change product image dimensions Magento 2 such as needing to resize a custom image and display it on the site in special sized areas. ...


1

Take a look, at Magento 2 remove "Estimate shipping costs and tax" from cart If you can implement layout concept to the Block class then you get can add the condition. checkout.cart.shipping is the layout name of the block class \Magento\Checkout\Block\Cart\Shipping and getJsLayout function/method is responsible for render of Estimate Shipping ...


0

Please try it by giving a static weight for all products like 0.1 weight for all products by using script. 1) If you want to do it by database then here is the code: select * from eav_attribute where attribute_code='weight'; it will give you id of that attribute select * from catalog_product_entity_decimal where attribute_id=82 // find that attribute value ...


1

I am able to log out from two application from Magento and External application. First I destroyed the Magento session and redirect to the external application from there I also deleted the session of external application. so it is logged out and I have written in such a way that after logout it redirected to Magento customer/account/logoutSuccess page. ...


0

I've found a lot of the email logic abstract and you are right. In one or two places it is difficult to follow. One of the simpler examples is the contact us form. I'm bringing together logic from several files but in summary you have the $_POST variables $post = $this->getRequest()-getPostValue(); Which means you could dump out name $name = $this-&...


1

You can refer below links for the same. https://webkul.com/blog/modify-existing-order-magento-2/ Note that you should not use objectmanager directly. You can update code as per Magento standard.


0

Magento 2 needs weight value for a product to be considered shippable, if you are importing that csv file, check the imported products and make sure the ones supposed to be "simple" are not created as "virtual"


0

If in your condition virtual product is associated to configurable product that time shipping address is skip into the checkout. Please check your associated product list with your configurable product.


0

Following file is the actual template: vendor/magento/module-checkout/view/frontend/web/template/registration.html You can modify this template in theme level or overwriting following js vendor/magento/module-checkout/view/frontend/web/js/view/registration.js Any text change you can use translation instead of modify file. Check here and here Note: ...


0

You have to clear from Magento cache Session variable mage-cache-sessid <?php namespace Mycompany\Customerhomepage\Observer; use Magento\Framework\Event\Observer; use Magento\Framework\Event\ObserverInterface; use Magento\Framework\UrlInterface; use Magento\Framework\App\ResponseFactory; use Magento\Framework\App\ObjectManager; /** * Class ...


0

Try Below code <column name="product_sku" class="Xx\StockMovements\Ui\Component\Listing\Columns\Product"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item> <item name="filter" xsi:type="string">...


0

Default children categories only return as active. You need to that function changes to get the categories that you want to override. vendor/magento/module-catalog/Model/ResourceModel/Category.php From public function getChildrenCategories($category) { $collection = $category->getCollection(); /* @var $collection \Magento\Catalog\Model\...


0

Please try with below code. public function __construct( Template\Context $context, \Magento\Catalog\Model\Layer\Resolver $layerResolver, \Magento\Framework\Registry $registry, \Magento\Catalog\Helper\Category $categoryHelper, \Magento\Catalog\Model\CategoryFactory $categoryFactory, array $data = array()) ...


0

Magento2 create temp table/ using those temp table during indexing.You cannot avoid the temp concept. One thing, you can do in this case that changes Batch, Process count. As you have 5k products assign for a particular category the might be the cause of this CPU usage during Category Product Indexing. For this issue, you might need to change ...


0

In the catalog_eav_attribute table, there are entries directing to specific classes. The image class path was first named: Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage But is now called: Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Image


2

You cannot write preference for this block Magento\Tax\Block\Sales\Order\Tax class directly, but you can write preference for the block Magento\Sales\Block\Adminhtml\Order\Totals\Tax class and override it. Below is the code snippet sample. In the, Vendor/Module/etc/di.xml file <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...


0

Magento has become the ultimate option for eCommerce businesses due to the flexibility and affordability it provides to eCommerce deployments. Due to its free community edition and a relatively small learning curve, we are seeing thousands of eCommerce businesses taking advantage of its adaptability and ease of use. Keeping abreast with the recent trends, ...


1

Change this line, your module name is incorrect. <resource id="Pmage_Unit::unit" title="Pmage"> Update code <resource id="Pmage_Matrixprice::unit" title="Pmage"> Hope it helps.


2

Most Magento 2 stores get hacked via Adminer or the March '19 SQL injection flaw. A smaller portion get breached via insecure extensions, brute force password guessing or spearphishing attacks against staff members. The only way to say for sure, is to analyze the log files and event log tables. My Magento Malware Scanner (as referenced in the other answer) ...


Top 50 recent answers are included