Questions tagged [magento2]

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

35
votes
0answers
1k views

Magento 2 Adminhtml spreading forms across multiple tabs

I'm attempting to create a backend module, wherein on my edit page I use admin-2column-left layout. I want to have a form on each tab, but I do not understand how I can do this. Ideally, I would ...
18
votes
0answers
7k views

Magento 2: Uncaught TypeError: Cannot read property '*' of undefined in (section-config.js:33)

It's duplicate question but I am facing the same issue while adding the product & removing items from the cart page. I have spent almost a day to resolve but no luck hope someone could help me ...
12
votes
0answers
687 views

Magento Profiling - Why so many EAV: Magento\Eav\Model\Config::getAttribute?

I'm just reviewing the speed of a store and just wondering if anyone knows more about why I have over 100 EAV: Magento\Eav\Model\Config::getAttribute 0.006978 rows within my profiler. It's just I do ...
10
votes
0answers
258 views

Is there an event or plugin spot for when cart rule is no longer valid?

Is there an event or place I can plugin for when a shopping cart price rule is no longer valid (such as when it expires or if you change the quantity of other products where it no longer applies)? I ...
10
votes
0answers
250 views

Separate login and Shipping methods from Shipping Step

I wanted to Separate login and Shipping methods from Shipping Step in Magento 2 on Checkout page ?
9
votes
0answers
937 views

merge guest quote with customer quote(if custommer log in) magento 2 rest api

if 2 items in cart if customer login both item should need to add cart , Both quote (before login & after login) merge and create final quote which contain all item of customer quote Refference ...
9
votes
0answers
2k views

How to enable inline edit in catalog grid without changing source code?

I try to turn on inline edit in catalog grid as it described in DevDocs: http://devdocs.magento.com/guides/v2.0/ui-components/ui-secondary-inline.html Main problem is how to override this block of ...
9
votes
0answers
2k views

Magento 2: Carrier with such method not found

When i'm on Checkout Page. Sometime i'm facing below error. Carrier with such method not found: null, null I have selected by Shipping Address, Not selected any Shipping Method & Clicked on "...
9
votes
0answers
714 views

Filtering product list by extension attribute

I added a new extension attribute extensionattribute1 to Magento\Catalog\Api\Data\ProductInterface. <attribute code="extensionattribute1" type="string"> <join reference_table="...
8
votes
0answers
72 views

Magento2 Chrome Driver Service error in MTF

I am new to MTF. I have followed the magento2 tutorial based on the following link But When I am running the command vendor/bin/phpunit I am getting the following error - Fatal error: Uncaught ...
8
votes
0answers
840 views

API Stock update

Using Magento 2.2.2, I was trying to add stock updates to a pre-existing setup using the official defined endpoint: rest/V1/products/testsku/stockItems/1 with { "stock_item": { "qty": 1234, ...
8
votes
0answers
284 views

How to add customer group field on checkout register in Magento2?

I want to add Customer Group option as a Radio Button field on the checkout page. Customer is going to be saved after they will complete the checkout. Magento2 - Radio button group on checkout page
8
votes
0answers
1k views

Magento 2 checkout custom field validation

what is the best method to add validation for my custom checkout field which depends on selected shipping method? For e.g. I am adding field to address form in LayoutProcessor where I can specify ...
8
votes
0answers
761 views

Magento 2 - Update quantity and totals of cart page without page reload?

We need to update the main cart on change of quantity by Ajax without click on "Update Cart Button" and without reloading the page. Below my code in this code only update cart subtotal but not updated ...
8
votes
0answers
407 views

Magento 2 How to add Tab Component in admin module

How can I add UI Tab Component in custom admin module with the help of below user guide ? http://devdocs.magento.com/guides/v2.1/ui_comp_guide/components/ui-tab.html There are not enough information ...
8
votes
0answers
538 views

Magento 2: Creating configurable product using the REST API

In order to create configurable product I need to create configurable product, virtual product and finally connect them. Example of json request got from here: How do I create a configurable product ...
7
votes
0answers
27 views

Apple Pay with magento Getting error

I implemented apple pay in my magento store I create button and now i want onvalidatemerchant but when I call end point I'm getting this error ssl3_read_bytes:tlsv1 alert unkown ca. I am ...
7
votes
0answers
114 views

How to add Widget layout updates field in my custom module admin form Magento 2

I am working on a custom module where I want to add the following field in my admin form in have my admin form developed in using ui_component I want to add this field (in this picture) after a field ...
7
votes
0answers
38 views

Subscription status shows pending in advance reporting | Magento2

I want to enable advanced reporting in Magento2. To do this I go to Store->Configuration->General->Advance Reporting and enable it. It have been 5 days but still subscription status shows pending. ...
7
votes
0answers
206 views

Magento2 Add to cart button in row with grouped Products

In Magento2 I want to add "Add to cart" button with qty for every single product of Grouped Product. Is it possible? How? I see that the form is only one. I need also to remove the standard "Add to ...
7
votes
0answers
540 views

Magento 2: How to make custom fee taxable

I want to add a tax on custom fee. tax calculation is perfect and gets tax amount but it's not set in TAX files in quote_address in the database. public function collect( \Magento\Quote\Model\...
7
votes
0answers
738 views

Magento 2 : Not getting the product grid in a custom form using UI component

I want to show product grid in admin form using UI component, for that, I have added the following code in product_form.xml <fieldset name="assign_products"> <argument name="data" ...
6
votes
0answers
73 views

How to create custom XHTML template system in magento 2?

Hey guys, I want to know how to create a custom XHTML system with the custom module or via core file system in Magento 2 & how it works?
6
votes
0answers
80 views

Magento2 : Apple Pay Integration With Payfort Payment

I have to integrate the apple pay payment method to my website so anyone have any reference URL or Extension. so I can use that link. I follow below link https://applepaydemo.apple.com/ https://...
6
votes
0answers
193 views

Header and footer in an external file

I'm using an index.php file under /pub/custom folder, which is used to create custom designs. This file is completely written in html and javascript. Is there any way to include current theme ...
6
votes
0answers
145 views

How to get product dimension units (cm/in)?

I need to get the dimension units for width, height and length. There are solution available only to get the value of these attributes like, $product->getTsDimensionsLength(); $product->...
6
votes
0answers
339 views

Join table for grid Magento 2 not working

I tried to create a join to select data for my grid table in Magento 2 but the problem I am always getting is an empty record for alias that I wanted to use in my grid. Please refer the below image: ...
6
votes
0answers
466 views

Uncaught Error: Call to a member function setItem() on boolean on product grid: Magento 2

I have a custom module in which I am using the grid to add items in the admin end. The items are getting added properly and everything is working fine. However, I face an issue often where after ...
6
votes
0answers
121 views

Replicate order summary block Magento 2

I want to add order summary at checkout success page, I want to replicate the existing order summary block and template file whether its from backend or frontend. Which block and template file to ...
6
votes
0answers
371 views

How to override class Virtual Type class

I saw this, but it don't work for me. How to override Virtual Type class in Magento 2 <virtualType name="categoryFilterList" type="Magento\Catalog\Model\Layer\FilterList"> <arguments>...
6
votes
0answers
911 views

Magento 2 - sorting order of products in a widget block

I created a block and a widget in admin panel to show products that fit some criteria(in a specified category) on home page. When I finished the setting, I found that the sorting order of the ...
6
votes
0answers
1k views

Magento 2 : Validate form fields that are loaded with Knockout on blur-event

I have a form that is generated through a .phtml file, and in this form various fields are loaded with KnockOut (using the uiComponent javascript-object). .phtml: <form action="#" class="form ...
6
votes
0answers
736 views

Magento 2 Admin- Invalid data provided for linked products

Getting an error " Invalid data provided for linked products " when adding related products to a product from the admin panel and saving Indexer crons, already setup Magento CLI version is : 2.1....
6
votes
0answers
691 views

Magento 2 - Move the afterMethods item (Discount and Gift Card Code) to the Order Summary sidebar

I would like to move the afterMethods xml item which contains the Discount Code and Gift Card code under the billing-step in the module-checkout/view/frontend/web/checkout_index_index.xml so that it ...
6
votes
0answers
412 views

Display MSRP with MAP disabled?

In Magento 2, if I set 'enable MAP' to 'No' in Stores > Configuration > Sales > Sales It removes the MSRP field in Advanced Pricing from the product page. My goal here is to display MSRP on the ...
6
votes
0answers
673 views

How to add dynamic custom column in UI component

I have configured UI component columns in admin grid and its working fine. I need to add custom columns dynamically. For example we can add custom column in __prepareColumns function in Block layout ...
6
votes
0answers
717 views

Magento 2 editor.js Unexpected Token

The content editor in the backend is not displaying on my site. I'm getting the following error: editor_template.js:1 Uncaught SyntaxError: Unexpected token < editor_plugin.js:1 Uncaught ...
6
votes
0answers
634 views

magento 2 can't use same url key for different store view pages

I have 2 store view on my website, one in English and one in Italian, I'm trying to set different privacy and cookie page for each view, but I need to use the same url key, to autoredirect to the ...
5
votes
0answers
24 views

Magento 2 : Is there any idea how product will come in mailchimp after connect my magento with mailchimp?

I just need to use Product Recommendations block in mailchimp account. My magento store is already connected with mailchimp account but i can not seen any product inside this product block in ...
5
votes
0answers
37 views

Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/amasty_paction/template/grid/tree-massactions.html Magento 2

I have installed Amasty Mass product action extension for Magento 2.When i enabled that extension product grid does not load in the backend. Please check below Screenshot, I have checked log file and ...
5
votes
0answers
80 views

php bin/magento app:config:dump gives me [Magento\Framework\Exception\ValidatorException] Path “app/etc” cannot be used with “app/etc”

I'm trying to change some settings, and this answer has already been very helpful. But now php bin/magento app:config:dump gives me [Magento\Framework\Exception\ValidatorException] Path "/var/...
5
votes
0answers
33 views

How to create upload image and videos attribute in Admin product detail page in Magento2.2.5?

I want to create image and video upload for in Admin Product page Refer my screenshot: Under Available in I have created a attribute aaa, Under aaa I should get images and videos upload like this. ...
5
votes
0answers
512 views

Magento 2 Plugin Sort Order

I am trying to understand the concept of sort order when using plugin. As per my understanding the sort order works in lower to higher when used before method and higher to lower when used in after ...
5
votes
0answers
84 views

How to Add customized error message in magento 2 admin form

<item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">My Custom Filed</item> <item name="dataType" xsi:type="string">text</item&...
5
votes
0answers
178 views

What's the function of `$editMode` and `$forceReload` parameter in ProductRepository?

What's the function of $editMode and $forceReload parameter in ProductRepository? If I set $editMode=true or $forceReload=true, what will happen? When should I set the parameter is true when using ...
5
votes
0answers
143 views

Magento2 : How to set filter for an insert listing component while loading edit view form

I want to display all contacts of a supplier on the supplier edit page. For this, I use an insert listing component and I include the contact grid in a field set. How can I use the supplier_id to ...
5
votes
0answers
358 views

How to create admin user for specific store in magento2?

I have a multi-store website which runs over different domains. I have also a multi-admin user. Now I need to set them for specific stores. Basically I need admin user who can access data of only of ...
5
votes
0answers
225 views

Magento 2 USPS API estimated delivery date (standards and commitments api)

How can I add estimate delivery date for USPS shipping method? I am searching over google but no luck, how can I achieve this in Magento 2. I did this in UPS and want the same in USPS.
5
votes
0answers
307 views

Magento 2 The session id is too long

I am running Magento 2.2 on php7.1 and getting the following errors in my var/report and on my error log: > {"0":"Warning: SessionHandler::read(): The session id is too long or contains ...
5
votes
0answers
329 views

Magento2 : How to set custom meta title & meta description by observer?

I want to set meta title , description by the help of observer. But unable to set data here. please see my code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_page_config = $...