New answers tagged

0

Please have a look at the file app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml or vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml and related javascript files. Then you have a clear idea which one need to extend.


0

After installing the EAC cleaner module, I ran the /opt/cpanel/ea-php72/root/usr/bin/php bin/magento eav:media:remove-unused and got the error message below. Any suggestions? There are no commands defined in the "eav:media" namespace. Thank you!


0

I want to modify the PRODUCT_HAS_WEIGHT property for all products in the database. For that I want to access the MySQL database and issue a query that updates all the corresponding fields As I needed this today and didn't find the accepted answer actually provided this, I have prepared the following one liner tested with Magento 2.3.3: UPDATE ...


0

You can actually simply do this by adding a label attribute to any container in your layout xml. This way it is available for all widgets. If you want it on the homepage you can add it to a cms_index_index.xml file in the layout folder of your theme or module. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...


1

Download module from GitHub and make changes as per requirements. Magento2 Checkout Custom Form


0

I found out the reason of this error. Some extensions add custom CLI commands. Check di.xml for: Magento\Framework\Console\CommandListInterface Magento\Framework\Console\CommandList The problem is these commands include classes that require data in tables. But you didn't installed the system. For example, if you try to include Magento\Framework\Stdlib\...


0

As the product informations are stored in multiple tables in Magento, When you add a new product or do some major changes in product configurations. You have to do the following steps : php bin/magento indexer:reindex php bin/magento cache:flush


0

Run following commands: -php bin/magento ca:cl -php bin/magento ca:fl -php bin/magento indexer:reindex -php bin/magento se:up && chmod -R 777 var/ pub/ generated/ If it did not solve the issue check the product view widget capacity and increase it.


0

This is the only that worked for me. It sorts by the selected sorted attribute AND set the out of stock products in the end of the listings: You need to create a Plugin (type="\Magento\Catalog\Model\Layer") with the following function: /** * Retrieve current layer product collection * * @return \Magento\Catalog\Model\ResourceModel\Product\Collection */ ...


0

I just created a new module for that. But without own api interfaces and models. Instead I use the default ones of magnento-customer. MyPackage/MyModule/etc/webapi.xml <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"> &...


0

This issue was due to some unwanted JS files from 3rd party plugins. The JS was taking so much time for loading and it prevented the main image file from loading and hence it loaded the small thumbnail image from cache. We resolved the issue by optimizing the Js file of the plugin. Thanks for everyone.


0

In case somebody gets this error when writing their own UI Components: in my case I forgot to add the dependency parameter in my JavaScript: define([ 'ko', 'uiComponent' ], function (uiComponent) { <-- See, I forgot to mention 'ko' here! :-( 'use strict'; // ... etc ... Hope this save somebody some frustration whilst debugging. It'...


1

You can check below file in vendor directory vendor/magento/theme-frontend-luma/Magento_Theme/web/css/source/_module.less Here in this file you can see this @header-panel__background-color. Here in this less file Magento defines color for "@header-panel__background-color" so whenever we want to use this color code we will not add #4D926F there, we can ...


0

I was facing the same error in my local setup. So I tried grunt clean; bin/magento setup:static-content:deploy -f At the time of static content deploy I come to know that there is some wrong variable assignment in _theme.less. I fixed that and again ran grunt clean; bin/magento setup:static-content:deploy -f This fixed my issue.


0

The method isValueChanged() from vendor\magento\framework\App\Config\Value.php file will be able to find if the particular field value has been changed or not. To use this, apply tag named backend_model in the module\etc\adminhtml\system.xml for which field you would like to detect. system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www....


0

For Magento 2.3.3 version its not giving the name in the response. { "id": 1, "parent_id": 0, "name": null, "is_active": null, "position": 0, "level": 0, "product_count": null, "children_data": [ { "id": 2, "parent_id": 1, "name": null, "is_active": null, "...


0

caused by index not right for this product. Solution: run following commands: php bin/magento indexer:reset php bin/magento indexer:info php bin/magento indexer:status php bin/magento indexer:reindex


0

I fount the solution. If you want to filter your request, your parameters should be like following: searchCriteria[filter_groups][0][filters][0][field]=field_name&searchCriteria[filter_groups][0][filters][0][value]=&searchCriteria[filter_groups][0][filters][0][condition_type]=neq So, value must be empty and filter must be 'neq'.


0

You have to add below file in your custom extension app/code/Vendor/Extension/etc/events.xml <?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="checkout_submit_all_after"> <observer name="...


2

You can create events.xml file here and you can use checkout_submit_all_after event there. app/code/Vendor/Module/etc/adminhtml/events.xml Content for this file is.. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event ...


0

The above answers are good and work. I am proving a full answer here with proper solution so it will not affect other sections of the website. create Magento_Weee folder at app\design\frontend\{your_vendor_name}\{your_theme_name} if folder already not exist. create a file named checkout_item_price_renderers.xml if not exist. Put below line of code into a ...


0

update this file vendor/magento/module-review/Block/form.php protected function getProductId() { return $this->getRequest()->getParam('id', false); } to this code protected function getProductId() { return $this->getRequest()->getParam('product_id', false); }


0

Leave formElement as input and add text elementTmpl <item name="elementTmpl" xsi:type="string">ui/form/element/text</item> For that case it'll be something like this <field name="type"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string"...


1

app/code/Vendor/Module/view/adminhtml/layout/sales_order_view.xml Introduced new custom_column and changed column_name block's template for product name with url <?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"> <...


1

Since your filters are not working. replace this <item name="filter" xsi:type="string">text</item> By <item name="filter" xsi:type="boolean">false</item> and for sorting <item name="sortable" xsi:type="boolean">false</item> This will solve your problem, pls mark it as solution if it works for you.


0

I had the same issue. I noticed that the configurable attribute is not present in that attribute set Edit the Attribute Set and add the configurable attribute in this set to be used by Variants.


0

this is the good code to create a product attribute that can be used for configurable product tested on Magento 2.3. The required parameters are : 'source'=> \Magento\Eav\Model\Entity\Attribute\Source\Table::class 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL, 'user_defined' => true, 'visible' => true, ...


0

You can try this <?php echo $this->getLayout() ->createBlock('Magento\Store\Block\Switcher') ->setTemplate('Magento_Store::switch/stores.phtml') ->toHtml(); ?> Hope this will work for you!


0

Asynchronous Indexing That take care about Customer Grid Orders Grid Invoices Grid Shipments Grid Credit Memos Grid Magento has a cronjob that take care change log of these main tables (sales_order,...), After you are inserts new Order into sales_order and absolutely you much install Magento default cron jobs (See Configure and run cron, Magento will copy ...


0

I am using Varnish + Redis for Full Page Cache at the same time. In Magento 2.3.2, after clear both cache, visit some pages, then you will find the database in Redis for page cache will not have any data. So if you are using Varnish cache, Full Page Cache will not use the page_cache setting from env.php. If you remove Varnish, Full Page Cache will use the ...


0

I know it is not an answer but I want to say that I was in the same problem and already fixed it in file/vendor/magento/framework/Serialize/Serializer/Json.php by using exactly that query.


1

your error is Unable to serialize value magento 2. Please remember that if the magento version is < 2.2, the option is saved by serialize, in reverse, the version >= 2.2, it use json. You can resolve it in file /vendor/magento/framework/Serialize/Serializer/Json.php by using this query: public function unserialize($string) { $result = json_decode(...


0

You don't provide a link to your side, but I still found the site. Please edit your question and add a link. On my system with a fast connection, I need 20 seconds to load your page with more the 350 elements (js, CSS, graphics). I suppose sometimes your script files reach a timeout for waiting on a resource. You should try to reduce your side by ...


0

It seems that magento 2 does not have an xml option/configuration for this, but Fotorama yes. Check the following link https://fotorama.io/docs/4/options/ thumbmargin Size of thumbnail margins. I've fixed this adding one more option in gallery override of my theme. (gallery.phtml) app/design/frontend/<your_vendor_name>/<your_theme_name>/...


0

As @simonthesorcerer wrote the problem are the data in the database! In our case the migration of Magento from 2.1.15 to 2.3.3 thrown an exception in the field value of the quote_item_option table. The error was the wrong lenght of a string mentioned in the serialized data: a:8:{s:4:"uenc";s:60:"aHR0cDovL3d3dy5zbGlkZXNob3BwaW5nLml0L2l0YS9jaW4tY2luLmh0bWw,";...


1

To bring company name in shipping address section, @princepatel answer is fine. However, we need to put condition to check whether its empty. So i will provide with that specific condition. To bring the company name in shipping address section in checkout page override vendor/magento/module-checkout/view/frontend/web/template/shipping-address/address-...


0

Path : Magento root directory/app/code/Mageplaza/PdfInvoice/Model/Template/SenderBuilder.php Replace This file from mageplaza pdfinvoice module <?php /** * Mageplaza * * NOTICE OF LICENSE * * This source file is subject to the Mageplaza.com license that is * available through the world-wide-web at this URL: * https://mageplaza.com/LICENSE.txt * ...


0

Admin >> Store >> Configuration >> Customers >> Persistent Shopping Cart >> General Options >> Enable Persistence. - set to yes and time set to 1 day Quote timeout is also set to 1 day Do we need to do server level changes as given in the comment session.gc_maxlifetime ? Everything is enabled for cart but cart is emptied for guest after 1 hr Please help ...


0

As Answer Refereed by @RohanHapani You Should use: list($tableAlias, $tableName) = [key($table), current($table)]; Then Code is Like: if (is_array($table)){ list($tableAlias, $tableName) = [key($table), current($table)]; } else { $tableName = $table; } Hope this may help You!!


1

Same issue i have faced in few day's back. In my case there were issue with listing_top position. <container name="listing_top"> ... ... </container> <columns name=""> </columns> listing_top elements should be before elements. First need to find all extended ui_component files from other modules. Check in one of file ...


Top 50 recent answers are included