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
3
votes
2answers
1k views

What are the Magento2 code formating settings for PHPStorm?

When editing Magento2 .phtml files, it would be nice to use the code formating function of PhpStorm, but without changing the original layout (just format added stuff). So did anybody already set up ...
2
votes
1answer
1k views

How is Magento 2 RouterList Populated?

How does Magento2 populate its $routerList in : public function dispatch(RequestInterface $request) { \Magento\Framework\Profiler::start('routers_match'); $routingCycleCounter = 0; $...
29
votes
2answers
40k views

Magento2 : How to database schema upgrade

I am working on magento custom module, in module have Setup\InstallSchema.php file which is installed before. i have added some more database fields in InstallSchema.php so i want to update table ...
4
votes
1answer
797 views

How to composer-require Magento2 develop branch?

I am currently installing the Magento 2 modules via a "require": { "magento/product-community-edition": "*" }, "repositories": [ { "type": "composer", "url": "http://packages....
1
vote
1answer
66 views

How to Overwrite magento2 Controller [duplicate]

In magento2 how can we Overwrite Controller ? Any help will be appreciated Thank you
4
votes
2answers
129 views

Marshalling in Magento2

According to Magento2 Doc By default, when you install a package, Composer puts it into vendor/<package> directory, such as vendor/magento-module-catalog. However, the Magento framework requires ...
4
votes
4answers
8k views

How to call category collection on home page in magento 2?

I want to show all the category on the left sidebar on home page. Please let me know how to get all the categories by collection, or there is another way to call all the category. please let me know
9
votes
2answers
33k views

How to load custom module js file in magento 2?

I have created banner slider module for magento 2. I have called JS file using following ways and its working fine. In block class I created following function public function getBaseJs($fileName){ ...
6
votes
1answer
5k views

How to return Associative Array from API in Magento 2

I have created Custom Api which returns associativeArray. If I use associativeArray it's giving error If I use string[] it's working But I want to return associativeArray. Error: Class "array" ...
0
votes
1answer
733 views

Magento is creating duplicate invoice ids for the orders

When I checkout with paypal Express checkout , it shows error of duplicate invoice id. This is why we can not place order. Please help me.
2
votes
2answers
859 views

How to include the module name in magento2

Is anyone knows how to load the model in magento2? What we need to do in magento2 to translate the below line in Magento2 $order = $observer->getEvent()->getOrder(); $orders = Mage::...
28
votes
6answers
7k views

Magento 2 - Uninstallable set of packages when deploying magento-sample-data

I've followed this Magento DevDocs tutorial to install sample data after installing Magento 2. But after executing the last command ./bin/magento sampledata:deploy I get the following error: ./...
1
vote
1answer
3k views

How to import customers in magento-2 using csv?

Currently i am working on magento-2 .I have imported products successfully. Now i want to be import customers . I dont have any demo csv for import customers .
0
votes
1answer
72 views

How do import sample-data before setup new site magento2? [duplicate]

i tried setup magento2-1.0.0-beta branch Develop but get error relate to installing data. So i want import sample-data before setup new site magento2. How do it ?
1
vote
1answer
63 views

Will updating Magento mean starting again with theme customisation?

For the last week I have been editing a theme ready to launch my first e-commerce website. At first, Magento seemed to confuse the idea of creating a website, but as I'm learning I can see / ...
1
vote
1answer
2k views

How do get layout in magento2?

how do get layout in magento 2 in custom module same Edit this code <?php namespace Addon\Gallery\Block\Adminhtml\Gallery\Gallery; use \Magento\Backend\Block\Widget\Container; class Edit ...
16
votes
2answers
32k views

How to call a PHTML file within a CMS page Magento 2?

Magento 2 I have installed sample Bannerslider module downloaded from Magestore. When I call bannerslider.phtml into CMS Home Page, it's showing unreliable error on home page. {{block class="...
5
votes
2answers
8k views

how to get magento2 wsdl XML structure

In magento1 for any request API, WSDL XML structure can be obtained by giving URL http://192.168.0.183/magento1131/api/v2_soap/?wsdl=1 in SOAPUI, storm or any other wsdl xml request processor. For ...
0
votes
1answer
3k views

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

I want to know the file sample-data.sql in magento 2 located in the folder? thank you.
3
votes
4answers
2k views

Send email after placing an order in magento2

I want to send an email to customer after placing an order in Magento 2. Please send/tell me how to extend the functionality in Magento 2 Edit: I have created my new module Roshan_Checkout inside ...
1
vote
2answers
2k views

product attribute front end html not rendering properly

I created front end model for custom product attribute.but in the front end output coming like this <b>pencilval</b> instead of pencilval namespace Some\Pencil\Model\Entity\Attribute\...
2
votes
3answers
6k views

How do create Setup/InstallSchema.php in magento2?

I'm tried create Setup/InstallSchema.php in magento2 but it not work. So any so any suggestion? thanks. This file InstallSchema.php <?php /** * Copyright © 2015 Magento. All rights reserved. ...
0
votes
1answer
895 views

magento2 soap web service error

I created script like this.and I have created token also from admin side. ini_set('display_errors',1); require('vendor/zendframework/zend-server/src/Client.php'); require('vendor/zendframework/zend-...
0
votes
3answers
1k views

have any idea how can create or import product in magento-2?

I want to be a insert or import product in magento-2 ? Please if you have any thought share with me. Thanks
47
votes
3answers
11k views

Magento2: what is the basic difference between plugin and preference?

I used both plugin and preference in magento2 tutorial and both are working fine but what is the basic difference between them. Code for plugin: 1.1) Add a plugin declaration into di.xml: <type ...
0
votes
1answer
102 views

Setup magento 2 error?

I m trying to setup magento 2 MAGETWO-40129: M2 GitHub Update. but get error when Installing... 70% In php.ini i'm trying to set values xdebug.max_nesting_level=50000, memory_limit=256M, but it'...
0
votes
1answer
428 views

Magento 2 setup comporser error?

Today I create newsite magento2 MAGETWO-40129: M2 GitHub Update (version 1.0.0-beta. When i install composer get ZipArchive::extractTo(): Full extraction path exceed MAXPATHLEN (260) how do fix it. ...
4
votes
3answers
8k views

Magento 2 grunt exec does not actually create symlinks

I am following: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html#grunt_prereq it says grunt exec:<theme> does: Republishes symlinks to the source files to ...
1
vote
1answer
592 views

Magento2: how can we use xsd file in magento2

what is role of xsd files which are located in etc (eg: etc/abc.xsd) and how can we use these files in Magento2 and also how can we relate it from magento1.*.
5
votes
4answers
14k views

How Can I move Search bar in Navigation div in Magento2 using XML

How Can I move Search bar section in Navigation div Magento2 using XML. I have used below code but it's not working: <move element="top.search" destination="catalog.topnav" before="-"/> Any ...
26
votes
5answers
31k views

How to convert number into currency format in magento2

I want to convert number into currency format in magento2 like we do in Magento 1.x with this $_coreHelper = $this->helper('core'); $_coreHelper->currency(number_format(50,2),true,false) How ...
5
votes
3answers
7k views

Magento 2 - Set the page layout dynamically based on admin configuration

I want to know how to set the page layout dynamically based on an extension's admin configuration values. I found how to change the page layout in the layout xml file, http://devdocs.magento.com/...
17
votes
1answer
11k views

Magento 2 - ifconfig in layout xml

I'm working with magento 2. I can use ifconfig attribute in the block code, and it works well. <block class="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="...
5
votes
2answers
1k views

Magento2: How to override magento tier price in custom extension?

Need help with Magento2. Anyone know how to override Magento Tier Price. Actually i am developing an extension and stuck here.
60
votes
13answers
111k views

How to get Magento 2 base URL?

In Magento 1 Mage::getBaseUrl();, but in Magento 2 I have to pass responsible class object type in constructor. I don’t have the idea which class I have to pass?
2
votes
3answers
3k views

Magento2 - SOAP API not authorized issue

I tried to call SOAP API of Magento 2 but I could not call successfully. Here is my source code: require('vendor/zendframework/zend-server/Zend/Server/Client.php'); require('vendor/zendframework/...
8
votes
2answers
15k views

Magento 2 - Keep Product Image Aspect Ratio

I'm working with Magento 2 Category Page. But I couldn't know how to keep the product image aspect ratios. In magento 1.x, I can get the image src to use below code. <?php echo $this->...
4
votes
1answer
322 views

[magento2]I've added the custom attribute to customer_address_entity and display in UI form

[magento2]I've added the custom attribute to customer_address_entity and display in UI form. how to save the custom attribute to database when submit form
7
votes
1answer
5k views

Magento2 : how can I call my theme images in static block

I have install Magento2 and create static block how can I call my theme images in static block ? In Magento1.x we used {{skin url="images/demo.jpg"}}. Any one have idea for how to call images in ...
13
votes
4answers
17k views

Magento 2 - Override base view file

I'm currently developing a Magento 2.0 theme. I'm trying to change the behaviour of the Tax class on the frontend. The file I need to change is located in app/Code/Magento/Tax/view/base/templates/...
1
vote
2answers
2k views

Circular Dependency Error in magento2

In magento2.x I am using the helper and the model class files where I need certain functions from helper so I just created the object using DI and similary when I am trying to get the model object ...
0
votes
2answers
91 views

How do create DB collection in view?

I'm trying code <?php $models = $this->getModel(); ?> ("getModel() is model slideshowdata") <?php if($models -> count() > 0 ): ?> <?php foreach($models ...
22
votes
3answers
15k views

Magento 2 - How to get the extension's configuration values in the phtml files?

I'm working with Magento 2 - beta. But cannot find how to get the configuration values in the phtml files. eg: I want to get my custom modules configuration values in Magento_Catalog/templates/...
0
votes
1answer
81 views

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

I have action index in my module. namespace Xanka\Slider\Controller\Adminhtml\Slideshow; class Index extends \Xanka\Slider\Controller\Adminhtml\Slideshow { /** * @var \Magento\Framework\...
7
votes
1answer
9k views

Magento 2 - Sample module displays blank page

I'm using Magento 2 version beta-1.0.0 and trying to create a simple new custom module. The custom module works but is showing a blank page on body content. The module done in below way. Folder ...
3
votes
1answer
1k views

how to add custom block to specific product type view pages in magento2?

I have created custom block. I want to show this block only in grouped product pages. any one have idea the syntax for magento2?
9
votes
3answers
8k views

How do auto add datetime in InstallSchema magento2?

in InstallSchema ->addColumn( 'created_at', \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, [], 'Creation Time' ) ->...
3
votes
1answer
5k views

Submit action form

when i submit form don't submit to acion Save. what wrong. Source <div class="edit-slide"> <?php $model = $this->getModelEdit();?> <form id="edit_form_slideshow" method="post" ...
3
votes
1answer
3k views

Plugins not called in magento 2

I have created a plugin in my custom module to override the default method getName() in Magento\Catalog\Model\Product.php I've created my custom module named Firstmodule inside app\code\Magento. I ...
0
votes
1answer
564 views

Magento Coupon code doesn't work as it shoud?

So, I have this coupon code MYFIRSTORDER which is based on the following 1. for "New Customers" that sign up 2. Spend a minimum of £20 to get a £5 off their first order. The below image depicts ...

1
784 785
786
787 788
791