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
430 views

How to add new tab in order_view Magento 2 [closed]

I want to add new tab to order_view and customer_edit pages from my extension. Can someone explain or write example how i can do this?
4
votes
2answers
4k views

404 not found in magento2

I migrate magento2 windows system to linux system with database. Home page of magento2 is working fine but other page is give error 404 not found. If I add index.php in frontend url then it's opening ...
7
votes
1answer
973 views

Magento 2: Why Does My Custom Controller Generate an Interceptor?

I recently created a basic routing configuration for a test module <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/...
1
vote
1answer
1k views

Magento 2: Why No LoginController on `customer/account/login`

If I understand my Magento 2 routing -- the URL customer/account/login has a front name of customer. This means it's "claimed" by the Magento_Customer module. #File: app/code/Magento/Customer/etc/...
1
vote
1answer
3k views

“Setup version for module 'xxx' is not specified” [closed]

I've been trying to get up to speed on how to build Magento 2 modules using the merchant beta but when building a module I'm getting stuck at the error message in the title. From what I've understood ...
1
vote
3answers
530 views

Magento2 is stable or not?

I have new product of eCommerce, I just want to know should I use Magento 2 or not for this project? As I seen in many posts people are saying that you can go through magento 1.9 only for now.
14
votes
2answers
957 views

Magento 2: Consequences of not Naming a plugin class `\Plugin`

Are there any consequences for using a plugin class in Magento 2 that doesn't end in \Plugin? The docs suggest that this class should end in the name \Plugin. The name of a plug-in’s class or its ...
41
votes
3answers
64k views

Remove block from layout XML in Magento 2

In Magento 1 I could remove a block added by a layout file by adding this in my layout-block <remove ="block_id_here" /> How can I do the same for Magento 2? As a practical exercise, let's say ...
11
votes
3answers
16k views

Magento 2: Apply visibility and status filters on product collection

I want to apply visibility and status filter on product collection. Like in Magento 1 we do: Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection); Mage::...
1
vote
1answer
2k views

Magento 2 Get Attribute collection?

I have Custom category attribute id for ex 200. I want to get Attribute Option label from Value in magento 2 if any clue is also much appreciate.
12
votes
3answers
2k views

Is Magento 2 Stable enough to start developing new eshop? [closed]

I would like to start developing new E-Shop but my current Magento2 experience is too slow and crashy for comfortable development. I have tried both Master and Dev branches on Windows XAMPP. Found ...
1
vote
1answer
458 views

Magento2. Change template in protected $_template

The question is easy. How to change template, whose path exists only in protected property $_template
24
votes
7answers
51k views

Magento 2: Call a static block using xml

How i include a static block in a page using xml. For example i created a static block with identifier promo. In magento 1 we include a static block using below code <block type="cms/block" ...
13
votes
4answers
30k views

Magento 2 get current category Id using registry

Any one know how I can get the category id using current category registry in Magento 2?
1
vote
1answer
1k views

Magento 2 Frontend Controller that does not register customer URL

In Magento 2 I am attempting to setup a controller I can retrieve after page load via Ajax that does not register as a URL in the admin panel for "Customers>Now Online" I have a route.xml setup as &...
0
votes
2answers
1k views

Magento 2: How to include my jquery lib in admin

How can i include my jQuery lib files in magento 2. Updated <block class="Magento\Customer\Block\Account\AuthenticationPopup" name="authentication-popup" as="authentication-popup" ...
0
votes
2answers
1k views

Magento2: Errors installing Sample Data: Class “\Magento\SampleData\Model” not found / no commands defined in “sampledata” namespace

I am trying to install Magento2 version 1.0.0-beta. I followed instructions about installing sample data from: http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data.html I enabled ...
1
vote
2answers
1k views

Magento2 backend routes

I'm currently writing a Magento 2 extension to add Product attachments. In my extension I add an extra tab on the admin product page called 'Downloads'. In this tab several upload inputs are shown ...
7
votes
1answer
3k views

How do you control ordering of upgrade/setup scripts in Magento 2?

I've been exploring the code base for Magento 2 and I've been trying to figure how you can control the order in which upgrade setup classes would run between setup versions. Yet, i'm stuck. As far as ...
8
votes
3answers
7k views

Add More Mass action in Order grid in magento2

I want to create delete order functionality in magento2, but i am not able to add mass action in order grid. please help me how to create delete order functionality in magento2. Please help me if any ...
9
votes
3answers
10k views

Creating custom module in magento2 show fatal error

I working on creating custom module in magento 2, but it's not working. Could you please suggest me where i went wrong?. My module code: app/etc/config.php: 'modules' => array ( '...
2
votes
3answers
12k views

How to call a model method from controller in Magento2

I have a model with namespace Demo\HelloWorld\Model\Customer and model have a function demo() print "Hello World !". How to call function demo() from Controller with namespace Demo\HelloWorld\...
1
vote
1answer
2k views

Magento 2 cached image error, Warning: getimagesize()

I recently pulled the latest version of Magento 2 and now all my product & catgeory pages display a version of the following error, which basically says that the image cannot be found to get the ...
44
votes
5answers
67k views

How to get value from `core_config_data` table in Magento 2

Magento 1.x use Mage::getStoreConfig('sections/groups/fields') get data on core_config_data table. How to Magento2 get value from core_config_data table ?
-2
votes
1answer
1k views

How do add mycss.less in head magento2

I added to app\design\frontend\magento\new\Magento_Theme\layout: <page> < head> < css src = " css / mycss.css " / > < / head> </page> but when I edit the file mycss....
9
votes
3answers
1k views

Magento2: Connect to an external non Magento DB

Sometimes I need to connect to different databases, Mysql / Oracle etc. What is the best practice to do it in Magento2
2
votes
3answers
1k views

How to configure a new Instance for an existing Database

I'm having a bit of trouble trying to get Magento to play nice inside a Docker container. Here's my situation: I'm using Magento2 (1.0.0-beta) I've already provisioned a MySQL database with Magento's ...
2
votes
3answers
1k views

Will Magento 2 be included in next year Magento developers' certification?

I'm going to take the test next year (2016) and I know that Magento 2 is going to be released. Is there any information about next year's quiz? Will there have Magento 2? And where can i find quizzes (...
5
votes
1answer
998 views

Magento 2 Schema post-updates

After adding a new module to Magento2 I need to enable it using bin/magento module:enable Module_Name then, I need to run the install scripts from the module using bin/magento setup:upgrade ...
3
votes
1answer
5k views

Inserting options to a Multi-Select product attribute in Magento 2 Programatically

I have figured out how to create an InstallData.php script for adding a custom multiselect product attribute as part of a custom module in Magento 2, but I'm not finding any examples of how I could ...
13
votes
1answer
5k views

Magento 2 uninstall module

Apparently, now Magento 2 supports uninstall scripts that allow db schema modification when uninstalling a module (horay!!). As explained in here this only works for module installed via composer. (I ...
3
votes
3answers
858 views

Error while installing the sample data in Magento 2: “Class Magento\Sales\Model\Service\OrderFactory does not exist”

While installing the sample data for Magento 2, I encounter this error. [Magento\Setup\SampleDataException] Error during sample data installation: Class Magento\Sales\Model\Service\OrderFactory ...
19
votes
2answers
4k views

Magento 2: How to Check if a Module's Installed

In Magento 2, is it possible to check if a module's installed at runtime? In Magento 1 I'd either use the isModuleEnabled helper method, or manually fetch the global configuration tree and check the ...
15
votes
3answers
10k views

Copy custom data from quote to order and order item once order is placed in magento2

I am building a custom module in magento 2 that have a custom discount. I am trying to copy the discount from quote, quote item to order and order item. In magento 1, I declare in config.xml like this:...
6
votes
2answers
6k views

Magento2 adding 3rd party jQuery files to module

I am trying to add in some 3rd party jQuery code to my Magento2 module. I want to have my own custom js file that will use the 3rd party code. Before I was adding the code into the header instead of ...
37
votes
2answers
11k views

Magento 2 - Object manager tries to instantiate Abstract class. ( Fatal error )

Playing around with Magento 2 but run into a problem I can not wrap my head around. The object manager tries to instantiate Abstract class, this gives an Fatal Error. Does someone know what might ...
12
votes
6answers
12k views

How to show session messages at front end in magento 2 beta

I want to show an error or success message in my magento 2 module. I have extended my front-end controller with the class name \Magento\Framework\App\Action\Action. Then I redirect client to home page ...
11
votes
4answers
19k views

how to implement Loader widget in magento2

I want to implement loader widget in magento 2, In my form i have placed one button <div style="display:inline; float:right; width:100%; margin-bottom:5px;"> <button style="" class="...
4
votes
1answer
208 views

Magento2: module dependence

Magento 2.0 has several optional extensions (they are not necessarily to be installed). How can I safely announce the class dependency for these extensions in my __constract method? Please note that ...
7
votes
3answers
7k views

How to extend backend template files in Magento 2

I could not find how to extend backend template files in Magento 2, however i have found how to extend frontend template files from here. If I extend the file at design/adminhtml/Magento/backend it ...
2
votes
1answer
12k views

Magento 2 - How to insert template block into page_top

This question is specific to Magento 2. I am attempting to inject additional stylesheets, Javascript and a template block into every page in a Magento 2 store. I have a functioning module which I ...
2
votes
1answer
4k views

how to log objects & arrays in magento2

magento2 uses monolog for logging.i'm able to log strings.but i'm not able to log objects and arrays.can you give anyone syntax for this.i'm getting following error. Object of class 'some class' ...
2
votes
1answer
1k views

Magento2 to_html_after event was remove?

How can I get intercept html output in magento2? For example, for magento 1.x i can do: ///core_block_abstract_to_html_after $block = $observer->getBlock(); if($block->getNameInLayout() == '...
2
votes
2answers
146 views

simple factory (not autogenerated) in magento2

I need to create different models by condition. if($fullActionName == 'catalog_product_view'){ //get first custom model, } elseif($fullActionName == 'catalog_category_view'){ //get second ...
2
votes
1answer
3k views

transform the header links block to a drop-down in magento2

I'm learning magento 2 from the link. In this article i'm unable to identify layout and template files even after reading locate template. Please help me on how to identify layout and template in the ...
62
votes
10answers
49k views

How to create custom Log file in Magento 2?

In Magento 1, it was common to segment logs into different files (to separate logs for payment methods, etc.). That's as easy as changing the $file parameter of Mage::log. Magento 2 has changed to ...
1
vote
0answers
2k views

How to get completed sales with rest API in magento 2?

Github issue: https://github.com/magento/magento2/issues/1578 It works for processing status, however I get an error for completed or closed curl -X GET -H "Authorization: Bearer ...
5
votes
1answer
4k views

How to get sales with rest API in magento 2?

I have tried the following, but I get Consumer is not authorized to access %resources" error. Is there something I'm missing? Can you suggest another way to retrieve sales? curl -X POST "http://...
1
vote
1answer
118 views

PHP Build from source .configure for Magento 1 and 2

I am working on a VPS machine and I want to build PHP 5.5 from source. I am kinda having an OCD of what are the PHP extensions are needed to include so that my .configure so that I will able to run ...
-2
votes
1answer
873 views

Magento2 Database Basic PDO Details

Regarding the upcoming Magento version 2 I'm asking myself, if: Will it make use of PDO? And if so, will it make use of PDO emulated prepares[1] ? I'm also asking myself about similar PDO related ...