New answers tagged

0

For Magento 2.4 you need to install PHP 7.4 and elasticsearch. You can use this to install magento 2.4.x in your local. Source: https://magentip.com/install-magento-2-4-x-on-ubuntu-with-elasticsearch/ This will help you to install magento on aws.


0

Edit config.xml: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> <default> <csp> <policies> <storefront> <frame-ancestors> ...


0

Maybe some custom module affect to value of title. I think it's a good idea to debug to see what the value of title is.


0

SELECT cpe.sku, cpev.value, cpet.value FROM catalog_product_entity cpe JOIN catalog_product_entity_varchar cpev ON cpe.entity_id = cpev.entity_id JOIN catalog_product_entity_text cpet ON cpe.entity_id = cpet.entity_id WHERE cpev.attribute_id = (SELECT attribute_id FROM eav_attribute ...


0

I had this problem too I converted 127.0.0.1 to http://new.mys.com for ease of use in the httpd-vhost file That's why my site on Localhost didn't work properly If you have converted 127.0.0.1 to a domain in Windows, delete it The error happens because Windows can’t translate the localhost or youre domain URL to 127.0.0.1 in core_config_data table, thus the ...


0

It's out of box functinality. It's not possible to share page in youtube. You can share only videos in Youtube. Not possible to share any page or post in Youtube.


0

You can add condition as below in In magento 2 how to override stock availability in product detail page in custom module and add backorder message in template file app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...


0

You can use the Widget's model method "getWidgets()" or "getWidgetsArray()" to get all the widgets: namespace Vendor\Module\Block\Adminhtml\Widget; use Magento\Widget\Model\Widget; class Test { protected Widget $_widget; public function __construct( Widget $_widget ) { $this->_widget = $_widget; }...


0

As Magento 2 provides a mechanism for creating a robots.txt file, there is no need to manually create one. All you need to do is add some configuration in Nginx and Magento itself and a robots.txt will be generated periodically using cron. Generate a Robot.txt in Magento To generate a robots.txt file, use the following steps: Log into your Magento admin ...


2

The robots.txt is basically a file that tells all search engine crawlers which URLs they can access on your website or eCommerce store. You can also keep single or multiple web pages out of Google by block indexing using noindex. Below, we’ll show you exactly how to set up robots.txt in Magento 2. After that, we will also show you how to configure robots.txt ...


1

You can do it in your Block file, open relevant block file and use this code: $this->pageConfig->getTitle()->set("Your custom dynamic title"); where $this->pageConfig is the instance of \Magento\Framework\View\Page\Config You can use this code in __consturct function or _prepareLayout function Hope this will help you.


0

From Magento 2 Admin, go to Content > Design > Configuration. Edit the website of choice. Search Engine Robots contains options for robots.txt. Magento creates the file automatically. You might need to flush the cache or re-deploy static content. Example: Default Robots: INDEX, FOLLOW Edit custom instruction of robots.txt File: User-agent: * Disallow: ...


0

your event.xml is containing only controller_action_postdispatch which is not correct: Below are controller action events: Controllers: controller_action_predispatch_ [ROUTE_NAME] controller_action_predispatch_ [FULL_ACTION_NAME] controller_action_postdispatch_ [ROUTE_NAME] controller_action_postdispatch_ [FULL_ACTION_NAME] ...


0

One solution is to put Frontend Development Workflow back to server side less compilation System > Configuration > Advanced > Developer > Frontend Development Workflow = Server Side Less Compilation or via ssh bin/magento config:set dev/front_end_development_workflow/type server_side_compilation


0

In my case one attribute was deleted from database: custom_layout_update_file I found it putting one breakpoint at: vendor/magento/module-catalog/Observer/InvalidateCacheOnCategoryDesignChange.php Line 67 Then i have removed the entry from patch from patch_list table. After i've run bin/magento setup:upgrade and the problem was solved.


0

I managed to solve the problem with the following steps: Downgrade to Composer 1 as this is fully compatible with Magento 2.3 In DDEV it is done in .ddev/config.yaml composer_version: "1" Running a MacBook with Big Sur I had to install PHP 7.4 manually – this link showed me how: brew install php@7.4 brew link --force --overwrite php@7.4 brew ...


0

Try This app/code/VedoreName/ModuleName/view/frontend/layout catalog_product_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="...


0

Try This app/code/VedoreName/ModuleName/view/frontend/layout catalog_product_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="...


0

Based on the provided error trace, looks like some of the records in core_config_data table haven't been removed when you deleted the second website. So please try running the following MySQL query and then flush cache: DELETE FROM `core_config_data` WHERE `scope` IN ('website', 'websites') AND `scope_id` = '2';


0

I was able to achieve this my the below code. It might help someone require([ 'Magento_Customer/js/customer-data' ], function (customerData) { var sections = ['cart']; customerData.invalidate(sections); customerData.reload(sections, true); });


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.


0

Stop xampp/wamp and than open xampp/php/php.ini and search int and remove starting semicolon ; if you are on Ubuntu than try following instructions sudo apt-get install -y php-intl You can then check if the extension is installed using this command: php -m | grep intl Don't forget to restart Apache server


0

This is Ternary Condition so basically if $block->isrequiered() getting then apply 'required' class otherwise black class add If you don't want to add condition just remove condition <div class="field company">


0

diff --git a/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php b/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php index 3ee2rd..8349152 111644 --- a/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php +++ b/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php @@ -123,7 +...


0

20% of 83.32 is 16.68 so the tax calculation is correct. Subtotal will have : product cost plus tax on product. When you state prices inclusive tax then it will do a reverse calculation and calculate tax amount and product price. parameters : Product price Tax percentage. Is product price inclusive or exclusive tax. tax amount =(100/(100 + tax rate ))*...


0

This is unfortunately not working with FA hosted solution, it has to be only self hosted. So from your account, download the web package. You would need JS files only. In custom theme, I had to create requirejs-config.js: var config = { paths: { 'fontawesome': 'js/fontawesome/fontawesome.min', 'fontawesome/solid': 'js/fontawesome/solid....


0

Clean DB logs. Check on cl tables and triggers. Set Indexer on schedule. Make sure that DB table indexes are intact. Check by login all Mysql queries with PH stack to get idea if some sql query is consuming time. Use profiler and check


0

You can do it following way : create $_urlInterface object of Magento\Framework\UrlInterface and get product edit URL help of following code in backend. $this->_urlInterface->getUrl('catalog/product/edit', ['id' => $_item->getProductId()]);


0

Out of the box, when choosing options, the images and the price will change. But not product name. More information about which elements on the page change when options are selected can be found here: Magento\ConfigurableProduct\Block\Product\View\Type\Configurable::getJsonConfig(). In order to display the Product name of the selected product, you can create ...


0

You will have to set the current version using Magento's version manager. You can use the below function getProductByScheduleId() to get the product. <?php namespace Vendor\Module\Folder; use Magento\Catalog\Api\Data\ProductInterface; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Staging\Model\VersionManager; use Magento\Catalog\...


1

Make sure that your frontend is configured to use your custom theme 'ComSpirit/Optonet' under Content > Design > Configuration. If point 1 doesn't help, make sure that the mentioned template (vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml) is really used on storefront. Add some text to the template, flush cache and refresh ...


0

We're a luxury wholesale company who work with leading fashion retailers and are currently looking to integrate Magento and Salesforce. We've hired developers for Magento and Salesforce who are currently working together to explore different options. A two-way sync for creating new accounts/leads/editing customer data/listing new products are all essential ...


0

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


0

Here the solution. Just run those two sql queries: update catalog_product_super_attribute set position = 0 where attribute_id = 200; update catalog_product_super_attribute set position = 1 where attribute_id != 200; Those will set position = 0 for color attribute in all products and position = 1 for rest of the attributes. This way color will be always first....


0

i have used @bbakalov's module from github and it works: https://github.com/bbakalov/Bss_DynamicRows Hope it serves you! Update: i have been ansered to my question, which was to add dynamic rows with block (not Ui Components): Add dynamic rows (No UI Component) block, into the custom widget


0

Did you check document from dev docs https://docs.magento.com/user-guide/reports/advanced-reporting.html You can check this guide, and focus in Requirements Hope it help!


0

I have a suggestion for you. There are a lot of extensions available on the marketplace. I want to give you the best suggestion [Advance Report Magento 2][1] by Elsner The eCommerce business platform is becoming one of the most competitive markets. In such a setting, your company must stand out from the crowd in order to get noticed. And you can only do ...


0

Try to match elasticsearch versions with composer.json and composer.lock with magento 2 github with the version you are upgrading


1

Actually, Magento allows you to validate optional fields. You can do this as follows (for example): <input type="text" data-validate='{"letters-only":true}' /> As you can see, you don't need to add "required":false param. If this is not working for you and the field is still required, probably you have the validation rule ...


0

From magento requirements, it says for magento 2.4.3 you need ES 7.9


1

Backend configuration is available for this:- Store > Configuration > Advanced > Admin > Security > Maximum Login Failures to Lockout Account


0

According above details the error is for 2nd argument OrderInterface $order. Please check you have give correct class which is expecting Magento\Sales\Api\Data\OrderInterface. The above error says 2nd argument is acting as null.


2

Make your constructor look like this public function __construct(Context $context, \Magento\Customer\Model\Session $customerSession) { parent::__construct($context); $this->customerSession = $customerSession; } and you should not need the markup in di.xml


1

You can get firstname using below code: define([ 'uiComponent', 'Magento_Customer/js/customer-data', 'Magento_Customer/js/view/customer' ], function (Component, customerData) { 'use strict'; return Component.extend({ /** @inheritdoc */ initialize: function () { this._super(); this.customer = ...


0

Please Follow Below Document for JS Validation. https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout_carrier.html


0

Answering to myself : NO. It appears there are no shortcuts to this method.


0

For process this queue, execute bin/magento product_action_attribute.website.update in magento root. Configure RabbitMQ for automating the queue process in Magento. Ref : https://devdocs.magento.com/guides/v2.4/config-guide/mq/rabbitmq-overview.html https://www.dckap.com/blog/rabbitmq-configuration-with-magento2/


1

Please check https://github.com/Smile-SA/elasticsuite/issues/318#issuecomment-435322698, that fixed it for me. As this is a bit old, the command should be : bin/magento config:set catalog/search/engine elasticsuite --lock-env && bin/magento cache:flush && bin/magento index:reindex


0

Check the console for the CSP errors. CSP module might be blocking your iframe due to security policy If so, check this documentation on how to resolve CSP errors.


0

To preselect a simple product in a configurable product, the address of a simple product should look like this for example: /mona-pullover-hoodlie.html#143=167&93=53 where /mona-pullover-hoodlie.html - configurable product URL, 143, 93 - attributes IDs, 167, 53 - option IDs. In order to change the URL of simple products, you can create a Plugin (...


Top 50 recent answers are included