Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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.

Filter by
Sorted by
Tagged with
1
vote
1answer
543 views

Use jQuery Plugins in Magento 2 blocks

I'm trying to use jQuery camera inside a page block, but I'm doing something wrong. I added the camera.min.js into my custom theme folder Theme_folder/Magento_Theme/web/js/camera.min.js Here's my ...
1
vote
1answer
363 views

Magento 2 setting wrong file permissions?

I'm adding products to my development website and I've noticed that images are not showing on the front end. After inspecting these, I can see that the chown user and group is correct but the file ...
4
votes
2answers
4k views

Magento 2: Add a mass action block item for a UI Component grid

I am trying to add a mass action item to the product grid mass action block using an observer. Here is what I am doing but it does not seem to be working, I feel like I am missing something app/code/...
2
votes
3answers
1k views

Magento 2 Web API pre/post dispatch events (REST/SOAP)

Is there any pre/post dispatch events for the Magento 2 web API (REST/SOAP) ?
33
votes
16answers
124k views

Magento 2 CSS and JavaScript not loading from correct folder

I am hoping that someone on here can help. I am attempting to install and run Magento 2 on WAMP on a Windows 7 machine with little success. After jumping through the many and various hoops to get ...
3
votes
1answer
8k views

How to add product to cart in Magento 2

I want to add a product with a bunch of options in the current cart via controller. How should I do this? And then what do I need to do if I want to remove it later on?
8
votes
3answers
12k views

How do I run php custom script on magento2

I wanted to add custom php script to magento2 root folder and run from the browser.I tried to add it in magento2 root folder but it redirects to 404 page. I also tried to add it in pub folder but no ...
26
votes
2answers
43k views

How to use jquery library in Magento 2?

I am creating a Magento theme where I need to include jQuery. When I add this <link src="js/jquery-1.7.1.js"/> in head. It is working but Magento javascript functions are not working. How to ...
2
votes
2answers
5k views

Magento2 get variants of configurable products

I'm new to Magento2 and finding it difficult to get information. I'm trying to read simple (variants) products of a configurable product on the view page. I created my custom block that extends ...
12
votes
4answers
19k views

Magento2 - Custom Controller throws error

I created a module shown in this post. But my own controller doesn't work. I've got this error message: Recoverable Error: Argument 1 passed to MP\MyModule\Controller\Index\CheckUserName::...
0
votes
3answers
1k views

magento2 loading upsell products

I'm trying to display upsell products on the view page. For that, I created my own custom block for the template with following code: <?php namespace YS\India\Block; use Magento\Framework\App\...
5
votes
2answers
3k views

Magento2: Where in admin product review can be managed

In Magento2.0 admin side, where we can manage the product reviews. I got some spam reviews which I want to delete them but cant able to find a place at admin side to manage the reviews.
4
votes
2answers
1k views

Magento2: Unable to save Catalog Config

Got the below error while updating the catalog configuration. Something went wrong while saving this configuration: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbname.url_rewrite' ...
2
votes
2answers
436 views

Magento2 Migration Redirects to the old Server

I moved my magento2 installation to a new server with a new ip adress. I used this documentation for my backups (http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-backup.html) ...
2
votes
1answer
2k views

If I override a template in core Magento 2, could it be removed when upgrading to future versions of Magento 2?

For my personal shoping website I am trying to override some of the XML and PHTML files of default luma theme. I am just eding the vendor/theme-frontend-luma folder directly. Just want to know when ...
3
votes
1answer
9k views

Magento 2: How can I add External URL in top menu [duplicate]

Is there a way to create a custom menu item in the magento 2 Top menu which links to an external URL. Static page only category doesnt suit my need because I just want to redirect the user to a ...
10
votes
2answers
13k views

Magento 2 : Show captcha at contact us form

I use the below code in a CMS block to show the default magento contact us form. <p>{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::...
3
votes
1answer
82 views

Why does the core not configure preferences for many of the interfaces?

There are many interfaces in the Magento 2 core that not configured as di.xml preferences. Examples are \Magento\Checkout\Model\Cart\CartInterface \Magento\Catalog\Model\Layer\...
0
votes
3answers
5k views

Magento2: Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity

I added one custom HelloWorld module in a fresh Magento 2 installation and I got the following error: Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 8 ...
5
votes
2answers
15k views

Magento Component Manager: SSL certificate problem: unable to get local issuer certificate

In Magento Component Manager, I am trying to Sign in to sync your Magento Marketplace purchases: I get the following error: SSL certificate problem: unable to get local issuer certificate What's ...
11
votes
1answer
868 views

Magento2 Custom Layered Navigation

I want to add a layered navigation block for a custom product collection. Is there a way to do that in Magento2 ?
0
votes
1answer
203 views

Missing title in Component Manager when enabling extension

I have successfully developed a Magento2 extension (yay!) and managed to install it via composer (double-yay!). Now I'm trying to enable it. I am doing this via the Component Manager, selecting "...
1
vote
3answers
10k views

how we can show all categories in magento2 on home page

we have used this link and install module step by steps http://www.ibnab.com/en/blog/magento-2/magento-2-frontend-how-to-call-category-collection-on-home-page My module is installed and showing up ...
3
votes
2answers
3k views

How to add custom field or attribute to customer's address and API and save it in magento2?

I have created my custom field and attribute, using following code and it is reflected in db. $attributesInfo = [ 'state' => [ 'label' => 'State', '...
2
votes
2answers
2k views

Enabling Magento2 Database Profiler

How to enable Magento2's database profiler ?
2
votes
1answer
8k views

Magento2 programmatically adding a custom option

I'm trying to programmatically add a custom option to a product, there are no errors being returned, but the custom option doesn't get added. I've tried a few methods to achieve this, without much ...
3
votes
2answers
13k views

What is the easy way to edit the maintenance / error 503 page?

I'd like to modify the generic blank page with a custom template Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or ...
3
votes
3answers
5k views

How I can migrate Magento 1.9.2 modules to Magento 2?

Is there any helpful links or guide to migrating Magento 1.9.2 modules/extensions to the new version (i.e. 2.x)? Any automated solution or instructions set would be helpful. Would be helpful to make ...
4
votes
1answer
4k views

Magento 2: How to add a browse button to upload file in admin section?

Working on Magento 2 custom module implementation and want to add a browse button to upload a file in admin form. I have gone through the Magento2 : Admin module Image upload code to display form ...
11
votes
3answers
8k views

Magento2 file download action

Is there a magento utility method available which can help me to create a force content download action ?
1
vote
1answer
610 views

How to get admin Detail in magento2

In magento 1 We are using admin session like this $user = Mage::getSingleton('admin/session'); $userId = $user->getUser()->getUserId(); $userEmail = $user->getUser()->getEmail(); $...
0
votes
1answer
302 views

Magento 2 Migration: Volume Check Failed, Caused by Theme

I'm migrating my data from Magento 1.9.2.0 to Magento 2.0.0 on a VPS running CentOS 6.7. Everything is going just fine so far and any errors I've received I have been able to resolve. I'm stuck on ...
0
votes
1answer
511 views

Unrecognized method 'isLoaded()' in Magento 2

I'm trying to join product and my custom table but it's returning error Unrecognized method 'isLoaded()' my code is: /** * @param \Magento\Backend\Block\Template\Context $context * @param \...
4
votes
2answers
7k views

Modify the default admin logo in Magento 2 (login portal and backend menu)

I would like to change both the logo in the login admin portal and the Magento icon at the top left of the admin menu. What is the easiest way to do that, according images I want to upload are PNG ...
5
votes
0answers
215 views

Magento 2 Widget Only displays image

I'm trying to add a standard widget from within WYSIWYG Editor, but it does not work, because only the image is shown. In the editor <p>{{widget type="Magento\Cms\Block\Widget\Page\Link" ...
33
votes
15answers
52k views

Magento 2: Safe and easiest way to disable Compare products & Wishlist Module

I am building Magento 2.0 only to sell 2 of my products online. The compare products and wishlist module is irrelevant for me. How I safely and easily remove those modules? I dont want to hack the ...
0
votes
1answer
88 views

M2 Frontend goes blank after choosing any theme

I have imported a M1 installation into M2. Changing the theme under Stores > Configuration > General > Design from the default setting -- No Theme -- to ANYTHING breaks the frontend ...
0
votes
5answers
3k views

compile less files with grunt don t work!errors with EXEC command

After creating my theme I'm trying to compile less files. but I'm having errors when : grunt exec:exercise1. I'm using a windows machine.
3
votes
3answers
3k views

Magento2: 3columns Layout only renders 2columns-right

I have the following layout in Magento2: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="../../../../../../....
2
votes
2answers
3k views

How to enable Store Pickup as a shipping method in Magento2?

Is it already possible via the configuration or do we have to implement the code from this commit? https://github.com/amenk/magento2/commit/80a2fa4cdce7d968a995f8f64cae9de73891713a
0
votes
1answer
425 views

Why is an attribute option “missing”?

When creating a new dropdown attribute: Magento claims that the attribute option is missing. But what's missing?
0
votes
2answers
408 views

Bugs after Magento 2 Installation

I've noticed a couple of bugs with my Magento 2 installation. When loading the home page or admin of my website, it seems to keep refreshing itself for a while and takes up to a minute to load. It ...
3
votes
1answer
962 views

Magento 2.0 - Difference between migrated product and normal product

I migrated the products data from Magento 1.9 to 2.0. Just noticed there is a difference in the way how products are created. See the images below. Edit page of a migrated product Edit page of a ...
23
votes
11answers
15k views

How to get Magento version in Magento2 ? (Equivalent of Mage::getVersion())

How do I get the Magento version in Magento2.x (e.g. 2.0.0) ? In Magento1.x, I could do it with Mage::getVersion() So what's the equivalent in Magento2.x ?
2
votes
3answers
620 views

Fresh install has no styles

I have just made a fresh magento 2.0 install. However, all styles and images seems to me missing. Can I fix this without reinstalling? Demo: http://tiny.cc/80t27x Thanks!
1
vote
1answer
843 views

Magento 2 Argument of preference constructor is also a preference, error

I'm overriding class Magento\Customer\Model\CustomerRegistry with my own preference. Then I create a preference for Magento\Customer\Api\CustomerRepositoryInterface, which has an argument in the ...
3
votes
2answers
2k views

M2: Sending data by clicking Next on checkout

I had some customization on Shipping page of checkout on Magento2, now I want to send out some data back to my module by the user hitting "Next" button and add to the current cart, so in which way ...
2
votes
4answers
963 views

Magento 2: Create HTTP Paths to Frontend Assets via PHP Code

In Magento 2, is it possible to generate an HTTP path to a module's front-end asset files (CSS, Javascript) using PHP? i.e. I know it's possible to add code like the following to a layout handle XML ...
1
vote
1answer
53 views

Dependencies not injected propperly on Magento2?

I am running my code on dev mode without compiling the code using di:compile and it works well. However when I turn it in production mode and compile it running di:compile then it breaks. I wonder ...
12
votes
3answers
4k views

Injecting Dependencies into a Magento 2 CRUD/Abstract Model

Is it possible to inject a dependency into a Magento 2 CRUD model? That is -- Magento 2 has a base abstract model class: Magento\Framework\Model\AbstractModel. If you want to create a simple Create, ...