Questions tagged [magento2]

Magento 2 is an eCommerce project facilitating the improvement of Magento Core products. Written in PHP-Zend Framework. Available under both open-source and commercial licenses via Adobe Commerce.

Magento 2 is the next major release of Magento. It differs from previous versions of Magento substantially, including fundamental changes such as directory structure and naming conventions.

It has been released for GA (General availability) on November 17, 2015 Magento Ushers In New Era of Commerce Innovation with Next-Generation Platform

Release Notes : Release Notes 2.2

Release Notes : Release Notes 2.3

Release Notes : Release Notes 2.4

Latest Release: Magento 2.4.5 Release notes

Links :

5108 questions
11
votes
2 answers

Magento 2 nested blocks

I'm migrating from Magento 1.x to Magento 2 I created default.xml file to customize the existing layout. My situation is that I have a div named "main-header" and I want a nested div inside it named "menu". Now, I know blocks can have templates. So…
Ashutosh
  • 4,371
  • 10
  • 59
  • 105
11
votes
3 answers

How to install a language pack in Magento 2?

I tried to follow the instructions from https://mage2.pro/t/topic/270 and http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-i18n.html#config-cli-subcommands-xlate-example2 but I still failed. I'm trying to change the…
Henry
  • 593
  • 2
  • 5
  • 12
11
votes
26 answers

Magento 2 not loading CSS and JavaScript

I have installed magento 2 successfully on localhost but I am not able to see admin panel as it render 404 error to me. Secondly, When I open front-end then CSS and JavaScript is not loading.They also renders 404 errors. Also When I try to run…
Scott
  • 111
  • 1
  • 1
  • 6
11
votes
4 answers

How to show the static blocks in Magento 2?

I'm creating a magento 2 theme. I want to display the custom blocks on the cms homepage. I want to know to show the static blocks in phtml and xml layout, cms page contents How can I do?
John
  • 348
  • 2
  • 4
  • 10
10
votes
1 answer

Magento 2 Override JS of a module but on first request dependencies not loading

I want to change the HTML layout of a 3rd party module which is displaying INC/DEC buttons on the quantity input field on the product description page. For that, I have to override a JS of a 3rd party module which I did and is working all fine. The…
Noman
  • 149
  • 1
  • 14
10
votes
2 answers

Magento 2: Product import does not create sub categories

I'm importing products from a CSV-file. The categories-column of the import file has a value like this: Store Amsterdam/Lunchbox;Store Amsterdam/Lunchbox/Hot Sandwiches I've set ";" as a Multiple value separator in the Magento 2 import…
Rick
  • 463
  • 7
  • 18
10
votes
2 answers

How to get Filterable Attributes from a category in Magento 2

I have created category "Bag" in Magento 2. having filter attribute: color Size I'm trying to get Filterable Attributes from category "Bag". I have already done this in Magento 1.9: Mage::app()->setCurrentStore($store); $layer =…
Vishal Kamal
  • 1,104
  • 2
  • 10
  • 35
10
votes
8 answers

There are no commands defined in the "setup" namespace : Magento 2

I have installed latest version of Megento 2, everything is working fine frontend, backend and functionality. I have one issue with bin/magento setup:upgrade command, when I run this command in terminal I get below exception…
Deepak Mankotia
  • 4,404
  • 6
  • 30
  • 55
10
votes
2 answers

How to add an Item to a quote/cart via API on Magento2

I have tried calling [POST] /carts/mine/items, headers with correct bearer, and body: { "cart_item": 1, "sku": "MY_SKU", "qty": 1 } and I get the folowing response: { "message": "Invalid value of \"%value\" provided for the…
awavi
  • 837
  • 3
  • 11
  • 23
9
votes
2 answers

I can't deploy production mode : Command returned non-zero exit code (magento 2.1)

I'm struggling with a big issue, the magento deployment command failed. php bin/magento deploy:mode:set production return the following error: Command returned non-zero exit code: /usr/bin/php7.0 -f bin/magento setup:static-content:deploy fr_FR…
D. Kerat
  • 103
  • 1
  • 1
  • 8
9
votes
3 answers

How to setup Magento2 with MAMP PRO and nginx?

Does anybody suceeded on setup Magento2 and MAMP's nginx? I'm using MAMP PRO 4.1.1 and didn't realize how MAMP works with the rewrites and rules we config for each site, or if there's a way to debug and see the final used nginx config. I would…
Ricardo Martins
  • 5,702
  • 3
  • 40
  • 59
9
votes
2 answers

magento 2 vendor git diff & apply patch

Mainly, this question is specific to git with Magento 2. I have a working Magento 2 project and I have installed an extension using github repo - https://github.com/Adyen/adyen-magento2. In my current situation, I have to debug that extension and…
Kamal Joshi
  • 1,298
  • 3
  • 25
  • 45
9
votes
1 answer

Magento2 - Custom Product Collection with Layered Navigation

I am trying to display Layered Navigation Block on custom page with custom product list. For now i have custom controller, xml layout and template for product list. What do i need to insert into xml layout to display layered navigation block…
kaspi
  • 91
  • 1
  • 4
9
votes
3 answers

Magento2: REST API : Save Product Detail per store view not working

Using Magento2.1.0-rc1 Branch With Sample Data Using REST API catalogProductRepositoryV1 REF: http://devdocs.magento.com/swagger/index.html Get Key from Admin token API and use that key in POST /V1/products & PUT /V1/products/{sku} with…
Emizen Tech
  • 3,529
  • 1
  • 17
  • 33
9
votes
3 answers

How to get url for static image file in Magento 2's javascript files?

I need to get a URL for an image stored in my theme (app/design/frontend/MyVendor/MyTheme/web/images/image.png) from a javascript file (payment.js). In PHP I can do it like this: getViewFileUrl('images/image.png') ?> How can I…
jurgen
  • 247
  • 1
  • 2
  • 9