New answers tagged

0

Using window.checkout.baseUrl + "pub/media" + imgPath


0

Run composer clearcache && composer install to get all file missing. If the file is not found. You should create an apply patch to add it in.


0

There are lots of thing for development but some of them in my mind now. I listed as below 1. Always Work in Developer Mode 2. Never run Deploy Command in Developer. it will not gener ate symlink it will generate copy of files so css and js never get instance effect. 3. Make sure all cache enable. and you can perform cache clean command for get effect xml ...


0

Way 1 Please Change code in Registration.php My2 to MY2. Your folder name is in capital and you wrote in small. <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::THEME, 'frontend/MY2/theme', __DIR__ ); then run php bin/magento setup:upgrade Way 2 Either you can change folder name ...


-1

theme.xml: <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>My2 Theme</title> <parent>Magento/luma</parent> <media> <preview_image>media/preview.png</preview_image> </...


0

I think your MY2/THEME2 I has been declared in adminhtml. Please share the directory structure and the Registration.php and Theme.xml content files. Try this https://stackoverflow.com/q/54427330


0

Each configurable product must have an attribut set This attribut set contain attributs Create or modify the product attribut set Stores >> Attritubes >> Attribut set From your configurable product select the attribut set, then link your simple product to the configurable I hope I understood the request.


1

Update answer for Zankar and jkulig: This is correct and full answer: Create new module: app/code/Vendor/ReCaptchaFrontendUi/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Vendor_ReCaptchaFrontendUi', __DIR__ ); app/code/Vendor/ReCaptchaFrontendUi/...


0

Try to add a PHP env variable MAGE_REQUIRE_MAINTENANCE = null to bypass the maintenance assertion completely; For more detail, please read \Magento\Framework\App\Bootstrap::assertMaintenance


0

I had implemented same codes but for some reason sometime only price get updated and qty set always 0. Sometime vise versa. When investigated further found out its a kind of a bug in Magento 2. Please refer https://github.com/magento/inventory/issues/2396 What actually worked for me was the below codes that I got it from the above link. .. .. \Magento\...


0

This link will help you for this . https://www.rakeshjesadiya.com/add-category-custom-layout-update-xml-file-magento-2-3-4/


0

There is an update on the github issue to use the "-r" flag after adding a .credentials file, which worked for me. I was used it as vendor/bin/mftf run:group -r <group> so I'm not sure what that means for direct codecept usage. Likely you can remove the generated tests directory and re-try your command, or try codecept clean after creating ...


0

You can check this one : https://magefan.com/magento2-blog-extension https://www.mageplaza.com/magento-2-better-blog/ https://amasty.com/blog-pro-for-magento-2.html https://aheadworks.com/blog-extension-for-magento-2 https://mirasvit.com/magento-2-extensions/blog.html https://www.magearray.com/blog-extension-for-magento-2.html


2

If you want just to check if there are any messages in queue, you can use CheckIsAvailableMessagesInQueue class Also in Magento framework that build as analog of AMQP protocol, there are no guaranties that specific topic will deliver messages just to one queue. But you can get all queues name from topology configuration See \Magento\Framework\MessageQueue\...


0

You can take a reference of customerData function in the below file and based on that you can create an after plugin for getSectionData and set the value for your custom attribute and that attribute value you will get in your JS file. vendor/magento/module-customer/CustomerData/Customer.php Reference Plugin: public function afterGetSectionData(\Magento\...


0

Override File : vendor/magento/module-re-captcha-checkout/Block/LayoutProcessor/Checkout/Onepage.php Find below line: ['payment']['children']['beforeMethods']['children']['place-order-recaptcha'])) { replace to ['payment']['children']['beforeMethods']['children']['place-order-recaptcha-container']['children'] ['place-order-recaptcha'])) {


0

I believe the above answers will help, but... no one mentioned --use-default-magento-values during updating, it will help the composer to update Magento composer dependencies in the composer.json file. I'd recommend using the following command composer require magento/product-community-edition=2.4.3-p1 --no-update --use-default-magento-values And check your ...


-1

please run below command in terminal Magento root path : bin/magento module:disable Magento_TwoFactorAuth bin/magento cache:flush


0

I got the solution. I followed steps- Override Create.phtml file for 2 custom fields Override module-company Controller file i.e. CreatePost.php for setting password value Changed the db_schema.xml file to set the default value of the status column as active My module is perfectly working fine after submit. Thanks for the help @Natha.


1

Before we make any assumptions about the cause of these HTTP 503 errors, let's look at the logs for these transactions. Run the following command: varnishlog -g request -q "ReqUrl eq '/'" Please replace / with the URL you're trying to monitor and add the output to your question. Based on that, we'll try to figure out a solution, which I will then ...


0

follow below steps 1. Copy .httaccess file from pub folder and override it to root .htaccess file 2. Upload pub/index.php file to root magento directory 3. Add below code in app/etc/env.php file 'system' => [ 'default' => [ 'web' => [ 'unsecure' => [ 'base_media_url' => '{{secure_base_url}}pub/media/', ...


1

Try this module https://github.com/markshust/magento2-module-disabletwofactorauth. It disables it in developer mode and it easy to use.


1

enable/disable: bin/magento module:enable/disable Magento_TwoFactorAuth --clear-static-content && bin/magento setup:upgrade && bin/magento setup:di:compile


0

Reverting to Magento default search engine(Elasticsearch7) has resolved the issue. Need to see why a 3rd party vendor extension for Elasticsearch is causing this issue.


1

first of all, check the module is disable or not by following command. sudo bin/magento module:status If, your module is not disable and you want to disable it, then deactivate it by following command. sudo bin/magento module:disable Magento_TwoFactorAuth clear cache..... sudo bin/magento cache:flush I hope it work perfectly!


0

In your XML file, you have to add ViewModel for Layernavigation. <referenceContainer name="sidebar.main"> <block class="Vendor\Custom\Block\Navigation" name="catalog.leftnav" as="navigation" before="-" template="Magento_LayeredNavigation::layer/view.phtml"> <block class=&...


0

Please try to remove this condition <?= $storeId == 2 ? on the below lines in the same code, like: <span <?php if ($block->getPriceId()) :?> id="<?= $block->escapeHtmlAttr($block->getPriceId()) ?>"<?php endif;?> <?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->escapeHtmlAttr($...


2

You can also use this to disable using this command: php bin/magento config:set twofactorauth/general/enable 0 if you want disable complete module than try this php bin/magento module:disable Magento_TwoFactorAuth and at the end bin/magento cache:flush also clear browser cookies or try incognito browser.


0

I temporarily commented out the code that sends the emails, cleared cache, added the accounts, then uncommented the code, and cleared cache. I followed some answers here Magento 2 : Is there any way to disable Welcome Email after signup to find out where to comment.


0

Please Try below solution to fix it: You need to replace the code of vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml with below code: <?php /** @var $block \Magento\Framework\Pricing\Render\Amount */ ?> <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $objectManager->...


0

Try this code : <referenceBlock name="navigation.sections"> <action method="setTemplate"> <argument name="template" xsi:type="string">Magento_Theme::html/customheader.phtml</argument> </action> </referenceBlock>


0

Thanks Arun I followed following steps: Magento 2.4.1 installation steps 1 - Install PHP 7.4 With Nginx (Try to run info.php) 2 - Install Maria DB with supported version 3 - Install Elasticsearch 4 - Configure NGINX host "5 - Setup Magento using below command /usr/bin/php bin/magento setup:install --base-url=http://dev.m241.com/ --db-host=localhost --db-...


0

What version of Magento are you running? This issue was supposedly meant to be fixed in v2.4.3, however, we're running 2.4.3-p1 and the issue still persists: https://support.magento.com/hc/en-us/articles/4403024155917-MDVA-34330-Orders-not-filtered-according-to-admin-timezone


0

Create a mixin in your module or theme (eg. Magento_ReCaptchaFrontendUi/js/reCaptcha-mixin.js), reference it in local requirejs-config.js and add the following code: define([], function() { 'use strict'; return function(Component) { return Component.extend({ initCaptcha: function () { if (typeof this.settings === '...


0

For those who use composer to patch to save you all some time composer require cweagans/composer-patches ./patches/composer/invalid.key.patch diff --git a/vendor/magento/module-backend/App/Action/Plugin/Authentication.php b/vendor/magento/module-backend/App/Action/Plugin/Authentication.php index 8227966..cc32c36 100644 --- a/vendor/magento/module-backend/App/...


0

In your case you're using 'default' scope when getting config values. In this case, you will be getting the values defined in your etc/config.xml file. In order to get the actual configured value, you need to use 'store' scope. So in your code you should replace return $this->scopeConfig->getValue($path, \Magento\Framework\App\Config\...


0

Finally, I figured it out myself. Below is the working code. <?php namespace MyVendor\MyModule\Controller\Subscriber; use Magento\Customer\Api\AccountManagementInterface as CustomerAccountManagement; use Magento\Customer\Model\Session; use Magento\Customer\Model\Url as CustomerUrl; use Magento\Framework\App\Action\Context; use Magento\Store\Model\...


1

I did see this is an error and fixed it in the admin. Admin > Store > Configuration > Catalog > Catalog > Use Flat Catalog Product choose No and clear cache problem will be solved.


0

You can go with the Magneto doc link https://devdocs.magento.com/guides/v2.4/install-gde/prereq/nginx.html. This is the Magento Way to install with nginx


0

<?php // configuration Data $url="http://www.example.com/index.php/"; $token_url=$url."rest/V1/integration/admin/token"; $product_url=$url. "rest/V1/products"; $username="your admin username"; $password="your admin password"; $product_links = array( array("sku"=>"...


0

You should better add a plugin for the class instead of overwriting it. app/code/Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Newsletter\...


0

Remove magento/composer-root-update-plugin from composer file. "magento/composer-root-update-plugin": "~1.0", Hope it helps.


0

Please Disable from here Stores > Settings > Configuration -> B2B Features


0

It seems that the upgrade requires a function "str_contains()" that only exists in PHP8. Can you try with php8 instead of 7.4 ?


0

You are importing fancybox but then using difference case in your code - Fancybox. Failing that try adding your fancybox path within the map config instead of path. map: { '*': { html5shiv: 'js/html5shiv', responsive: 'js/responsive', theme: 'js/theme', fancybox: 'js/jquery.fancybox.min' } }


2

This approach is deprecated because of the favor of composition over inheritance. So instead of: class YourClass extends \Magento\Framework\App\Action\Action use: class YourClass implements \Magento\Framework\App\ActionInterface and add your logic to the execute() method. It's true though that there's still a lot of Magento core code that uses the ...


0

I don't think mix db_schema with setup script is a good idea. Your problem maybe come from your data. You can try run command for filling all data before re-change nullable example update trade_item_brand_category set new_brand_approved_time = CURRENT_TIMESTAMP where 1=1 and then, change nullable to true and run s:up command Hope it help!


0

I had to update setup_version value in etc/module.xml for UpgradeSchema file to execute. I have done below changes and ran setup:upgrade and it worked. Updated setup_version from 1.0.0 to 1.0.1 Updated db_schema as given below <column xsi:type="datetime" name="new_brand_approved_time" nullable="true" comment="Brand ...


0

You have to generate whitelist.json after changing db_schema Using below command: php bin/magento setup:db-declaration:generate-whitelist --module-name=YourModule_Name Then check you etc folder if or not db_schema_whitelist.json is generated


1

You didn't assign Session class inside constructor Change your code with below code <?php namespace Ravi\Learn\Helper; use Magento\Framework\App\Helper\Context; use Magento\Customer\Model\Session; class Data extends \Magento\Framework\App\Helper\AbstractHelper { /** * @var Session */ protected $customerSession; public function ...


Top 50 recent answers are included