The Stack Overflow podcast is back! Listen to an interview with our new CEO.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
0answers
46 views

Call module on product-page with attribute value

I have developed a module and want to call this module on product-page with custom-attribute. I want to call this module on specific product, not on all products so to do that i will create a ...
0
votes
2answers
949 views

M2 Module to Override Login Page Title

I have written a module to override vendor/magento/module-customer/Block/Form/Login/Login.php in app/code to change the page title. My override code is below: <?php /** * Copyright © 2013-2017 ...
6
votes
4answers
4k views

How to solve admin grid error?

I am getting this error in admin custom module of Magento 2. Something went wrong with processing the default view and we have restored the filter to its original state. admin grid error.
3
votes
1answer
236 views

Magento Market place submit extension with licence

I have developed Magento extension that I want to upload on Magento marketplace. I have gone through the process how it works explained Here: https://magento.com/blog/magento-news/magento-...
1
vote
1answer
26 views

Verify product availability by SKU

I've a form in which I'm using ajax to get product sku and quantity from user. I successfully got those entered data in form to my custom module's controller. Now I need to verify that user's ...
1
vote
3answers
65 views

Block over-riding not working magento 2

I have been trying to over-ride my customer module in magento 2. I need to Add an icon to 'Sign In' on header link. I have copied vendor/magento/module-customer/Block/Account/AuthorizationLink.php ...
1
vote
0answers
256 views

custom module name is not listed in setup_module table Magento 2.1

I am running on localhostand entry point of my website is http://localhost.magento2.com/ 1)config.xml have 'Mastering_SampleModule' => 1, but my custom module is not listed in setup_module table ...
2
votes
2answers
1k views

Is it okay to change the vendor files?

I am using magento 2.1 with the ultimo theme. I was customizing the login page which was not avaialable as a module in the theme. So I go to vendor and changed the login page setting like text and ...
0
votes
1answer
785 views

How to create another customer form to update custom fields in magento 2

I have added a link in customer dashboard links (in the left side) and also I have added 2 custom fields to customer and I'm going to create a form which can update those custom fields in the tab that ...
1
vote
1answer
65 views

How to check if a request is a product or category from url class?

I have come a cross this class vendor/magento/framework/Url.php. these are the snippet code : public function __construct( \Magento\Framework\App\Route\ConfigInterface $routeConfig, ...
0
votes
3answers
883 views

How can I set data from controller to .phtml file in magento

I have created a custom module and there are some drop downs in it. I have done all the things in .phtml file as pure php. How can I change that to correct way code in my .phtml file: <?php $...
1
vote
1answer
393 views

Overriding Base routing class in magento 2

I want to override this class class Base implements \Magento\Framework\App\RouterInterface this class is located in vendor/magento/framework/App/Router/Base. So here is my custom module looks like : ...
0
votes
1answer
116 views

Where magento 2 render the url for products and catalog?

I would like to app prefix like my-product to the view product, for example using magento 2 sample product we can view one of the product using this link : http://localhost:8000/desiree-fitness-tee....
0
votes
1answer
13 views

layout over riding in account page affecting category page

I am building a custom magento theme in magento 2.1. While developing I noticed that whatever change I am making to app/design/frontend/vendor/theme/Magento_Customer/layout/default.xml is affecting on ...
2
votes
1answer
597 views

How to change position of default welcome message in magento 2?

I am customizing my Magento theme. I have come across the problem of customizing default Magento message. Is there any way to change to position this in the middle. Right now it is on the left side. I ...
0
votes
1answer
42 views

How to know if module's output is disabled in magento 2?

I have already tried these solutions : How can I check if the module output is enabled on the Magento 2? But the thing is if I use this solution, it always give 0. $this->_scopeConfig->...
1
vote
2answers
1k views

Custom module creates 'Invalid template file in module' error

I wanted to have a product's brand name shown next to it's product name, so I created a module for this. I extended the Magento\Theme\Block\Html\Title block in order to obtain the brand name and use ...
1
vote
1answer
46 views

How to create M2 module which filters by custom product attribute?

Experimenting with Magento EE 2.1.7 and creating modules. I've created an attribute by the name of "brand" and have assigned a few products with brand data so that I can filter them by brand name/...
1
vote
4answers
3k views

How to add js file to custome module in magento 2

I have some script code in my phtml like below. path - Company/Module/view/templates/test.phtml <script type="text/javascript"> var color = null; var framecolor = null; function ...
0
votes
0answers
27 views

Custom Module overlaps magento default theme

I have a Sliding contact us module.This module overlaps with the navigation menu of default magento luma theme. How do i fix this issue?
1
vote
1answer
244 views

magento 2.1 custom theme header minicart layout overriding not working

I am building a new theme in magento 2.1. I need to override the default header minicart of magento 2.1. For that I had copied vendor\magento\module-checkout\view\frontend\web\template\minicart\...
0
votes
1answer
380 views

Magento 2 hide section in admin panel

How do you hide a default magento 2 config section in the backend (Admin Panel)? For example I want to hide the "Mail Sending Settings" section located in Stores->Configuration->Advanced->...
2
votes
1answer
56 views

Magento\Mtf\TestCase\Scenario Location file?

I was installing some module and found that there are some test class that extend Scenario : <?php namespace Aheadworks\SocialLogin\Test\TestCase; use Magento\Mtf\TestCase\Scenario; /** * ...
0
votes
1answer
174 views

Get notification when customer updates account

Is it possible to get an email notification to the admin of a magento 2 store whenever a customer changes his account details like address or something? Is there some kind of hook I can make a module ...
0
votes
0answers
788 views

Magento2: Recoverable Error: Argument 1 passed to ::__construct() must implement interface

I am trying to make a shipping method based on percentage. Can someone explain to me whats wrong with the following? I get this error message: main.CRITICAL: Recoverable Error: Argument 1 passed to ...
2
votes
4answers
173 views

Create Dirty Playground In Magento 2.1.6

The method outlined here to create a dirty playground doesn't work in magento 2.1.6: https://magento.stackexchange.com/a/40848/55108 It generates the error: Uncaught TypeError: Argument 2 passed ...
1
vote
2answers
578 views

magento 2 custom module layout issue

Created Magento 2 custom module but the layout seems not showing anything. It is supposed to show some output but it is showing white blank screen in the page. Please help My URL http://localhost/...
1
vote
1answer
467 views

Can I add extra fields to the a Magento 2 static block?

I'd like to add something similar to a category drop down to Magento 2's static block. Is this possible, if so can somebody set me off in the right direction?
1
vote
1answer
1k views

Show product price in custom block

I am developing a custom module with a custom block which displays a list of products. My Block class: use \Magento\Framework\View\Element\Template; class Products extends Template { protected $...
0
votes
1answer
476 views

Magento 2 Custom module error when changing constructor

I am creating a new custom module for Magento 2.1.x which some includes some Blocks. In one of them, at the beginning of the development, the constructor had onlt two parameters: use \Magento\...
1
vote
1answer
233 views

Is there any observer like 'cataloginventory_stock_item_save_commit_after' in magento 2?

I need to trigger the inventory changes in Magento 2.0 I have an observer cataloginventory_stock_item_save_commit_after in Magento 1.9 and its working fine. But I can't find the same observer in ...
2
votes
1answer
863 views

Magento2:How to add a custom button that sends few edit form fields via ajax to call to an API to populate its response in another field?

How to implement a custom button in edit form page that takes few edit form values,sends to ajaxURL and populates some API response in another field on same page in magento2?
0
votes
1answer
42 views

How to Create a module with template file of only block?

I am creating a module for Widget like - Top 5 Products, Product of the Day, Best rated product, Random 5 product, latest product and this will be placed on external website via/in iframe, I don't ...
0
votes
1answer
514 views

Magento 2 admin grid module redirecting to dashboard

I have created a custom grid module in magento 2, It created a menu in admin panel, on click of menu, it is redirecting to dashboard and system.log has following errors : ... [2017-07-01 04:11:57] ...
0
votes
2answers
133 views

How do I override this file in theme?

There is a phtml file from a module that I want to override in my theme. The path to the file is: \vendor\mageplaza\magento-2-social-login\view\frontend\templates\form\social.phtml. I am trying to ...
0
votes
1answer
224 views

Load different template for module on homepage

I can't make my homepage to load a different template for my module. I created a theme based on Magento/blank and created a module that changes navigation menu to nice looking vertical mega-menu and ...
0
votes
1answer
490 views

Magento 2 New Module not appearing in admin Disable Modules Output

I am new to M2, and just adding a new module to a local devbox environment using PhpStorm IDE. I've created the module several ways, rather, several modules, each a different way: Magento 2 Code ...
0
votes
1answer
207 views

Magento 2.1 magemonkey install extension failed

For the last couple of days I cannot install any extension on live server. The problems that I am having: Web setup wizard is not showing. Found a workaround to access it via /admin/backend/setup ... ...
0
votes
2answers
1k views

Magento 2.1: Get Breadcrumb Array

How can I get the breadcrumb array from my template? I'm able to get the object: $this->getLayout()->getBlock('breadcrumbs'); and full breadcrumb path as final HTML $this->getLayout()-&...
1
vote
5answers
3k views

Magento 2.1 UI component form addFieldToFilter() on null

I am trying to make a UI component form for creating products in Magento 2.1 module. However, I stuck with the problem that it throws this error: Fatal error: Method Magento\Ui\TemplateEngine\...
0
votes
1answer
488 views

Magento 2: How to add a custom JS to frontend module? [duplicate]

I'm building a module and I need to load Javascript that must be generated in my module (NO theme) to the shop frontend. Then, when a user enters on the web, the module has to generate js and inject ...
1
vote
3answers
996 views

Magento 2: Adding JS from module

I have a module, and I want to add a javascript generated in the module at the frontend footer. The javascript has to be built dynamically because it depends on server variables. I've thought of a ...
7
votes
1answer
644 views

Magento 2: How to set VaultProvider?

I'm working on custom payment system in which I am using Magento2 default vault functionality. Everything is working fine when if I replace below code in file Magento\Vault\Model\Method\Vault into ...
0
votes
1answer
1k views

Magento 2.1 ui_component form module not working

I am trying to create a form on the backend in my Magento 2.1 module using ui_component. However, when I am trying to access the page of the module it throws error 500. Here is the outcome of apache ...
2
votes
1answer
687 views

How to programmatically sign in to the administration area from a module?

I'm trying to create a module which logs in a retrieved user to the administration panel. (we're talking admins, not customers :) ) I found the following post on how to do this: How to perform auto-...
0
votes
1answer
51 views

How to manage a product attributes while adding/editing a product?

I have created 2 attributes for my products, attribute1 and attribute2, both are multi-select dropdowns. What I wanted to achieve is that the second attribute values changes based on the options ...
3
votes
2answers
2k views

How to load a popup in the home page?

I need to show a popup when the store loads and need to ask users to select the city, then only products deliverable to these cities must show. In the backend, I added some cities to a new attribute '...
0
votes
0answers
460 views

How to add custom dropdown on customer address checkout in Magento2

How can we add custom dropdown field on the checkout page in customer address. Also, it should be reflected in the backend and in Customer my account section. For example:- Customer primary business ...
0
votes
1answer
343 views

How to store dropdown value in database and display selected when edit item?

I am developing custom module. Other fields are saving data in database but i have issue with Dropdown field. It's not saving value in database. My code as following: $elements['target'] = $fieldset-&...
0
votes
1answer
229 views

Adding Layered Navigation Module to my theme so I can edit

I need to override the default vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml. I am attempting to add the proper file structure to my theme but cannot get it to ...