Skip to main content

Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

Filter by
Sorted by
Tagged with
54 votes
2 answers
31k 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 ...
igloczek's user avatar
  • 1,252
39 votes
24 answers
115k 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: 1. "Refused to apply style from 'https://www.ornativa.com/pub/static/version1502029409/...
Nabarun006's user avatar
33 votes
1 answer
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 ...
santhoshnsscoe's user avatar
32 votes
2 answers
5k 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?
Patrick van Bergen's user avatar
31 votes
6 answers
67k 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 ...
André Ferraz's user avatar
31 votes
7 answers
44k 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 ...
Siarhey Uchukhlebau's user avatar
28 votes
10 answers
12k 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 ...
Lalit Kaushik's user avatar
28 votes
1 answer
5k 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 ...
Raphael at Digital Pianism's user avatar
27 votes
11 answers
49k views

Magento2 Error: "Something went wrong with processing the default view and we have restored the filter to its original state" showing on the loop

Whenever I open the Catalog Product it gives the following error on loop and continue loading the loader Attention Something went wrong. Something went wrong with processing the default view ...
Rahul Singh's user avatar
  • 1,650
26 votes
7 answers
60k 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 ...
Vishwas Bhatnagar's user avatar
25 votes
1 answer
23k 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 ...
Mohammad Mujassam's user avatar
24 votes
2 answers
57k 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) ...
Dhaval's user avatar
  • 1,695
24 votes
2 answers
29k 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="...
hallleron's user avatar
  • 365
24 votes
2 answers
8k 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 ...
Raphael at Digital Pianism's user avatar
23 votes
11 answers
123k 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.
Yogesh Trivedi's user avatar
23 votes
2 answers
38k 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
frostshoxx's user avatar
22 votes
10 answers
32k 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/...
Dhaval's user avatar
  • 1,695
22 votes
3 answers
62k 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 ...
Rajkumar .E's user avatar
  • 3,570
20 votes
1 answer
39k 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 ...
Vishwas Bhatnagar's user avatar
20 votes
4 answers
15k 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 ...
TUYEN TRAN THANH's user avatar
19 votes
7 answers
74k views

Magento2 - Get category URL by ID

I'm trying to get the URL key of any given category with the ID. I have this; $categoryId = 3; $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $object_manager = $_objectManager-...
Asitis's user avatar
  • 1,247
19 votes
5 answers
40k 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 ...
seb's user avatar
  • 3,572
19 votes
2 answers
20k 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 ...
Nicolas PERNOT's user avatar
18 votes
2 answers
10k 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 ...
steros's user avatar
  • 1,622
18 votes
4 answers
12k 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(...
Blackpanther0001's user avatar
17 votes
4 answers
7k 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 ...
Jamess Moriarty's user avatar
17 votes
1 answer
6k views

What's the Role of CACHE_ID and CACHE_TAG in Magento 2?

In Model Classes, I have seen this constant, CACHE_ID and CACHE_TAG, I know it is used to store data in the cache. But how does it actually work. What should be considered while caching and flushing ...
Pankaj Bhope's user avatar
  • 1,546
17 votes
1 answer
9k 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 "...
samreg's user avatar
  • 431
17 votes
4 answers
17k 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="" /&...
Steve B's user avatar
  • 681
17 votes
5 answers
2k 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 ...
fmrng's user avatar
  • 3,398
16 votes
6 answers
19k views

Call to a member function setActive() on boolean

I encountered the following issue when i was trying to install a module. When I try to access the admin panel on my magento I get: Call to a member function setActive() on boolean in C:\xampp\...
Sotiris Oik's user avatar
16 votes
4 answers
22k 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 ...
sudopratt's user avatar
  • 331
16 votes
1 answer
2k 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 ...
Verdu's user avatar
  • 1,730
16 votes
1 answer
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\...
Yau Thomas's user avatar
16 votes
5 answers
3k 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 ...
Claudiu Creanga's user avatar
15 votes
4 answers
7k 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 ...
rajneesh gupta's user avatar
15 votes
4 answers
44k views

How to show success message in session Magento2

In magento 1 i can do it like this $session = Mage::getSingleton('core/session'); $session->addSuccess($this->__('Your Request has been received. One of our sales representatives ...
Naveenbos's user avatar
  • 1,226
15 votes
7 answers
24k 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 ...
Devtype's user avatar
  • 3,008
15 votes
4 answers
10k 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?
Rama Chandran M's user avatar
15 votes
5 answers
8k 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 ...
Gagan's user avatar
  • 1,478
15 votes
3 answers
11k 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/...
Ramesh's user avatar
  • 986
15 votes
3 answers
5k 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 ...
om_deshpande's user avatar
15 votes
2 answers
11k 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 ...
Ruud van Engelenhoven's user avatar
15 votes
1 answer
529 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 ...
shivashankar m's user avatar
14 votes
8 answers
25k 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 ...
mrtuvn's user avatar
  • 3,283
14 votes
6 answers
27k 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 ...
Arun Karnawat's user avatar
14 votes
1 answer
11k 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 ...
Yogesh Trivedi's user avatar
14 votes
4 answers
15k views

Magento 2 : How to get Custom module's 'web' directory path/Get custom module image directory path

I have created a custom module in which I want to check if a (image)file exists in my view/frontend/web/images folder. I have checked this answer but in only shows how to get Magento's directory ...
John's user avatar
  • 863
14 votes
2 answers
15k views

Magento 2 get all product attributes without product id

I want to retrieve all product attributes those are available, then convert it to name & value for my select options field. In Magento 1 I can achieve it like this: public function ...
simple guy's user avatar
  • 2,484
14 votes
4 answers
29k views

Which observer to use after success order on Magento 2?

I am working on this Magento 2 extension and part of the features is to push information about the orders to an external application using web services. I need to push this information after an order ...
Eduardo's user avatar
  • 691

1
2 3 4 5
114