New answers tagged

0

This turned out to be caused by an erroneous newline being added to all output. If you inspect the page source (right click => view source) on any page and you see this, then you have the same issue. To find the offending file we used Magento's coding standards with PHP_CoderSniffer magento@12389-php-fpm:~/htdocs$ ./vendor/bin/phpcs --standard=Magento2 ...


1

Di.xml <type name="Magento\Checkout\Block\Checkout\DirectoryDataProcessor"> <plugin name="sr_checkout_country_list_fix" type="VendorName\Checkout\Plugin\Block\DirectoryDataProcessor" sortOrder="1"/> </type> Now app/code/VendorName/Checkout/Plugin/Block/DirectoryDataProcessor.php <?...


1

@rahul MDVA-28409 this patch is available for Magento2.3.4OS version You can find source code in below path vendor/magento/quality-patches/patches/os/MDVA-28409_2.3.4.patch Still if you are not able find that I am attaching here. https://hastebin.com/xagapufuna.diff


1

For default scope: $configWriter->save("/pmm/currency_conversion/usd_to_cad_conversion", $value, 'default', 0);


0

Get rid of the width and height on the img and define it in your css instead. Set image to position: absolute. Make the a tag a flex box and center align elements both vertically and horizontally. <div class="small-24 medium-16 cell"> <a title="Chairs" href="/chairs"> <img src="{{media url="...


0

Kindly check this section from that page, where detail information given. Apply the patch For instructions on how to apply an MQP patch, use the following links depending on your Magento product: a. Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool . b. Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches .


0

try following code. <script type="text/javascript"> require([ 'Magento_Customer/js/customer-data' ], function (customerData) { 'use strict'; customerData.get('cart').subscribe(function (cartInfo) { //HERE YOU WANT TO DO THE CODE WHERE YOU WANT TO SHOW THIS console.log(cartInfo['...


0

The idea is that when you run it for the first time you will create some variable into the session or cookie or anywhere else you can call it. The second time you run it, you check that if the original variable exists, it will not run into your custom function anymore.


0

You can reinstall aws using composer (composer require aws/aws-sdk-php). If you don't use it, you can remove it from your project.


0

unfortunatly i found a simple solution for this but for i now i changes in core files but soon i will get solution without changes in core files and much proper solution. for this now i have create a file SingleProductAttribute.ts exactly like ProductAttribute.ts in vue-storefront/core/modules/catalog/components/SingleProductAttribute.ts export const ...


1

.products-grid .product-item-info .product-item-photo from this class in css remove border


1

Try the following way to build sql: $sql = $connection->select()->from($tableName)->where('max_merchandise_cost <= ?', $subtotal_cad) ->order('brokerage_cost_cad DESC')->limit(1); // error_log($sql->__toString()); $result = $connection->fetchAll($sql); If your subtotal returns nothing, then you can try to get that from quote. Here is ...


0

For me it was the store switcher that caused payflow issues. The store switcher was adding store info to the redirect paypal/transparent/redirect/ So I added paypal/* under pages to exclude for store switcher. This allowed the page complete, paypal/transparent/redirect/ could not understand the added store information. Hope this helps someone that has a ...


0

The easiest solution I found to this problem was to just run the elastic search instance and leave it running. To do this just go to where you installed elastic search and locate the bin directory (in my case it is C:\xampp\htdocs\elasticsearch-7.13.2\bin) then right-click on the file named elasticsearch.bat and run it as Administrator. This will trigger a ...


0

Stupid me. This was creatuity/magento2-interceptors. Using solution from github.com/creatuity/magento2-interceptors/issues/3 fixed it


0

OK, so for anyone that has this problem. It is an open ticket. As Anton said double quotes are causing this problem. So the solution is to remove double quotes from title of products.


0

As far as I know and understand from the compile command (Magento\Setup\Console\Command\DiCompileCommand) it just simply scans the filessystem for components to register and include in the compilation. It doesn't actually check if the module is enabled or not. So to truly exclude a module from compilation you'll need to either remove/rename registration.php ...


0

Seems that we hit the limit of 2147483647 for INT. So we ALTER the table catalog_product_entity_varchar with the following query; ALTER TABLE catalog_product_entity_varchar MODIFY COLUMN value_id INT UNSIGNED AUTO_INCREMENT; Some more info, seems to be a Magento 2 bug; https://github.com/magento/magento2/issues/28387


0

This looks to be caused by a value for path payment/braintree_paypal/button_productpage_enabled missing from core_config_data and the value not being converted to a bool. This can be fixed by this patch If you have cweagans/composer-patches installed you can add the following to your composer.json "extra": { "patches": { &...


-1

You need to try the below solution Step 1. Identify the product attributes which generate the issue using an SQL tool like phpmyadmin SELECT ea.attribute_code, ea.frontend_input, cea.is_filterable, cea.is_filterable_in_search FROM eav_attribute AS ea INNER JOIN catalog_eav_attribute AS cea ON ea.attribute_id = cea.`attribute_id` WHERE (...


0

for the address if you already have the object of quote then you can try these, $quote->getBillingAddress()->getCustomField() $quote->getShippingAddress()->getCustomField() but for this to work also hope you are saving the data correctly in the quote_address table, by using extension_attributes, if not let us know, will update the answer


0

Please check if you have --search-engine=elasticsearch7 in your install command. Also, check what happens if you enter the URL in the browser.


-1

We have the same issue and have not been able to find a solution for this anywhere. It is such a strange error. We have ElasticSearch7 installed with Magento 2.3.5pt-2 and we get very similar error. Running bin/magento indexer:reindex is only a temporary fix and not a solution to the problem. Error will come back and products disappear on frontend of site. ...


1

This is a bug in the Magento 2.4.2 inventory-configurable-product-frontend-ui module. Until a fix is released if you do not use the stock threshold options you can safely disable this module which will stop the "only 0 left" message from appearing. See this issue for more details and workarounds : https://github.com/magento/inventory/issues/3276


1

This line will save data in the quote table: $quote->setAddressLocationType($extAttributes->getAddressLocationType()); If you want to save in the shipping address table, then try the following way: $address = $addressInformation->getShippingAddress(); $address->setAddressLocationType($extAttributes->getAddressLocationType()); Check more ...


0

My stock were configured by website instead of store, so the source_re and the source_re_pro had the same assigned stock id. Then, creating new stocks and sales channel made the trick.


0

try below API Use Content-Type - application/json Create Customer Token http://127.0.0.1/rest/store_code/V1/integration/customer/token Body { "username": "xyz@gmail.com", "password": "xxxxxxx" } Create Admin token http://127.0.0.1/rest/store_code/V1/integration/admin/token Body { "username": "...


0

You can export store stock too insted of export product


0

You can event checkout_onepage_controller_success_action this will help you to get all the data related to the order <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="...


1

Final code looks like this now, thanks! Still getting the other error though, but I will mark your answer as correct and post another question. Think it's permissions. <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('memory_limit', '5G'); error_reporting(E_ALL); use Magento\Catalog\Api\ProductRepositoryInterface; use ...


0

Looks like you need to disable the CSP module for the issue to stop. php bin/magento module:disable Magento_Csp


0

Your $product->addImageToMediaGallery syntax looks correct. You should use full path to image file /var/www/magento2/var/import/blah' $product->save() is deprecated Try using the save method of ProductRepositoryInterface (Magento\Catalog\Api\ProductRepositoryInterface) $this->_productRepository->save($product);


2

If you don't want to display column in grid then no need to write code there. Please comment it or just remove code from it. In below code i have shown "product_name" column only in filter and not showing in grid. Please update code like below. <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://...


0

This is caused by something trying to render an asset tag to the page that doesn't have a url or hash. If you read the stacktrace a bit more you should get an indication of where the issue is coming from. In our case we had the module Ebizmarts_Mailchimp installed. This was the exception: 1 exception(s): Exception #0 (InvalidArgumentException): Either remote ...


0

Try disabling 2FA: bin/magento module:disable Magento_TwoFactorAuth bin/magento cache:flush From 2.4, 2FA is required for Admin login: https://devdocs.magento.com/guides/v2.4/security/two-factor-authentication.html You might have some other issues because it doesnt look like you are loading in Javascript / CSS / HTML.


0

Well... yes :) how else would the cache serve the page? the basic concept of caching is that you keep a fully-generated 'copy' of the page somewhere and serve it from that place without the need to load the whole application, query the database and process all the assets needed to build that page. Reference https://docs.magento.com/user-guide/system/cache-...


0

try defining the PHP version in the command, i use php-7.2 bin/magento setup:di:compile Yours may be php-7.4 bin/magento setup:di:compile


0

I faced the same issue in the CustomerSampleData module. I temporarily resolved this in v2.3.6 by commenting out the following line: $this->customerSetup->install(['Magento_CustomerSampleData::fixtures/customer_profile.csv']); at: vendor/magento/module-customer-sample-data/Setup/Installer.php Final Code: public function install() { //$this->...


0

extend your theme and in your theme : app/design/frontend///Magento_Theme/layout/default_head_blocks.xml within some js files are called via the RequireJS approach: require/define sections, these cannot be removed using layout approach


0

Are you sure it is affecting the speed of the site? In default Magento, the style-l.css is loading like as shown in the image You can see the style-m.css comes with a media="all" and style-l.css comes with media="screen and (min-width: 768px)". This is an important descrimenation to be noted. Because this makes style-m.css is always a ...


0

By default, the config.xml file is created in app/etc. In your case, it is located in etc/frontend so Magento will not be able to read your config file


0

In order to clear the CLI from these errors, I had to make some changes to the composer.json file in the root directory. These were the steps: 1. Add in "require" "laminas/laminas-dependency-plugin": "2.1.0 as 1.0.4", "magento/inventory-composer-installer": "1.2.0 as 1.1.0", 2. Change in "require-...


0

Whoever's been having this problem, its because of stuck consumer runner cron jobs waiting for max messages to be reached. Please see the following article, this fixed my problem: https://www.cadence-labs.com/2020/03/magento-2-stuck-or-long-running-cron-after-upgrade-to-2-3-x/ I'm using Magento 2.4.0 and by default it was waiting to reach max messages limit, ...


0

magento 2.4.1 and under does not support composer 2, you want to either upgrade your magento or downgrade your composer


0

config.xml is located in etc folder. So simply move this file From :- etc/frontend To :- etc/


0

Try this way Some of the functionalities in Magento 2.3.x is different from previous version. The reason is that in most cases the 2.3.x framework uses Zend Framework 2 (ZF2) and almost totally refuses to applyZend Framework 1 (ZF1). Magento\Framework\Mail\MailMessageInterface::createAttachment() So, due to this, the previous method is deprecated and ...


0

I needed to disable authentication, otherwise Magento thought elasticsearch is not running. Edit your config file, e.g. with nano or vim: nano ES_PATH_CONF/elasticsearch.yml Remove the following config: xpack.security.enabled: true Note: You should only remove authentication if your node is not public.


0

Finally I find a way to enable reCaptcha if your magento2 has not it as default feature. You will probably need composer version 1 (version 2 did not worked for me) Enable developer mode php bin/magento deploy:mode:set developer Run in your cli composer require msp/recaptcha php bin/magento module:enable MSP_ReCaptcha php bin/magento setup:upgrade php ...


0

Please add your css file. Below is the file path. app/code/{themename}/OrderItem/view/adminhtml/web/css/ .sales-order_create-index .admin__control-radio{ opacity: unset; margin-top: 4px; z-index: 9; } .order-details .admin__field-option .admin__field-label{ padding-left: 23px; } Now, Just upgrade & ...


Top 50 recent answers are included