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.

1
vote
2answers
551 views

127.0.0.1/admin page “Not Found”

I'm installing Magento2 After I reached to "127.0.0.1/setup/#/success" and clicked "Launch Magento Admin" I got the "Not Found" page. I'm sure that I have changed the administrator page to "admin" ....
29
votes
11answers
29k views

Magento 2: How to truncate customers, products, reviews and orders table

Does anyone have list of tables I need to truncate to delete all test customers, products, reviews and orders in Magento 2 ? I'm looking for something similar to Clearing Magento after testing .
17
votes
4answers
26k views

Programmatically create a simple product in magento 2

I'd like to create simple product programmatically in magento 2. Is there any way to create ?
1
vote
1answer
183 views

Argument problem when passed to Model in custom extension

this model extend Magento\Framework\Model\AbstractModel called in new controller from backend grid created with a uiComponent public function __construct( \Magento\Framework\Model\Context $...
4
votes
1answer
716 views

Where is the ListProduct.php under Magento\CatalogSearch\Block\SearchResult?

Where is the ListProduct.php under Magento\CatalogSearch\Block\SearchResult? I can't find it under the source code folder.
1
vote
1answer
294 views

follow-up question to “dirty playground” file in Magento 2

Based on this answer to a very similar question: How can I bootstrap Magento 2 in a test.php script?, specifically https://magento.stackexchange.com/a/76382, when I run php abstract.php, I get the ...
3
votes
2answers
5k views

How to show all products on category pages in Magento 2

How to list all products on my category pages as default?
1
vote
1answer
206 views

Extend template (phtml) and add item in magento 2

a question: How to add an item using a template (phtml) in magento 2
7
votes
1answer
1k views

Magento 2 Product Attribute Swatch Image

I have created a product attribute that is using an image swatch for each attribute value. My question is how can I go about retrieving the image swatch URL from the attribute within my product view? ...
2
votes
3answers
5k views

How to remove tool bar in Magento 2

I would like to remove the tool bar from my theme since I don't have that many products. So far I have tried this in my /app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml <...
3
votes
1answer
1k views

Magento 2: Less Compilation Failing

I'm working with a set of Less CSS files I didn't write in Magento 2. During compilation, I get the following error Compilation from source: frontend/Infortis/base/en_US/css/custom.less ...
8
votes
2answers
4k views

Get URL of the static content folder (for backend)

Inside a block class which is being used to render a button in the admin panel, how to get the URL of the static content folder? Specifically, URL of the folder with images? For example, in ...
1
vote
2answers
767 views

Magento2 installation wizard hanged on 90%

I was installing Magento2 and the installation reached 90% and it staid there not moving for more than 15 minutes with no errors in the log console. I have read on the Internet that I have to ...
2
votes
1answer
3k views

Magento 2 main.CRITICAL: Invalid template file error

I'm trying to load a simple template in the Magento 2 admin panel but the error I get in the system.log is: main.CRITICAL: Invalid template file: 'Test_Main::dashboard/index.phtml' in module: '...
0
votes
2answers
4k views

Magento 2 Simple jQuery Example

I was wondering if anyone could provide a simple jQuerying hello world example in Magento 2. I have read the documentation on requireJS and the Magento 2 documentation and I am still struggling. ...
0
votes
1answer
147 views

Problem with Magento 2 installation and JS/CSS files

I have been having problems with getting Magento2 installed on LAMP CentOS VPS. I setup everything via terminal on a Mac, logged in as the web account user, so ownership should be fine. I have ...
0
votes
1answer
448 views

Mangeto2 create custom product attributes in different languages

What is the right approach to create a custom required attribute to a product like "Volume" in English and "Volym" in Swedish. The attribute has to be required and the product will be used not only ...
0
votes
1answer
43 views

Magento 2 CE standalone database

In according with realease notes about magento 2 community edition I think that I can setup a standalone database for key subsystem. Standalone databases for key subsystems like order management, ...
0
votes
1answer
56 views

Magento 2 migeration

i was able to successfully migrate from 1.9 to magento 2 using data migration tool, from github. the tools migrates everything except for cms pages, and cms blocks. I dump the pages and blocks tables ...
0
votes
1answer
318 views

Tier prices Magento 2.0

I have got just one question, can you tell me how to change the tier prices withing the simple variants of a configurable product afterwards? I tried and saved the change in the simple variants but it ...
3
votes
2answers
4k views

Magento2 loading admin layout and template in a new page

I can't get my head wrap around this. I have this controller namespace Vendor\Gift\Controller\Adminhtml\Gift; use Magento\Backend\App\Action\Context; class Index extends \Magento\Backend\App\...
6
votes
3answers
4k views

Magento 2 add script before closing body tag

What is the proper way to add a script before the closing body tag in magento 2? I want it to be available to all pages. UPDATE: I've got in myvendor/mytheme/Magento_Theme/layout/default.xml with: ...
5
votes
3answers
2k views

Magento 2 : Add to compare and add to wishlist with ajax

How to do add to compare and add to wishlist functionality using ajax. I want to do ajax functionality for wishlist and compare in homepage hot seller block products and listing page products. ...
6
votes
2answers
5k views

Issue with jQuery usage in Magento 2

Currently I have a custom block loaded almost last on the page containing: <script type="text/javascript" src="/test.js"></script> This script is pretty much the usual stuff, just ...
2
votes
1answer
2k views

What mean of “product online” or offline in magento 2.0?

What mean of "product online" or offline in magento 2.0 ? Please explain this mean of words "product online", if you know.
1
vote
1answer
237 views

File `/i18n/de_DE.csv` not found

I am using the latest Magento 2.0.2 release and imported the German bin/magento i18n:pack --mode=replace -d source.csv . de_DE When I now open a product page I am getting File "/i18n/de_DE.csv" ...
5
votes
1answer
11k views

magento 2 - Invalid credentials for 'https://repo.magento.com/packages.json', aborting [duplicate]

Trying to install magento 2 on localhost. I am getting this message Invalid credentials for 'repo.magento.com/packages.json', aborting. Initially, I had created a secure key by navigating to ...
5
votes
3answers
9k views

Magento 2 - Moving site - 'No such entity'

After I moved a site from staging.site.nl to site.nl I received a weird error. If I try to reindex the site I get this error: No such entity. If I try to login I get this message: a:4:{i:0;s:15:"No ...
2
votes
1answer
1k views

How to add more column to “category product” grid of categories admin in Magento 2

How to add more column to "category product" grid of categories admin in Magento 2.0. If can, please show me step by step!
2
votes
2answers
9k views

Magento 2: How to defaultly open “content 2” tab?

I am using accordion for tab open and close.How to open default "content 2" tab? <div class="block filter" id="layered-filter-block" data-mage-init='{"collapsible":{"openedState": "active", "...
3
votes
3answers
4k views

Magento 2 : Rating Filter in Layered Navigation

In Magento 2 How to add Star Rating Filter in to Layered Navigation?
0
votes
1answer
512 views

Move Block into New Block/Template

I have created a couple of new templates that replace the header on my theme and I've created a new header container that contains the new blocks I'm using to render the templates. What I want to ...
3
votes
2answers
4k views

Magento 2.0.x - Insert block in to the product page

After about a week reading through the Magento 2 Docs - layout instructions, and some other stack exchange Q's and A's, I still having a hard time to figure out how to insert a custom block in to the ...
2
votes
2answers
1k views

How do I change text on top links

I am designing a theme in Magento 2 using blank theme as parent theme. I would like to change text on some of the the top links like this: From "Compare Products 1 items" into "Compare (1)" From "My ...
6
votes
1answer
4k views

Magento 2 sample data installed but not showing

I have just installed Magento 2. I think I have installed the sample data. I did php bin/magento sampledata:deploy , php bin/magento setup:upgrade and then php bin/magento setup:di:compile however the ...
4
votes
2answers
93 views

Is it OK to make all XML changes in a singe file in Magento 2.x?

In my /app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml I have made changes like this (changes that are effecting Magento_Catalog): <move element="product.info.media" ...
2
votes
0answers
560 views

Magento 2 - Get Category Name in block

I'm trying to get the category name in a block for the home page so that when the visitor changes the language, the name of the category will translate depending on the selected language, like with ...
13
votes
2answers
3k views

Correct way to Update a Theme's Parent in Magento 2

In Magento 2, you can specify a parent theme in a theme's theme.xml file. <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/...
0
votes
1answer
135 views

How do Magento2 translations work?

There are plain strings i.e. in view/adminhtml/ui_component/product_listing.xml and I am wondering how they get translated into other languages. Also what is the correct way of using translations in ...
1
vote
2answers
5k views

Magento2 custom admin controller always redirects to the admin index page

I've created custom extension in the admin panel under the menu of products. The problem is that I can't get the controller working. Code as fallows: in etc/adminhtml/menu.xml: <config xmlns:xsi="...
0
votes
2answers
463 views

fully customize theme or inherit from parent theme in magento2.0.1?

My requirement is making one eCommerce site which totally different from magento luma/blank . I stuck with how to utilize theme in magento 2. In most of the tutorial inherit parent theme. which is ...
0
votes
1answer
345 views

Rewrite model from vendor

i want do this How do I change the default value of the "position" category attribute? But i noob in magento, i try search in google how do it, but in all guides standart models stay in Mage ...
0
votes
1answer
365 views

Description of Magento2 different existing types of .xml files and parsing

I know now that xml files in M2 are being red/parsed by \Magento\Framework\Config\Reader\Filesystem.php PART 1 : Can someone explain briefly the different existing .xml types (by types i mean ...
1
vote
0answers
108 views

Magento 2: Get `core_config_data` Values without Creating a new Module [duplicate]

Is there a way in Magento 2.0 to get a config value and display it in the header without creating a custom module? I am trying to display the phone number from the admin Stores > Configuration under ...
2
votes
1answer
2k views

Magento 2 use symbol instead of name in currency switcher

I am trying to figure out how to get the currency symbol instead of the name on the currency switcher in Magento 2. I have done it with php, but I know there is a better way in Magento. I've created ...
4
votes
3answers
6k views

Magento 2: Can you Remove a Block From the Layout Completely

In Magento 2, you can suppress the display of a block using the remove tag <referenceBlock name="product.info.media.image" remove="true"/> However, this doesn't remove the block from the ...
1
vote
1answer
334 views

Where are Magento 2 Remove Tags Implemented

Based on this description of Magento 2's layout rendering, where is the remove tag implemented in Magento? That is, in a Magento 2 layout handle XML, you can tell Magento not to render a block with ...
1
vote
0answers
119 views

Magento2 console error locks up browser

I keep getting this error and don't know how to clear it. Is it a production mode vs developer mode problem? Please see below: Uncaught RangeError: Unable to process binding "scope: function (){...
2
votes
3answers
2k views

Magento 2 : fetch checkout session on new route page after place order

How can I fetch checkout session on new route controller (redirecting to new page after place order) after order is placed. Adding checkout session to constructor and fetching getlastorderid using it ...
1
vote
1answer
61 views

Magento2 404s on css and js

Is there a list of command line tools to enter for changing modes? I went from developer mode to production and back again and now my css is all 404s.It doesn't feel like it should be this hard.