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
0
votes
1answer
1k views

Issue updating and deploying sample data

I'm currently trying to complete the sample data installation but when i run the command. php magento2/bin/magento setup:upgrade I keep getting the following errors in the terminal i'll paste it up ...
3
votes
1answer
5k views

Magento 2: How to override the luma default.xml

I wish to do some customization in luma theme (default.xml). I just created the default.xml file as specified below but it is not taking any effect. Note sure is this the correct way to override the ...
0
votes
1answer
15k views

Magento 2: Recommended File Permission for shared hosting [duplicate]

I have hosted the Magento 2 on a shared hosting server where they recommend to keep all folders as 755 and files as 644. However Magento recommeds to keep 770 for folders and 660 for all files. As ...
2
votes
1answer
474 views

interface dependency injection

I have created one interface and declared methods and in my model class i have implemented interface and methods have been defined. Now in my other constructor class i'm injecting this interface and ...
2
votes
1answer
2k views

Magento2 - remove custom theme not composer

Magento2, testing stuff, and created custom themes, did not use composer, so how do I remove theme from system, command line uninstall themes does not seem to work, screenshot below: simply deleting ...
5
votes
3answers
1k views

Should a development team use a single pair of repo.magento.com keys?

I understand that in order to use composer with Magento 2, you need to set up your instance with a public key and private key per the documentation. If you’re working in a team, should the team use ...
0
votes
2answers
210 views

Magento 2.0.1 problem with my custom theme

I am using Magento 2.0.1 and I created a custom theme in app\design\frontend\MyTheme Now, I am setting my custom theme in back end and I created following folders and files \web \media \etc ...
0
votes
1answer
825 views

How can i get attribute option id in controller?

I try in my controller in following way $newOption = $this->_objectManager->create('\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection') ->...
2
votes
2answers
613 views

Filtering with magento2

I have problem with magento2 FilterGroupBuilder. I need to set filter where active_until date is between today and March 3 OR active_until before January 5. My code looks like: public function dot4() ...
1
vote
1answer
1k views

How to translate strings with link in email template (Magento2)

I'm trying to translate {{trans 'If you have questions about your order, you can email us at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}. with this ...
4
votes
4answers
3k views

Is it possible to redirect the Magento 2 Contact Form without a custom module?

I'm trying to get the Magento 2 Contact form to redirect not to /contact/index but someplace else. Here is what I have so far: We use a custom theme, in which I have created a the following folders ...
6
votes
5answers
7k views

How can I read my extension's version in Magento 2?

In Magento 1.x I was able to read my module's version like so: (string)Mage::getConfig()->getNode('modules/MyModuleName/version'); I'm unable to figure out how I can do the same in Magento 2.0. ...
1
vote
2answers
8k views

How to create customer via customer repository in Magento 2

To create customer via Magento 2 services from php client i have used two files test.php <?php require __DIR__ . '/app/bootstrap.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $...
3
votes
2answers
2k views

Magento 2, How regionUpdater is working?

I'm trying to figure out how regionUpdater works in Magento 2. Region Updater is when you select a country, Magento reloads the region field depending on which country was selected. I went to ...
1
vote
2answers
283 views

Magento CE v2.0.2 and MDVA-84 Patch

Last night, there was an update in Magento CE v2.0 and also a release of patch MDVA-84. Any possible problems that may encounter by anyone of us? Magento also fixed issues which mostly includes the ...
4
votes
5answers
4k views

Magento 2 replace a core javascript

I was trying to replace magento 2 core javascript file for Swatches render which is located at app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js . And I followed official guide for this ...
1
vote
1answer
365 views

Magento 2 Payment Info Block

I've made payment extension. It works well. Now I need to make showing payment url (below payment method name) On 1.x I just edit info.phtml with using function $this->isEmailContext() How can I ...
4
votes
4answers
4k views

Magento 2 Dependency Injection constuctor arguments

I have been playing around with Magento 2. There are some things which I don't understand yet. As far as I know so far is that the object manager automatically inserts the right objects to the ...
0
votes
1answer
21 views

Proper Way To Link to Other Magento Pages

I am trying to link to Login page, but my link is only redirecting to my home page. Here is what I am trying. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $block = $...
2
votes
2answers
6k views

How do I insert data into the table in the module installation process?

I created a new extension where a table was set up in the database. I would like to offer this new module but with pre-existing data in this table. What is the correct way to do this process?
5
votes
2answers
6k views

How to use Magento 2’s built in Vagrant box?

With a clean checkout of Magento 2.0 on branch 2.0, I’ve run composer install. Included in the dependencies is a Vagrant configuration file in vendor/magento/zendframework1. While it seems like this ...
0
votes
2answers
58 views

Magento 2 different framework locations

I have installed Magento 2 a month ago on a server. The framework location is \vendor\magento\framework I just downloaded a new archive to load it into my IDE, but the strange thing is it has a ...
0
votes
1answer
688 views

Media browser field in magento2

I'm currently trying to create (or find how to) a field to display the Media browser (or media storage manager) in admin Edit on a custom module. Type file / image work fine, but it could be much ...
7
votes
2answers
6k views

Magento 2 REST API checkout payment gateway redirect

I am creating a Magento 2 store that sells virtual products, this site have its checkout directly at the product page. The customers will never buy more than 1 product at a time. This checkout uses ...
1
vote
1answer
854 views

Magento 2 in production mode use Dynamic/Developer factory?

I tried to search deeper in Magento 2 code generation process and found some points, which confused me. I use Magento v2.0.1-ce in production mode. Firstly, I found strange dependency in Magento/...
2
votes
1answer
8k views

Magento 2: minicart checkout button and cart subtotal display after item list

How to modify minicart in magento 2. Minicart content display like: Item list subtotal shopping-cart link go to checkout button
5
votes
3answers
24k views

Magento2 - How to get JSON response from Controller [closed]

I've created my custom controller and I want to return the result formated with JSON. I always get a JSON parse error "JSON.parse: unexpected character at line 1 column 1 of the JSON data" and the ...
3
votes
3answers
668 views

How to get Magento 2 latest version number available?

Magento 1 was here: http://connect20.magentocommerce.com/community/Mage_All_Latest/releases.xml Where is Magento 2?
1
vote
2answers
934 views

Magento redirect loop on cloud9

I try to install magento 2.0.1 on cloud9 (c9.io) but keep getting a redirect loop when calling the admin site. http://mage2-lptt.c9users.io/admin_1a798x/ same with https. The Log only shows: [Thu ...
2
votes
2answers
5k views

how to find css file path in magento2

I am working on theming part in Magento2. Whenever I compile .less file, two css file is created: styles-l.css and styles-m.css. Whenever we inspect the element and try to see the CSS applied in the ...
1
vote
2answers
3k views

Magento2 - How to execute validator on form

I've extended the register form with some AJAX functionality and added a custom validator method decribed here. Now I want to execute the validation process after getting the result of the AJAX call. ...
2
votes
2answers
447 views

How to upgrade to Magento 2.0 from 1.x

I was going to upgrade Magento 1.7 site to Magento 2.0. But Magento 2.0 has different structure. Is there a way or tool to do this?
1
vote
1answer
92 views

Magento 2 - run function if order is marked complete?

I need to submit the following information to a third-party. I've started working on a PHP file (outside of Magento 2) to get the data from the Magento database but I'm having issues getting custom ...
1
vote
1answer
2k views

How to call event in magento 2?

I want to call catalog_product_collection_load_after event in magento 2 How can i call that event in my custom module in magento 2? EDIT Filter is not working events.xml <config xmlns:xsi="...
0
votes
1answer
674 views

Magento 2 prevent search bar from entering mobile mode

When the screen width reaches less then 768x the search bar becomes a pop menu i.e. you click the magnifying class and it pops out. How would I disable this from happening?
3
votes
3answers
5k views

Remove /pub/media/styles.css from theme in Magento 2.0

I installed Sample data on magento2. How do I remove this stylesheet from my theme? <link rel="stylesheet" type="text/css" media="all" href="http://example.com/pub/media/styles.css" /> I ...
1
vote
1answer
2k views

How to add a PHTML, CSS & JS to CMS Page in Magento 2?

The process was pretty straight forward for previous version of Magento. All I had to do was create .phmtl page in app\design\frontend\rwd\default\template\page and add js/css in js dir of root. I ...
2
votes
0answers
238 views

Issue removing a subscriber from the newsletter

There is a subscriber to my newsletter whose email address appears to be invalid. Based on the address, it's probably a spammer. I keep getting email notifications from the subscriber's domain that ...
0
votes
4answers
5k views

How to fetch customer detail with soap api in magento 2?

I am trying to fetch customer detail with magento 2 API. but I didn't get solution for that.
13
votes
4answers
10k views

Magento 2: Remove block depending on a config setting

I'm trying to remove a block from a certain page (be it frontend or backend) but only if a certain config flag is set to true. Let's take an example. I want to remove the block with the name dashboard ...
0
votes
1answer
1k views

There is no Magento Connect in System

I installed Magento 2 with sample data and NO extensions so far. Now I wanted to install a bought extension and in the installation-guide is a pointer to System -> Magento Connect -> Magento Connect ...
10
votes
5answers
14k views

After installing, my magento2 is extremely slow though I did not install sample data?

After installing, my magento2 is extremely slow thought I did not install sample data? I am working on magento community 2.0.1 I created virtual box with 2GB Ram & 2Gb Swap. I just want to note:...
7
votes
5answers
14k views

Magento 2 cron not working

*/1 * * * * www-data php /var/www/magento-2/bin/magento cron:run */1 * * * * www-data php /var/www/magento-2/update/cron.php */1 * * * * www-data php /var/www/magento-2/bin/magento setup:cron:run ...
3
votes
2answers
3k views

Blank page on Magento 2.0 install on LEMP

Server LEMP (based on Ubuntu 15.04) I downloaded and extracted Magento 2.0.1 in /var/www/magento2 my /etc/nginx/sites-enabled/magento2 is # special mapping to redirect my different websites map $...
8
votes
5answers
3k views

Changes to CSS and JavaScript applies only after deploying static content

I installed Magento 2 from the Magento site. I have activated the developer mode by {project directory}>php bin/magento setup:mode:set developer Then I have installed my custom theme and finally ...
2
votes
0answers
2k views

How to filter product list by custom attribute on category page in Magento 2? [closed]

I want to list product by my custom attribute so how can i filter this without changing vendor>magento files. I am displaying my attribute in header. when it changes its filter by my custom attribute....
0
votes
1answer
640 views

Magento2 - Error: Can't find custom block

I've created my custom extension and tried to install it. Now I get the following error: PHP Fatal error: Class 'My\Module\Block\Customer\Form\Register' not found in /var/www/html/magento2/lib/...
0
votes
2answers
4k views

How to send transactional mail with pdf attachment in magento 2

How can i send transactional mail with pdf attachment in magento 2? below is my code: class Post extends \Magento\Framework\App\Action\Action { protected $_objectManager; private $...
4
votes
1answer
869 views

What is a “Javascript Component” in Magento 2

In the Magento 2 documentation, they state In Magento 2, there are two ways to initialize a JS component However, they never really explain what a JS component is, and it's not clear from the ...
2
votes
5answers
7k views

Magento2 - cannot load custom css - via default_head_blocks.xml

UPDATE Seems that you cannot inherit Luma.... it works properly when inheriting from blank. github magento source says luma wasn't meant to be inherited. Challenge is, I really like luma, but need ...

1
745 746
747
748 749
772