Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

Filter by
Sorted by
Tagged with
49
votes
2answers
24k views

Magento 2 - How to add a custom field to checkout and then send it

All tutorials are covering only adding a fields, but saving value of this fileds is skipped #mindblown. I don't know why, it's most important part of adding any field or form. I tried to follow ...
33
votes
1answer
4k views

Why is Magento 2.1.0 released before 2.0.9?

Magento has released 2.1.0 on June 23 but has released 2.0.8 (July) and 2.0.9 (Aug) after that. (https://github.com/magento/magento2/releases) Why are they releasing lower versions? If anybody knows ...
32
votes
2answers
3k views

Magento 2 - Why is Magento\Checkout\Model\Cart deprecated?

Since Magento 2.1, Cart has a @deprecated tag. Nevertheless, it is still used by Magento itself to store products when shopping. Is the deprecation intended, and if so, and what should we use instead?
29
votes
18answers
46k views

Refused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”

Suddenly CSS is not loading on my Magento 2 admin panel. The frontend is working fine. Error details: "Refused to apply style from 'https://www.ornativa.com/pub/static/version1502029409/adminhtml/...
27
votes
6answers
27k views

Static Content is not loading after upgrade

After upgrade from the Magento 2.1.0 to the Magento 2.1.3 (using composer) static content is not loading anymore. In the browser console I can see that all files is unavailable (404): I don't see ...
27
votes
10answers
9k views

Magento 2: Fails to upload a transactional email logo from admin

I'm trying to change transactional email logo from. Admin > Content > Design > Configuration > Edit any record -> Transactional Emails It's on Magento 2.1 but logo showing broken image after ...
27
votes
1answer
4k views

Magento 2.1: using the entity manager

From 2.1 Magento has introduced Magento/Framework/Model/EntityManager I may be wrong here but from my understanding it is to replace Magento/Framework/Model/AbstractModel which was implementing the ...
24
votes
2answers
5k views

Magento 2: what are the Interceptors file in var/generation?

So I noticed some Interceptor.php files in var/generation I know that this folder contains generated classes created on the fly for the following: Factories Proxies Plugins I assume that ...
23
votes
1answer
10k 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 ...
22
votes
2answers
14k views

Magento 2: Implement UI Fileuploader

I recently implemented the FileUploader Ui Component in my form on Magento 2.1.7. The code for it is here (app/code/Vendor/Blog/view/adminhtml/ui_component/vendor_blog_form.xml): <field name="...
20
votes
5answers
31k views

Magento 2 How to Add a New Column to Orders Grid

I've added a new column to the table sales_order called export_status, now I want to add new order grid column with the data from the new sales_order column. I've managed to add column to the ...
20
votes
2answers
37k views

How to Create Custom Form in Magento2 Frontend?

I want to create a custom form in frontend and using this form customer can get an appointment. In my form, I have 4 Fields. First Name (text filed) Last Name (text filed) Phone No. (numeric field) ...
19
votes
2answers
23k views

Magento 2.1.1 How to load Order with Increment ID using OrderRepository object

What would be the latest best practice to load Order using increment ID (instead of Order ID) using OrderRepository
19
votes
6answers
25k views

Magento 2 Installation Fatal Error - Cannot instantiate interface

I have installed a fresh Magento 2.1 over the command line and always get the same fatal error when trying to access the frontend or backend. Fatal error: Uncaught Error: Cannot instantiate ...
18
votes
7answers
86k views

Magento 2 did not sign in correctly or your account is temporarily disabled

When trying to login to admin account in my local test setup it says : Account is temporarily disabled even i used correct user and password.
18
votes
7answers
19k views

Add header and footer in checkout page Magento2

By default Magento 2 don't provide HEADER and FOOTER in CHECK OUT page. So I checked checkout_index_index.xml file on path app/design/frontend/package_name/theme_name/Magento_Checkout/layout/...
17
votes
5answers
28k views

Magento2: Get Media URL In Template File (Without direct Calling Object Manager )

How to Get Media URL in Template file ? All the solution i found is calling Object Manager directly. My another concern, Can you ever call object manager directly as best practice ? (because in most ...
17
votes
1answer
8k views

Where do I find the SYSTEM VALUE defaults? magento 2.1

I want to change the url rewrite area a bit - and I thought I would ask this question that has been bugging me for a bit: Where are the defaults set? For example for url rewrites, I have to uncheck "...
17
votes
2answers
5k views

how to reorder (switch) billing address before shipping address

on the onepage checkout I need to reorder the billing address before the shipping address. in fact the logic should be the other way around than it is now. if the shipping address differs from the ...
17
votes
3answers
40k views

Base Url Change Magento2.1

I have changed Base url in Magento 2.1, but it does not works. While installing I have set base url to www.domain1.net. I need to change it to www.domain2.net. What I tried: Update baseurl in ...
16
votes
4answers
5k views

Magento 2 Add dropdown list to shipping method

I develop shipping method for some logistic company. This company has many offices where customer can get his order. I can get offices list by сity in API but i don't now how better represent this ...
16
votes
4answers
6k views

Magento 2 - Render custom product collection via list.phtml

The product grid of a category page (frontend) is rendered via layout in catalog_category_view.xml. Lets say I have a custom product collection (which I got via ProductRepositoryInterface::getList(...
16
votes
1answer
866 views

Magento 2.1 Ui Component form field Token input

I want to add tags in an input field , in a similar fashion as it is done in product form to add catageories - which is show in the image below. This much task I have achieved by adding field ...
16
votes
5answers
2k views

Error on product page when you have related products and full page cache is on

I get this error on some products that have related products: Warning: Invalid argument supplied for foreach() in vendor/magento/module-catalog/Block/Product/ProductList/Related.php on line 129 This ...
15
votes
5answers
6k views

Why Magento 2 uses Knockout instead of Angular or React

My question is as simple as it says in the title. Its why would Magento choose knockout instead of other frameworks like angular or react? Is there a specific reason? Also is this the right ...
15
votes
1answer
19k views

Magento2 : Best way to load Customer by customer Id

What is the best way to load Customer by Id? using customer interface or customer factory or another way ? In most of solutions I found, it is done by directly using objectManager (which should be ...
15
votes
3answers
9k views

Magento 2 StoreManagerInterface already exists in context object in compilation

I am getting this error in my extension. PackageName\ModuleName\Block\Enhanced Incorrect dependency in class PackageName\ModuleName\Block\Enhanced in /var/www/html/app/code/...
15
votes
2answers
12k views

Best Way to Load a Custom Model in Magento 2

Because it was hard for me to find the right way, below you could find the best practice I made mine. Enjoy, correct my English if needed and say me I'm wrong if I am. :) Edit : ... and I found out I ...
15
votes
4answers
11k views

Magento 2 WYSIWYG Media image directive using admin url

Why is magento 2 creating directives for media images using the admin url? for example when i add an image on category page WYSIWYG it adds <img src="{{media url="wysiwyg/image.jpg"}}" alt="" /&...
15
votes
1answer
6k views

The configuration parameter “componentType” is a required for “advanced_pricing_button” component. | Upgrade Magento 2.0.7 => 2.1.0

After a lot of issues I managed to update Magento 2.0.7 => Magento 2.1.0 After checking the upgrade I see 2 issues: 1. The frontend is not displaying any products. 2. When I want to edit the products ...
15
votes
5answers
1k views

What is the preferred structure of a Magento 2 project under VCS?

When I start a new M2 project, the first thing I would do is to install the core via composer: composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition I ...
15
votes
1answer
489 views

Magento2 Catalog Product Options

We found this issue when working in a default Magento2.1. While creating customizable options for a product, if I select the drop-down field a second time, the spinner never stop loading. Please ...
15
votes
1answer
2k views

Magento 2.1 adding new component type problem

I added a new form element type called Company\Module\Data\Form\Element\PdfButton, when it is version EE 2.0.7 and used this element in a custom tab(added by overriding Magento\Catalog\Block\Adminhtml\...
14
votes
7answers
21k views

Magento 2.1.1 not compatibile with PHP 7.1.0

I've a new server with PHP v7.1.0RC3 installed. According to DevDocs Magento 2 is compatible with 7.0.2 up to 7.1.0, except for 7.0.5 which makes PHP 7.1.0 compatible with M2 however when tried to ...
14
votes
4answers
4k views

What are all the tools available for checking Magento 2 coding standard?

I am currently working on Magento 2 coding standard checking project. Is any other tool available, other than PHP_CodeSniffer, to check Magento 2 and PHP coding standing?
14
votes
4answers
27k views

How to override blocks in v2.1

I'm trying to override the Topmenu block in Magento 2.1 but can't find any guide to do so. Everything I've found on here and elsewhere either seems to apply only to version 2.0 which appears to use a ...
14
votes
4answers
10k views

Add custom product attribute to checkout summary Magento 2

I am trying to add a custom product attribute to the list of items on the summary section in the checkout in Magento 2. The template file is at Magento_Checkout/web/template/summary/item/details.html ...
14
votes
2answers
4k views

Magento 2 Show timepicker using UiComponent not Datepicker

I want to show timepicker in my UiComponent form As Magento Docs show the variations they provide timepicker : I want this using UiComponent in my form. Note : Need to show schedule time so no ...
14
votes
1answer
3k views

Magento 2 : Show product ratings for each star, average ratings and % of 5 star ratings on product page

I want to display ratings on the product page like this: How many users selected 5/4/3/2/1 star ratings The average rating, displayed as stars Percentage of users selected a 5 star rating I need ...
14
votes
2answers
2k views

How to make product grid in frontend in custom module magento 2?

I have created brand page to display details with associated product list. I want to show that product list in grid same as admin. Can it be possible to show grid in frontend same like backend ?
13
votes
3answers
4k views

Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)

I created ui grid in magento 2.1.0 and facing issue while removing filters or clear all filters from ui grid. My filtered result occupies whole grid means same row repeated in the whole grid after ...
13
votes
6answers
11k views

How to set default shipping method in case of multiple shipping methods in magento 2?

There are 2 Shipping methods and by default no one is selected, user have to manually select one, as a result it say shipping (undefined-undefined). I want that First item should be automatically ...
13
votes
3answers
6k views

Magento 2.1 image not uploading in edit form

I am working on magento 2.1 form. Image is uploaded successfully when i add new field. however when i edit any field from grid then file uploader will not shown on page. When i inspect edit page it ...
13
votes
3answers
3k views

Magento 2: Difference between Models and Data Models

I'm aware that Magento 2 introduced data models as part of the service contract architecture. Data models usually implement interfaces defined in Api/Data/ of a module. But, Magento seems to have ...
13
votes
3answers
7k views

Magento 2: Move place order button from payment to sidebar on checkout page?

I want to move the place order button from the payment to sidebar on checkout page. Anyone can give me a suggestion? Edit: Is this even possible (with the answer/approach provided)? From my ...
13
votes
1answer
1k views

Magento 2 Add Category Tree Renderer Input With Modal Button

I am trying to place the category input for my custom form using uicomponent form. I am able to create dropdown but how I can create the button and open a new modal from it? Can I create a button ...
13
votes
3answers
351 views

Improve performance on SOAP calls

I have a performance problem with Magento 2.1 In my shop, I have 90.000 products. I added these products to soap. When I did this it took round about 7 seconds for each article (product?) (Request>...
12
votes
8answers
14k views

Magento 2.1 How do I create form component field custom depends on another field value?

I have one field select which has some options. One of them will have some fields depend on value, another field will hidden. I have copied and extended component js for my field but it didn't work or ...
12
votes
1answer
9k views

Magento 2.1 Admin login issue - Someone logged into this account from another device session is terminated [duplicate]

Magento 2 admin login issue when trying to do multiple admin login from different PC or location, its automatically logout from the PC where trying to do second login with same admin user in different ...
12
votes
2answers
1k views

Why some classes define injections in both their constructor and di.xml?

I don't understand why, in some classes, their dependency injections are declared twice - once in the di.xml and in the concrete class's constructor. For instance in Magento\Backend\Model\Url, its di....

1 2 3 4 5 111