Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
3answers
3k views

How does theme inheritance work in Magento 2 / How to modify Luma

As I understood it, in a derived theme I should overwrite web/css/source/_theme.less to add my one styles / variables. When I extend Magento/blank it works fine. But when I extend Magento/luma and ...
4
votes
1answer
816 views

When is the theme_id generated?

I discovered, that Magento2 (1.0.0-beta2) is not storing the theme name (like Example_default) but an id in the system configuration: $ n98-magerun2.phar config:get "*theme*" +------------------------...
4
votes
1answer
5k views

How to add export functionality in Magento 2 new grid system

In Magento 1 I could add export functionality to any admin grid I create by adding this $this->addExportType('*/*/exportCsv', Mage::helper('helper_alias')->__('CSV')); $this->addExportType('...
1
vote
1answer
765 views

How to configure Profiler in Magento 2?

I'm having trouble to configure the profiler in Magento 2 (version 1.0.0-beta). I want to apply a specific configuration, I want to set a timer threshold to 0 because the default settings prevent from ...
23
votes
6answers
28k views

Magento2 Setup version for module is not specified

I installed a local copy of Magento 2. I am facing some problem with custom module. I followed following file/folder structure app/code/Ps/HelloWorld/etc/module.xml: <config xmlns:xsi="http://...
5
votes
1answer
279 views

Magento 2: What are the “top level tags” in a Module Layout Handle XML File Called?

In Magento 2, layout handle XML files introduced a few new top level tags (body, head, etc) <page> <body> <!-- ... --> </body> <head> <!--...
6
votes
1answer
13k views

How can I compile less file in magento2 [duplicate]

I install magento2 in my system and its work properly but when i changed in less files then it's not affect in frontend. then how can i compile less files in magento2 for get css effect in frontend.
6
votes
1answer
1k views

Magento 2: Programmatically Adding Items to a Container

In Magento 1, if you wanted to programmatically add a new block to the text/list content block, you could do something like this $block = $this->getLayout()->getBlock('content'); $block->...
12
votes
1answer
604 views

Create VCL for Magento 2

In the official documentation it says Varnish is supported out of the box and there should be an option to generate a VCL file compatible with Varnish 3 and Varnish 4. I can't find this using the ...
7
votes
1answer
1k views

Magento 2 Custom No Route Handler

I have added a custom no route handler using the following code <?xml version="0.1"?> <config> <type name="Magento\Framework\App\Router\NoRouteHandlerList"> <...
9
votes
1answer
474 views

Magento 2: Creating Data Objects with Immutable State?

Dovetailing off a comment in another Magento 2 If you need to share some calculated value, put the calculation behavior to separate object and call it from blocks that require that value. Registry ...
3
votes
2answers
4k views

Apply css change on M2

Magento 2 use less/php lib to compile less to css first run time i created my style named style.less in theme directory(web/css). Magento 2 compiled my file to pub/static/frontend/VendorName/ThemeName/...
12
votes
2answers
5k views

Magento 2: Passing Variables from Controller Action to “View”

In Magento 1, if you want to pass data from your Controller action to the "View" (i.e. a block in your layout, you can) Add a value/object to the global registry via Mage::register Directly fetch a ...
3
votes
2answers
8k views

Magento 2 - Adding calendar to custom frontend form

I'm trying to add the calendar in magento2 to custom front-end form. jquery-ui.js and jquery-ui-timepicker-addon.js are also added in header & this is the code that I think should work to call the ...
1
vote
2answers
8k views

Media url from cms page of M2

I magento 1x i can put url of images like {{media }} or {{skin }}. I have take a look in frontend dev docs but not mention about this. Can anyone tell me how to put images url in cms page many thanks
25
votes
6answers
16k views

Clear Theme/CSS Cache in Magento 2

When I am theming a Magento 2 store, what is the suggested way to clean the caches? I edit the .less files and then I currently do rm -rf pub/static/frontend/* var/view_preprocessed/ var/*cache/* ...
0
votes
2answers
9k views

Magento 2: How to add grid to the tab in customer_index_edit

I am trying to display a grid for my module on an extra tab added on the customer_index_edit. I managed to add custom tab, and i am trying to add layout, like in Magento_Wishlist, but it`s ...
4
votes
1answer
2k views

How Magento 2 Routing Works

I need to know how magento 2 Routing Works... I want to know that when we request for any task in magento 2 then how its process to controller... Like I used command line console...' Then how my ...
6
votes
1answer
2k views

Magento 2: How to Read From Configuration Tree

What's "the right" way to read from a merged module XML configuration tree in Magento 2. For example, in Magento 2, many modules have a pdf.xml configuration file ./Bundle/etc/pdf.xml ./Downloadable/...
1
vote
1answer
392 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?
3
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
850 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
516 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
841 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 ...
35
votes
3answers
42k views

Remove block from layout 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 ...
10
votes
2answers
11k 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
300 views

Magento2. Change template in protected $_template

The question is easy. How to change template, whose path exists only in protected property $_template
14
votes
5answers
33k 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" ...
11
votes
5answers
20k 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
899 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 ...
7
votes
3answers
5k 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
8k 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 ...
33
votes
4answers
41k 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
999 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
823 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
868 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
4k 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
4k 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 ...