Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 12503

Issues relating to the developer beta release of Magento 2.0.0. This formally is the the period from Dec 18th 2014 to around the end of Q1 2015.

70 votes
Accepted

Magento 2: Call a static block using xml

<block class="Magento\Cms\Block\Block" name="Promo"> <arguments> <argument name="block_id" xsi:type="string">promo</argument> </arguments> </block> This is equivalent to M1.
Aman Srivastava's user avatar
10 votes
Accepted

Ajax loader image is not displaying in ajax call in Magento2

You need set showLoader: true to show loader for context element (default: body). Example: require([ 'jquery', 'mage/template', 'jquery/ui', 'mage/translate' ], function($) { $.aj …
KAndy's user avatar
  • 20.9k
3 votes
Accepted

How to move js file dynamically to pub/static folder in Magento2

First, please ensure that you module properly installed. If you work in developer mode, files materialized by request, so no needs in any command. bin/magento setup:static-content:deploy need only fo …
KAndy's user avatar
  • 20.9k
17 votes
Accepted

Magento 2 Ajax request fails

Magento is using secure key validation in admin aria. Simplest way to use secure key is use POST and add form_key to data. Example: jQuery.ajax( { url: 'http://mage.dev/admin/vendor/module/valid …
KAndy's user avatar
  • 20.9k
4 votes

How to set template in custom block in Magento2?

Use $this->addChild function to add child block. Ex: $this->addChild( 'back_button', 'Magento\Backend\Block\Widget\Button', ['label' => __('Back'), 'template' => 'Vendor_ …
Amit Bera's user avatar
  • 77.7k
6 votes

How to create Admin Grid in Magento2?

First you need create page for grid. See magento2 new page example Then add ui component in layout for this page view/adminhtml/layout/samplegrid_index_index.xml <?xml version="1.0"?> <page xmlns:xs …
KAndy's user avatar
  • 20.9k
3 votes

Magenot2: what is the use of `resource` paramerter in menu.xml

Resource attribute define acl resource for menu element. If user has not access to this resource then the menu item will be not shown for him.
KAndy's user avatar
  • 20.9k
1 vote
Accepted

core class in magento2

\Magento\Framework\App\ResourceConnection is analog for 'core/resource' alias. Pay attention on: M2 don't have separation on read/write connection, so use $resource->getConnection('default'); M2 do …
KAndy's user avatar
  • 20.9k
1 vote

File .sql sample-data in magento 2 in folder?

Magento 2 do not use sample data in sql format. Please use sample data module.
KAndy's user avatar
  • 20.9k
0 votes

Magento2 multicreate customer API

You have 2 option. Send many request Create service that gets list of customers and save it use Customer Repository
KAndy's user avatar
  • 20.9k
3 votes

How do create Setup/InstallSchema.php in magento2?

In Magento 2 setup/update scripts do not run automatic. Please read documentation, how to enable/setup module Also you may need modify/delete record in setup_module table in case if you need to rerun …
KAndy's user avatar
  • 20.9k
3 votes
Accepted

Magento2: how can we use xsd file in magento2

XSD files used to validate configuration in XML formats. See details in official Magento2 documentation In Magento 1.x this functionality is not available
KAndy's user avatar
  • 20.9k
3 votes

How do create DB collection in view?

First add method getCollection() to Block Class <?php namespace Xanka\Slider\Block\Adminhtml\SlideshowData; use \Magento\Backend\Block\Widget\Container; class Index extends \Magento\Backend\Block\Wi …
KAndy's user avatar
  • 20.9k
2 votes

How do getName of Table A in table B where table A(id)= table B(id)

In Magento 2 template has access only to public interface of block. So code $this->_objectManager will not work. Also $this in templates it is template engine, not the block. For access to the bloc …
KAndy's user avatar
  • 20.9k
4 votes

How do auto add datetime in InstallSchema magento2?

You need add "default" option with value \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT ->addColumn( 'created_at', \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, [ 'n …
KAndy's user avatar
  • 20.9k

15 30 50 per page