Questions tagged [module]

Questions about developing custom modules

Filter by
Sorted by
Tagged with
4
votes
3answers
1k views

How to remove confirm password field?

I want to remove the confirm password validation field in my registration form. How could I do it?
0
votes
0answers
14 views

Loading custom Product Relations on frontend

I am quite new on Magento 2. (Upgrading from 1.9.4 to M2). Now we installed the following module: https://github.com/magepal/magento2-link-product In the backend this works perfect, but now we ...
0
votes
0answers
348 views

'Invalid method' error on custom module

I'm trying to get a better understanding of Magento module development and I've run into an issue I can't seem to figure out. I've built a custom module that allows users to pick the desired delivery ...
2
votes
1answer
723 views

Block not showing after layout update

Considering this layout update XML: <?xml version="1.0"?> <layout version="0.0.1"> <checkout_cart_index> <reference name="methods"> <block type="...
0
votes
2answers
635 views

Magento 2 Custom Module Delete Issue [SOLVED]

I'm using Magento 2 Version 2.1.0 {folder path}\magento2\app\code\Custom\Module\view\adminhtml\ui_component\custom_module_index.xml <massaction name="listing_massaction"> <argument name=...
0
votes
0answers
11 views

How to create custom country/states Manager menu inside sub menu in cms menu in magento2 through programatically?

I don't know how to implement this task. In CMS menu inside sub menu Country/states Manager I will click the menu it will display beolw screenshot output.https://prnt.sc/pu5z5k. Please anyone help me?...
0
votes
0answers
45 views

Magento 1.9.4.3 Custom Column Filter not working

I have a custom column on my sales order grid showing the ordered items sku's. Done by following the guide here. It worked well in previous versions but no longer does work correctly in 1.9.4.3. When ...
0
votes
1answer
760 views

Custom Module Displays Blank Page

I am trying to add my own module to the admin in version 1.x but I'm getting the blank page when I try to open the module This is what I have managed to achieve so far; My module appears as a ...
0
votes
0answers
20 views

Module Upgrade Issue

I have created db schema and also write the code for upgrade schema. Also changed the version in module.xml file. After that i am running this comman "php bin/magento setup:upgrade" and running cache ...
0
votes
1answer
22 views

Class contains 1 abstract method

During the install module we get issue: Compilation was started. Proxies code generation... 0/7 [>---------------------------] 0% < 1 sec 34.0 ...
1
vote
2answers
2k views

Magento 2 : Disable Default Modules for Performance

We are trying to improve performance of our Magento 2 stores. But which default modules are there to be disabled without getting errors? Currently I have this list: Magento_AdminNotification ...
137
votes
7answers
97k views

To use or not to use the ObjectManager directly?

Ok, so yesterday we had a big talk with other people from the Magento community regarding the direct use of the ObjectManager in classes/templates. I'm already aware of the reasons why we shouldn't ...
0
votes
0answers
12 views

Magento 1.9.4.3. - Upload multiple files in checkout onepage

I'm looking for a custom module that allows me to: Load more than one logo at checkout Confirm the upload of the logo and send the files to my email when the customer clicks on "confirm order" Save ...
0
votes
1answer
13 views

Magento 2.2.2 custom observer attribute name not valid atomic type

I have a custom observer for admin admin_system_config_changed_section_{{$section_name}} the following are: events.xml: <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www....
0
votes
1answer
22 views

Delete Table record having foreign key constraint Magento 2

in my custom module, I have two tables with 1 to many relationships. Now in my admin UI Grid whenever I delete the record it does not delete it. My question is how i can delete record from both ...
0
votes
1answer
738 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
647 views

How to change price for configurable products in Product Listing using drop down options in Magento 2

I have created custom module in magento2, and I want to show configurable products options in the drop-down for the configurable product. I have done using custom code, but problem is that when I ...
1
vote
1answer
73 views

When ViewModel class need to create in Magento2?

I have followed Magento_Catalog Module and I have found ViewModel folder there. Can anyone please explain when we need to create ViewModel classes when we creating our custom module?
0
votes
1answer
26 views

When use block vs view model?

I'm creating a module using blocks and view models, but when is it better to use view models instead of blocks?
10
votes
3answers
1k views

Uninstalling a module

I'm trying to uninstall a module (my own) that I've installed via composer using CLI with this command: bin/magento module:uninstall -r [Namespace]_[Module] Based on the answer provided here by @...
0
votes
2answers
766 views

Error while importing a csv file in the admin

My project had an extension called webshopapps product matrix Which was copied from another project and had been configured . But now when I replace it with the new extension by placing its files ...
1
vote
1answer
694 views

Custom Magento Payment Method not working - The requested Payment Method is not available

I need to create a custom payment method in magento, so that when I create orders programaticalyl via models, I can set the "Title" of the payment to anything I want (for e.g. Cash, Invoice, etc...). ...
4
votes
3answers
5k views

Custom router is not working in Router.php Magento 2 [SOLVED]

I am trying to redirect the page/action by using a custom router as Router.php, but I am getting 100 router match iterations exception. app\code\Custom\Module\etc\frontend\di.xml <?xml version="1....
0
votes
5answers
785 views

How to limit the results from a Left Join in Magento?

I have a collection that I need to join with another collection... the problem is the table contains 125k rows and so it times out. //Fields $this->addFieldToSelect('id'); $...
18
votes
2answers
4k views

Magento 2: How to Check if a Module's Installed

In Magento 2, is it possible to check if a module's installed at runtime? In Magento 1 I'd either use the isModuleEnabled helper method, or manually fetch the global configuration tree and check the ...
0
votes
0answers
32 views

Magento 2: issue with update module | PHP Version

I want to update the payment module Dotpay to 1.0.15 - require PHP Version 7.1+ So I run command with PHP 7.1: composer71 require dotpay/magento2-payment:1.0.15 But during update I received issue: ...
2
votes
1answer
578 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
1k views

Magento 2 - Prevent form submit on page reload when Product add from sample script to Magento Shopping Cart

Below sample PHP script will list simple/configurable product with add to cart button. When user clicks on submit button, it will redirect to Magento shopping cart page and selected product will be ...
0
votes
1answer
46 views

Magento 2.3 : Remove Constraint from db_schema.xml file

I just try to override db_schema.xml file of a core customer module into my custom module , but there is no success. I need to remove a constraint defined in customer db_schema.xml file, how may I do ...
1
vote
1answer
209 views

How to remove GraphQL from Magento 2.3?

I'm not planning to use GraphQL in my Magento 2.3 and I would like to remove it at all for now, not just disable it. How could I do it?
6
votes
1answer
780 views

Watermark Category Images with Brand Logo

I'd like to add a watermark to each small image (but only in the category listing page) that is based on the manufacturer attribute. I don't want to alter the small image for that product on other ...
2
votes
1answer
45 views

Set custom discount price to existing cart/quote in controller

I know I asked the question once before, but i got no answer, so I try it again and hope for an answer this time. I also saw some other guys that tried to get an answer for this question, but none of ...
1
vote
1answer
19 views

override theme .phtml file into custom module

How can override theme .phtml file override into custom module. Path theme .phtml file is app\design\frontend\ThemeName_CompanyName\Module_Catalog\templates\product\view\pricedifference.phtml and ...
1
vote
2answers
46 views

Magento2.3: How to load custom JS in custom module?

I have created a custom module and now need to add custom js file into that module. I have read many post about this but not having a clear answer. Can anyone please help me with this?
1
vote
2answers
2k views

How to get customer session id in magento 2?

I want to get the session-trail in a custom module. Without the session-related code, it is working fine, but it breaks the module when I add it namespace Scaledesk\Trails\Block; use \Magento\...
0
votes
2answers
1k views

Magento 2 Override Model using Plugin

I have to override magento 2 code model file in the custom module. I have to override below method from Magento\Quote\Model\Quote\Address to my custom module and I have to change value of $amount. ...
1
vote
1answer
1k views

Magento 2 - how to get custom model from custom module

In Magento 2, how can I get a custom model that is created in a custom module (not a Magento 2 native module)? I know I can use object manager for getting and creating, and I know how do this for ...
2
votes
2answers
6k views

Magento 2 main.CRITICAL: Plugin class doesn't exist

Hi guys, I'm pretty new to Magento, so excuse me if I may be asking something obvious.   I'm trying to override function formatTxt() of class Magento\Directory\Model\Currency   I did a ...
0
votes
0answers
17 views

Magento Multi URI or translations for routers frontName in custom module

I have a custom module which response to a URL like this: https://example.com/uri-in-english It's a multi-language store so I need to set another frontName with an equivalent URL. For example: ...
11
votes
8answers
32k views

Magento 2 - How to uninstall module?

How to uninstall module ? I read this document But it was not successful, and display below: php bin/magento module:uninstall SP_Gridthumbs SP_Gridthumbs is not an installed composer package
4
votes
3answers
3k views

Magento 2: Disable all custom and Third Party Module in single Command

Is there is any way that we can disable all custom and third party Module in a single command? Currently, I am using below command to disable multiple modules php bin/magento module:disable module1 ...
14
votes
6answers
34k views

How to override .phtml files in Magento 2

I want to customize product details page, So it required to override some .phtml files in following locations. So I want to know, how to override .phtml files in vendor\magento\module-catalog\view\...
0
votes
1answer
40 views

Magento 2.3: How can I add PayPal Express Checkout integration on custom page?

I'm new to magento.I'm working on magento 2 custom checkout module due to integration with client ERP system. All of my checkout process are using custom table like custom_order_table and ...
1
vote
3answers
833 views

Resolved - Admin Grid Redirects to Front End Page Instead of Backend

I took steps according to this article but the newly created link displays the "text block" on the front-end instead of back-end. http://alanstorm.com/magento_admin_controllers/ Can anyone help me ...
0
votes
0answers
14 views

Magento2: issue with import product

I have a written individually module for importing products from an .xml file. To this time all work correct. But today when I try import product then I received error: php bin/magento offer:product:...
0
votes
0answers
16 views

How can I create custom csv from products

I want to create custom export csv with products information in everyday. Heads: 1. identifier;manufacturer;name;category;product_url;price;net_price;image_url;description;delivery_cost 2. ABC123;...
0
votes
2answers
653 views

Invalid block type while accessing the custom block (Magento 2)

Error in magento 2.0.11 while accessing custom block Invalid block type: Tomrain\Appcustomizer\Block\Customizepage #0 /var/www/html/appcustomizer-tshirt-M2/vendor/magento/framework/View/Layout/...
0
votes
3answers
3k views

Magento 2 how to get Full Action name in controller action?

My controller working but getFullActionName() not called My controller path: Magento20/app/code/Test/Module1/Controller/Index/Index <?php namespace Test\Module1\Controller\Index; class Index ...
0
votes
1answer
760 views

Exporting Full Custom Grid Data

Trying to export the full grid data of a custom module. The function itself works but there's a limit of 20 (well a limit of how many rows are visible on the page). I need to export the full data from ...
1
vote
1answer
4k views

Magento 2.2 Fatal error: Uncaught ReflectionException: error

i created a new module, after runing this command php bin/magento module:enable myFirstModule i am getting this error. Fatal error: Uncaught ReflectionException: Class Magento\Framework\App\...