Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
2answers
3k views

Magento 2 - overwrite module Less / css with theme

I currently have a module installed inside of the following directory: httpdocs/vendor/module/module-name I've installed the module with composer and it works. However I've noticed the module is ...
1
vote
2answers
2k views

Magento 2 - How to change position of Sign in and My Account link?

How can i move account creation link and sign in link after the search box. Need Help
0
votes
1answer
3k views

Autoload Error: Module has been already defined

This error shows up when I do the following: DL and paste this extension under DIR>vendor>magento-japan folder m2-jplocalize Run the following command: composer config repositories....
3
votes
2answers
526 views

Magento 2 module not working. Override fails

I am trying to write a module that filters products in a product collection. For that I have tried to override Magento\Catalog\Model\Layer. These are the files in the module: /Viking/FilterProducts/...
2
votes
2answers
1k views

Magento 2: How to solve Duplicate Of Template Name?

When I installed a new module and did the setup:upgrade I received this message:
0
votes
1answer
703 views

Magento 2 Class Inject in Constructor

I am trying to create a simple module based on this answer https://magento.stackexchange.com/a/125519/45358 I just need a function to check if customer is logged or not in a custom theme header.phtml....
0
votes
1answer
49 views

Get all products in the catalog from my Module controller in 2.1.5

I'm in a controller's action in a module I just created. How can I get an array with all the products I got in my catalog? I did this, but it's not returning the items in the catalog $objectManager =...
1
vote
1answer
40 views

How to recreate a core magento file in my own theme?

Due to a bug in CE 2.1+ (See Here, I am trying to replace a core Magento file: \vendor\magento\module-catalog\Pricing\Render\FinalPriceBox.php with my own version. However, I have tried inserting ...
1
vote
1answer
122 views

How to get helper instance on Magento 2.1?

I tested all methods that I found that were reported here all about Magento 2.0, but seems like Magento 2.1 is different, how can I do that?
5
votes
3answers
4k views

Magento 2: modules are not listing in admin panel

On my test server, every installed extensions are not listing in admin panel under Stores > Settings > Configuration > Advanced > Advanced. And if the extension has configuration parameters ...
0
votes
2answers
306 views

How to add text block in magento 2 custom module

I have a admin config page. Where i have successfully listed my module. I want to add a text block with procedures to follow. What is the tag that i should use in system.xml in order to use a text ...
0
votes
1answer
235 views

Why is my Magento Catalog Block Preference ignored in di.xml?

I am trying to extend the Magento\Catalog\Block\Product\ListProduct block in Magento 2.1 My Vendor_ModuleName module has the registration.php, the etc/module.xml and it's enabled. Then I add an etc/...
1
vote
2answers
423 views

Magento 2 add custom link to username dropdown

can anyone tell me how to create a custom link ("MY VEHICLE") in the dropdown from username of a logged in user. I am a beginner and have no idea where to start, any help is greatly appretiated
1
vote
1answer
359 views

In magento 2, zip code text box to search the store available or not

I am new to Magento. I want a text box where i can type the zip code and if the store available in that location then i need to show the products of that particular store otherwise we need to show ...
2
votes
1answer
1k views

Add new checkout step to force user registration

I want to add a new checkout step, and It checks whether the user is logged in or not. If yes, the user can skip this step and go to next step (shipment step), if not, the user needs to register in ...
2
votes
0answers
53 views

Clear the Text box data in the magento 2 module when validation fails in beforeSave event

I have a textbox which gets a input from the User. I have created a validation point using beforeSave function. If the validation fails, An error displays. Along with this I want to delete the value ...
2
votes
0answers
556 views

How to create ui-component and get it in custom block?

In Magento 2.1.4, I created custom template in backend. Company/Module/Block/Adminhtml/Edit/Custom has template Company_Module::html/custom.phtml. custom.phtml code: <div class="sample"> ....
0
votes
1answer
724 views

Setup version for module '***' is not specified

Recently I have create one module. but after install its generate following error Setup version for module '***' is not specified Here Composer file { "name": "dd/module-productinquiry", "...
2
votes
1answer
2k views

Magento2 Disable All Modules of a Particular Vendor Name

I would like disable all module of a particular vendor in a single command. I know we have php bin/magento module:disable [Vendor_ModuleName] command but as far as I know it doesnot take wild cards ...
6
votes
1answer
966 views

How to add a color picker field in Admin form?

How to add color picker in my custom module of Magento 2 admin panel form? Not in System Configuration.
0
votes
3answers
2k views

Magento 2.x - Menu not showing for custom role in custom module

I am working Magento 2.x custom module. I have setup ACL rules for this but it is not showing Menu of custom module for custom user roles. acl.xml <?xml version="1.0"?> <config xmlns:xsi="...
4
votes
2answers
428 views

How to add min value for a field in custom Module system.xml file?

I want to add minimum value attribute for a admin interface field in my custom module. Can anyone suggest me how I can add min attribute in field? Here is my system.xml code: <field id="...
5
votes
2answers
9k views

How can i disable module manually in Magento 2

I'd like to know if its possible to manually disable a module by changing some code like in Magento 1. I know the SSH way.
0
votes
1answer
579 views

Magento 2 : How to create custom Newsletter Thank you page?

I want to show custom thank you page after hitting the newsletter subscription button. Please help me in this.
4
votes
1answer
1k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
2
votes
1answer
50 views

How to auto get Module A when install Module B in magento2?

For example I have two modules, Demo and Base. I want that when Module Demo gets installed, module Base is automatically fetched from Github and installed. I think it is related to composer. Edited ...
1
vote
0answers
356 views

How to create jewellery ring configuration module? [closed]

I am going to create ring configure module for my project in Magento 2.1 where I will select diamond than diamond setting ring and in third step I will select selected ring size. Exactly I want is ...
1
vote
0answers
144 views

How to show customer review on magento homepage with rating, customer profile picture?

I want show customer review on magento homepage with rating, customer profile on my magento 2 store. What is the best way to do that? Do you have any suggestion. Highly appreciated.
2
votes
1answer
1k views

magento2: how to use product uploader in custom module

<?xml version="1.0"?> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd"> <...
1
vote
1answer
622 views

M2 Multistore - Create module for one store only

In a Magento 2 multistore, is there a way to create a module available for one particular store only? I know that I can disable a module using the admin, but that only disables the output of it. Is ...
19
votes
2answers
21k views

Magento 2.1.1 How to load Order with Increment ID using OrderRepository object

What would be the latest best practice to load Order using increment ID (instead of Order ID) using OrderRepository
1
vote
0answers
473 views

magento 2.1 grid on custom tab of admin product edit page

I am trying to create a grid that should be shown on clicking a custom tab of admin catalog edit page. 1. Created catalog_product_new.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
1answer
668 views

Magento 2: How to programatically check if an order exists without using try-catch?

I am looking at the implementation of \Magento\Sales\Api\OrderRepositoryInterface on https://github.com/magento/magento2/blob/eacac63d35b97961e3304dc007cd6b78519a93d0/app/code/Magento/Sales/Model/...
3
votes
2answers
2k views

Magento ver. 2.1.0 - Index Management without SSH/Shell Access?

Is it possible to do Index Management without SSH/Shell Access in Magento ver. 2.1.0 ?
0
votes
1answer
194 views

Magento 2.1: Do we need to do anything special for the controll action to accept HTTP Post with Json Payload?

I have a controller action that will be used for webhook handler. When I did the form post to that URL with header content-type: application/x-www-form-urlencoded My load is: MyVariableOne=...
3
votes
1answer
971 views

How to deploy public PHP files in Magento 2 extension?

I need to deploy a publicly accessible PHP file as part of a Magento 2 extension. Obviously this is not intended, as usually all requests should be routed through index.php, but in this case it's ...
2
votes
1answer
463 views

Custom block not showing up on homepage

I just created my first own module. It is a Block that should be shown on the cms home page. Later on I want to change this into a custom navigation bar that is present on all pages of my shop but for ...
2
votes
1answer
593 views

Magento 2.1: Letter Case for Controller Actions URL Route

I tried to create a custom payment gateway by creating a custom module based on Paypal module, specically Paypal Express Checkout. I was able to replicate the route for controller actions: Start, ...
5
votes
2answers
9k views

Magento 2.1: Invoke urlBuilder->getUrl() in a controller in a custom module

I think my issue might have to do with dependency injection, which I'm still trying to grab the concept. What I would like to do is to be able to get the URL using getUrl() function from Magento\...
8
votes
1answer
6k views

Magento 2 Check If Customer is Subscribed to Newsletter

I am developing this custom xml export/import. In magento 2 how can I check if a customer is subscribed to newsletter? Right now I am loading the customer factory. \Magento\Framework\App\...
2
votes
3answers
2k views

Magento 2: How to get visitors data

I want to get visitor Id in my custom block for getting product view history of non logged in customer public function __construct( \Magento\Customer\Model\Visitor $customerVisitor ){ $...
1
vote
1answer
23 views

How to share code intelligence between several blocks of the same module?

How to share code intelligence between several blocks of the same module ? Is there a "Magento way" to do this ? or should I simply use Traits to share some functions between a given module class ?
1
vote
0answers
672 views

Magento 2.1 module installation error: Component Dependency Check fails due to SSL/Crypto error

When trying to install a module via the Component Manager of Magento 2.1, I get the following error during the Readiness Check: Command "update" failed: Loading composer repositories with package ...
4
votes
2answers
982 views

I created a custom module ,but getting error, not able to figure out what the error is about. How to get out of this error? [duplicate]

Recoverable Error: Argument 1 passed to Webkul\Grid\Controller\Adminhtml\Grid\Index::__construct() must be an instance of Magento\Backend\App\Action\Context, instance of Magento\Framework\...
1
vote
1answer
484 views

ACL for Front End Module

I have a front end module that I have developed, which I want to restrict to logged in users only. Stressing this is front end users, not admin users we are talking about. I assume this can be done ...
2
votes
0answers
276 views

Magento 2: implement your own captcha type

Out of curiosity, I was going through the captcha module of M2 and I noticed this interesting code in Magento/Captcha/Helper/Data.php public function getCaptcha($formId) { if (!array_key_exists($...
0
votes
1answer
956 views

How to display some module (<block>) at a particular page (main)

Problem There is properly working custom module (as far as I'm concerned), that outputs map. I need to display it only at main page at the content container. Now it outputs at every page content ...
4
votes
1answer
1k views

how to migrate custom code from magento 1.9.2 to magento 2.1

I have created custom modules in Magento 1.9.2,Now I am moving into Magento 2.1. So I need to transfer custom code from Magento 1.9.2 to Magento 2.1. Please help me.