Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [module]

Questions about developing custom modules

0
votes
1answer
16 views

Magento2 custom module installed but not working

have created a module and it works fine on staging and locally but not on live. The module is installed correctly and enabled. The live config.php and the staging config.php are the same. I used the ...
0
votes
1answer
13 views

whats is wrong when i tried to insert a custom attribute programatically?

I have the following code : <?php namespace Vendor\Extension\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use ...
0
votes
1answer
16 views

Magento 2 Overwrites Topmenu.php In Module But Menu Nav Disappears

My di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <...
0
votes
3answers
23 views

Add module Enable/disable functionality in Magento 2

I want to add Enable/disable functionality in my custom module by which the module can be enabled or disable directly form admin-panel for just selecting. I want to add something like this in my ...
0
votes
1answer
12 views

How can i create a custom page for product listing in magento 2

i have created a module and i got the respone in phtml but dont know how to design it same as listing help me to create a custom page for product listing in magento 2
0
votes
1answer
31 views

including dependency in magento

I was trying to publish one extension to magento marketplace Things are a fork of tinypng and I can see the dependency of tinypng module is automatically pulled by composer, but where they are ...
0
votes
0answers
33 views

Magento 2 module not working on live

I created a custom module but it doesn’t work on live. On staging it works fine. The module is installed and enabled. I also checked config.php and setup_module table, run bin/magento module:status ...
1
vote
1answer
17 views

How to mention the magento version compatibility in composer.json

I am creating a module in Magento 2. Now I am writing composer.json. Here I write supporting PHP version "require": { "php": "~5.6.0|^7.0.0", }, How do I write my module will be supported by ...
0
votes
1answer
18 views

magento 2 add custom fields to checkout form below shipping address form

i have added custom fields (GST Refund ) to my checkout form but they are showing above "shipping new address form" Screenshot below I want to show it below address fields something like below code ...
1
vote
0answers
8 views

How can I add a 3rd party dependency in a custom module?

I'm building a module which requires a 3rd party library, how can I make the 3rd party library available to the module without without adding it to the composer.json magento root file? I added it ...
0
votes
1answer
44 views

Magento 2.3.0 Get Country Name

I'm trying to insert the current store country name through a CMS Page/Block by following this article. I've created a Block file countryname.php in app/code/Vendor/Countryname/Block with the ...
0
votes
3answers
51 views

Get Store Information Magento 2.3.0

Using Magento 2.3.0 with php7.1 I'm trying to use this module to get store information. I have modified the folder names as such app/code/Vendor/SiteInfo/Block/SiteInfo.php And used the following ...
0
votes
2answers
24 views

Have a option to enable/disable the module. I need to load admin page css when my module is enabled. No need to load css while module is disable

I write css in path app/code/my/module/view/adminhtml/layout/default.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
1
vote
1answer
30 views

How to restrict allowed catalog image extensions?

I created a module that overrides ImageUploader like so: <preference for="Magento\Catalog\Model\ImageUploader" type="MyCompany\MyModule\Model\Catalog\ImageUploader" /> The code looks ...
0
votes
1answer
26 views

Deleted ShipperHQ module causing error in “All Customers” section of Magento 2

I'm currently trying to build a Magento 2 site to replace an existing Magento 1 site. As we currently use the MatrixRates Module we decided to give ShipperHQ a try but ultimately decided against using ...
1
vote
1answer
30 views

Magento 2 - Plugin to run only when function is called from specific module

Is there any way that I can specify that a Plugin X only runs when the class is called from Module Y? So that if same function is called from other modules the Plugin is not called.
2
votes
2answers
58 views

Create magento 2 Patch

I am working on Module that require quick fix. As I assume I can fix this by creating Magento 2 Patch way. I never created a Patch file before, Can anyone help me How can I create Patch file for ...
0
votes
2answers
34 views

Magento 2 module error after version upgrade

I was recently trying to upgrade our Magento from 2.2.5 to Magento 2.2.7. I thought I succeeded but we're currently getting the following error: There has been an error processing your request ...
0
votes
1answer
29 views

Why getParentsIdsByChild($productId); is returning empty for Child product?

I'm trying to get parent products id for child products but i'm getting empty result. <?php namespace CustomColumn\Addproductcolumn\Ui\Component\Listing\Column; use Magento\Framework\View\Element\...
0
votes
1answer
34 views

Custom script results in Call to a member function on null

I use the following script to update the stock levels of products from a csv. Worked well until recently, where I created a custom observer where I am checking if the product save occurred in the ...
0
votes
0answers
15 views

display button toolbar on custom admin page

I'm working with Magento 2.3. I have a custom admin page which I made following this tutorial - https://devdocs.magento.com/guides/v2.3/ext-best-practices/extension-coding/example-module-adminpage....
0
votes
0answers
38 views

Magento 1.9 cron jobs runs every 5mint but its configured for every 1 minute

Through cpanel I have configured cron.sh to run every 5 minutes (working). I have added a custom module meant to run every 1 minute (code below). The issue is that the cron is not running every ...
0
votes
0answers
39 views

Magento 2.2 Grid in custom module missing styles and format

We've successfully created a custom module, but it appears that none of the js or css/less is being applied to a grid component that is being used. Any suggestions would be appreciated-
1
vote
3answers
127 views

Crontab Magento or Crontab System?

I have a question, magento uses a cron own or uses the cron of the same operating system? And how could I configure it to make a cron of a specific module? In my case I want to export every "x" time ...
-2
votes
1answer
40 views

Magento 2 How can I create two different sections under the same tab item in admin menu?

I have created two different modules, now I want to create one tab in admin system configuration and show both modules configurations in different tabs. I have two different modules within same "...
0
votes
0answers
28 views

Customer Custom Attribute gets deleted upon update in Magento 2

We are facing an issue while updating customer information from Customer My account section on frontend that is Customer Custom attributes gets deleted upon update or save customer information. For ...
0
votes
1answer
24 views

Database Changes Don't Reflect in Frontend

I have a module that allows the user (so far) to add and remove a bike from their garage. I built my controllers (triggered via an AJAX call) and they seem to work alright. The only problem is, ...
0
votes
1answer
39 views

Magento 2.2.6 - Change the product name title

how I can change products name attribute. I create a new attribute second_name and I assigned to all products, now I want this attribute to replace the default name attribute. I need to change this on ...
0
votes
2answers
53 views

Magento 2 How to hide price from front end with custom module?

I have created one module and it has system configuration on the admin side, where the admin has the functionality to enable/disable the module. As per system configuration, I need to hide the price ...
1
vote
2answers
44 views

Magento 2.3 Can't view module's front end page output?

I'm a bit of a noob when it comes to module development for Magento 2, and I need some help: I've started developing a module (for testing purposes) on a localhost installation of Magento 2.3. Now, I ...
0
votes
2answers
42 views

Magento 2 How to override “\vendor\magento\module-checkout\view\frontend\web\js\view\billing-address.js” in our custom module?

I want to disable "New Address" option from billing address drop down. here i got the code to disable it. we just need to comment the below code : addressOptions.push(newAddressOption); and it will ...
1
vote
1answer
27 views

Magento 1.9.4 override Inventory tab template

I would like to override the template file used for the inventory tab in admin product edit section. This is located by default at: /app/design/adminhtml/default/default/template/catalog/product/tab/...
1
vote
2answers
36 views

Module JS - Mismatched anonymous define module

I've tried adding my module JS file to Magento2 but for whatever reason it seems to return this error: Error: Mismatched anonymous define() module: function($) My view/frontend file structure: |-...
3
votes
1answer
35 views

Interceptor does not Exist

Hello guys , I am currently on magento version 2.3.0 and I am getting this error whenever I try adding a product in my admin panel. Can someone kindly assist me . After running php bin/magento setup:...
0
votes
0answers
18 views

Magento 2. trying to hide Price while not logged In [duplicate]

I am trying to hide the price n its works perfectly but the issue is the price cannot be hidden for limit price. Dangs/Hideprice/etc/adminhtml/system.xml <?xml version="1.0"?> <config ...
2
votes
1answer
58 views

Magento 2 . How to hide 'Add to cart' button while not logged in

This is how I tried but its not working Bodak/DisableAddToCart/etc/adminhtml/system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
10 views

Magento 2 Adding non category Submenu

I have created a custom menu link using few examples one of them is:Adding a non-category link to the navigation links in magento 2 This is how I've added first level menu: ... $...
0
votes
0answers
30 views

Magento 1.9.4 add custom dropdown field to inventory tab

Currently in magento when you manually change the quantity of a stock managed product in the admin there is no reason assigned to this. So, what I would like to do is add a dropdown field below the ...
2
votes
1answer
57 views

Magento 2 Create observer on customer create, with custom module

I want to create an observer in my custom module which called when new customer create and delete. In my custom module i want to add custom data when customer created and delete custom data when ...
0
votes
1answer
20 views

Magento Custom grid sort issue

Dear community I have made a custom module that will allow stock movement history to be kept for products. However, as illustrated below: figure 1; pressing edit on an order in the admin order view, ...
0
votes
0answers
29 views

How to regenerate var/package folder, If I deleted by accident?

I have deleted all files from var/package. Now I can't able to update the modules from Magento connect manager (Installed modules not listed). Please help me how to regenerate the XML files.
0
votes
1answer
21 views

Magento 2 How to send order email copy to custom email address with custom module when order placed?

I have one module where i can set email address in back end. When order placed i want to send that order email copy to my custom email address which is set in backend. I want to add an observer when ...
0
votes
1answer
33 views

Getting a table first row from repository

I'm building my first Magento 2 module, and I'm a bit stuck. First of all, this is what I have so far (I'm still fixing the coding standards on all the pages). https://github.com/moloni/magento2 I ...
0
votes
1answer
20 views

Change product price based on stock quantity in magento 1.9

I have a situation where the product price should change based on the number of items on inventory. Example, if the stock has > 10 item then the product price should be some special price like 100$. ...
2
votes
1answer
25 views

Magento 1: How to add a system configuration setting of custom module under the second module tab in admin?

I have two modules with same vendor name. I want to display the second module system configuration setting under first module tab in admin. Do you guys have any idea? Here are my system.xml files for ...
0
votes
1answer
30 views

Magento 2 custom module Collection join table _initSelect

My Collection.php .... public function __construct( \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, ...
0
votes
1answer
35 views

From a plugin how can I override a different plugin template file.?

I'm really new to Magento. How can I override a modules templates files from another module ? I have this file: /app/code/Amasty/Shopby/view/frontend/templates/layer/filter/swatch/default.phtml ...
0
votes
2answers
49 views

Magento 2 Sequence - Multiple Modules Overriding Same Template

I am using Magento Commerce 2.2.6 running in developer mode. I have multiple modules that are overriding the same template via the setTemplate action in layout xml. I am using sequence in the ...
0
votes
1answer
16 views

Need help finding a wholesale pricing solution based on discounting list price rather than marking up cost

I am about ready to launch a new M2 store and the website will have two stores. One for retail sales and one for dealer sales. I need to be able to set the pricing in the dealer store to be based on ...
0
votes
2answers
49 views

How to print order details for event observer sales_order_save_after

want to print order details and product details (variants) which are ordered. My xml file <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...