Questions tagged [magento-2.0]

Questions related to Magento 2.0 version of PHP eCommerce software and platform. Questions should be related to writing code for Magento. General Magento questions may be asked on https://magento.stackexchange.com

General Magento questions may be asked on Magento.SE. Questions not related to programming are off-topic


Related tags


251 questions
29
votes
4 answers

Magento 2 - How to call a custom phtml file in another phtml file, xml layout, static block and cms page?

I am creating a magento 2 theme. I just want to know how can I add .phtml file in xml layout, static block, cms page or in another .phtml file. Thank You.
Milan Chandro
  • 2,342
  • 1
  • 18
  • 25
26
votes
5 answers

Magento 2 - 'Area code not set:' after adding sample data

So i've gotten magento 2 working all running fine, I've even started on my own theme, but i've tried to install the sample data after I've installed magento. And it has returned 'Area code not set:' in terminal, below is a little run through of my…
andy jones
  • 904
  • 1
  • 12
  • 37
18
votes
11 answers

How to remove "My Wish List" and "Compare Products" blocks from Magento 2.0 Luma template?

I have spent a lot of hours trying to remove "My Wish List" and "Compare Products" blocks from Luma template. Besides, I need to change and remove some of the bottom links. I cannot find where to modify. Can you help me, please? Thanks
jstuardo
  • 3,901
  • 14
  • 61
  • 136
13
votes
5 answers

How to get current category in magento2?

How can i get current category in magento2 ? I want to get category name and category id in custom phtml file.
Makwana Ketan
  • 1,380
  • 1
  • 14
  • 22
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
9
votes
6 answers

How to remove H1 title from CMS pages and category pages in Magento 2

I want to add the H1 title along with the description in the description filed for CMS pages and category pages. How can I remove the H1 title for these pages but keep the H1 title for products pages?
Gordova
  • 347
  • 1
  • 9
  • 18
8
votes
2 answers

Magento 2 - How to override block template

I try to override vendor\magento\module-multishipping\view\frontend\templates\checkout\addresses.phtml I create the layout app\code\My\CustomModule\view\frontend\layout\multishipping_checkout_addresses.xml
ViSuaL
  • 281
  • 2
  • 4
  • 16
7
votes
1 answer

Magento 2 - REST API PUT product

When I try to update a product, created via the REST V1 API, only the values are updated for de default website. Unfortunattely I can't find any possibility to send website id's within te json. Does anyone have experienced this before? The data I…
MmynameStackflow
  • 1,251
  • 3
  • 19
  • 39
7
votes
5 answers

"Modules are Outdated" Error

I get this error when I create a new module: "Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. The following modules are outdated: Sangeeta_Octan data: current version - none, required version -…
Sangeeta
  • 83
  • 1
  • 1
  • 3
7
votes
6 answers

Cannot see changes in Magento 2 js and css

I am new to magento 2 and I am creating extension for it. But I am unable to see any js and css changes. When i check on my source code my js file custom.js and css file custom.css is loaded properly but i am unable to see any of my changes. I…
Yatin Khullar
  • 1,580
  • 1
  • 12
  • 26
7
votes
6 answers

Products is not showing up on Magento2 subcategory

I installed a fresh magento2, and top categories are working, but for sub-category, there is no product showing up in frontend even thought I assigned products to these sub-categories. It's always said "We can't find products matching the…
Zike
  • 67
  • 1
  • 1
  • 4
6
votes
5 answers

How to get Product Attribute Options by attribute code in Magento 2.0

I am trying to retrieve the list of dropdown attributes and check if the value exists (if it does i need to get the value and assign it to the product) and if it doesnt i will have to create it and get its value to assign it to the…
Zubair
  • 63
  • 1
  • 1
  • 5
6
votes
1 answer

Segmentation Fault in PHP7

We have encountered this weird issue with PHP 7.0. We are running Magento2's indexers on PHP 7.0 and have different outcomes on different environments. If we use CentOS, and get PHP 7.0 from either Remi's Repo or Webtatic Repo, we get a Segmentation…
Maddy
  • 996
  • 8
  • 18
5
votes
3 answers

Install Magento 2 and Varnish Cache on different server

I have 2 servers, one which has magento 2 installed (ip - 129.89.188.244 port 80) and Varnish on another (ip - 129.89.188.245 port 80) My Varnish Configuration: File /etc/default/varnish:- DAEMON_OPTS="-a :80 \ -T 127.0.0.1:6082 \ …
Dhaval Bhavsar
  • 495
  • 5
  • 17
5
votes
1 answer

Get Custom Option Values of a product magento 2

I have two custom options for a product. Color and Size and both are dropdowns. In product detail pages, I have to display all available colors of that product. I tried the following code and it works. But it returns all the values of Color and…
Arun SS
  • 1,791
  • 8
  • 29
  • 48
1
2 3
16 17