Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
86 views

Admin module with as many image slots as user needs?

Something I use a fair deal in wordpress is allowing users to duplicate a field, so i provide one image slot and they can click a [+] button and get another image slot. I'm trying to make a quick ...
Chris Morris's user avatar
  • 1,517
3 votes
1 answer
675 views

How to Create Custom Grid Filter Show All "NULL" Values in Specific Column

How can I make a filter for null values of my order ID <column name="order_id"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> ...
Mike121's user avatar
  • 123
2 votes
4 answers
11k views

Magento 2: getting Full Action name inside custom Model class?

Would you please let me know best way to get the Full Action name inside custom Model class in Magento 2?
Nilesh Tighare's user avatar
2 votes
4 answers
11k views

Include external PHP library in Magento 2 module

I am trying to include an external PHP library inside my Magento 2 module, specifically the eKomi PHP library (https://github.com/ekomi-dev/ekomi-api). I have added the PHP files into the module so ...
Alex's user avatar
  • 540
2 votes
2 answers
4k views

Magento2: Checking if a module exists, after being injected via class constructor

I know I can achieve this with object Manager - but just wanted to see if there is a better way. Perhaps this case is a good candidate for using the object Manager; however, I would like to do things ...
BAF's user avatar
  • 719
2 votes
5 answers
13k views

Magento 2: Convert HTML code into PDF file and Download?

In my custom module, I have HTML code and I want to convert HTML code into PDF and after conversion download PDF. Please suggest me Magento-2 default functions or classes for Create PDF and Download.
BornCoder's user avatar
  • 1,518
2 votes
4 answers
4k views

Magento 2, preference for Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection does not work

When filters + Ancor is enabled for category, sorting by product name doesn't work. I know the fix as I tested in Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection. So now I'm trying to ...
Zinat's user avatar
  • 2,079
2 votes
2 answers
5k views

Disable module and it's output programmatically in Magento 2

In magento 1 disable module and it's output programmatically protected function _disableModule($moduleName) { // Disable the module itself $nodePath = "modules/$moduleName/active"; if (...
Prashant Valanda's user avatar
2 votes
3 answers
4k views

magento 2 custom module is not listing in admin panel

after php bin/magento setup:upgrade module is not listed. where is my mistake? File location are app/code/Test/composer.json { "name": "test/banners", "description": "Test Banner For test",...
Qaisar Satti's user avatar
  • 32.5k
2 votes
2 answers
338 views

JSON request to controller giving error invalid form key

I have a custom module with a button in the admin that i want to call a controller class on click. My phtml file contains this JavaScript : <script type="text/javascript"> require([...
gazZz's user avatar
  • 97
2 votes
3 answers
1k views

Get all Module list with status - whether it's enable or disable in Magento 2

I tried below code which gives me all modules name not specifying the status whether it is enable or disable. __construct public function __construct( \Magento\Framework\Module\ModuleList $...
Aditya Shah's user avatar
  • 7,647
2 votes
1 answer
13k views

How to add JS messages from custom module?

How do I add messages using Magento 2 Ui messages to page via javascript from a custom module? I have found a file in Magento/Ui/view/frontend/web/js/view/messages.js that appears to be responsible ...
LM_Fielding's user avatar
  • 1,563
2 votes
1 answer
2k views

How to handle multi level array as input parameter from custom POST webservice in Magento2

We have request to create custom REST webservice for creating gift orders and we are successfully able to create order for single item but facing issues on taking multi items as input. Can anyone ...
amit's user avatar
  • 145
2 votes
2 answers
7k 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 ...
Jelle Siderius's user avatar
2 votes
2 answers
4k views

Magento 2 - Got Error in Adminhtml Controller

I am trying to create custom module in magento2. I got below error while click on the menu in admin. it seems my admin controller not configured properly. Can anyone help me in this issue. Fatal ...
Priya Ponnusamy's user avatar
2 votes
3 answers
7k views

Magento 2 - Add custom logic after Order creation

I've tried to push orders data to 3rdParty webservice. I created observer for event sales_order_place_after - order Id is missing there. I believe it's not a bug - order is not saved in database. ...
wkaminski's user avatar
2 votes
1 answer
4k views

Check If JQuery Is Already Included In Head

I want to check if jQuery is already included on the page. I have seen several methods and finally settled on the following: if ( (typeof jQuery === 'undefined') || !window.jQuery ) { document....
Jongosi's user avatar
  • 1,531
2 votes
3 answers
2k views

Magento 2.3 Image upload field on CMS Page

I followed the steps from the following post (Magento 2 : Add Hero Image Upload Field on CMS page) to create an image upload field on the CMS page. I managed to create the field on the CMS page, as ...
Remco Hendriks's user avatar
2 votes
3 answers
3k 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 ...
Miguel's user avatar
  • 569
2 votes
3 answers
4k views

Magento 2 : Check Static Block with same identifier in InstallData Script

I am creating module which will create static block & cms page at time of site transfer. So my InstallData file like below : class InstallData implements InstallDataInterface { /** * @var ...
Mage2 Developer's user avatar
2 votes
2 answers
3k views

How to override getSectionData() method of magento-checkout CustomerData/Cart.php?

Is it possible to overwrite "public function getSectionData()" of class magento-checkout/CustomerData/Cart.php only with the help of Plugin My di.xml <?xml version="1.0"?> <config ...
Ashish Jagnani's user avatar
2 votes
1 answer
2k views

How to Create a excel file in custom module?

I want to create an excel format file for download in Magento 2 <item name="buttons" xsi:type="array"> <item name="add" xsi:type="array"> <item name="name" xsi:type=...
Nitesh Kumar  Singh's user avatar
2 votes
1 answer
1k views

Magento 2 : How to get collection of all sources "MSI (multi source inventory)?

I have created a custom module and on my custom page, I want the collection of all the sources available on my website. Let's assume I have created 3 sources from backend like "US", "UK", "INDIA". ...
Utsav Gupta's user avatar
  • 1,243
2 votes
2 answers
9k 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: |-...
treyBake's user avatar
  • 141
2 votes
3 answers
4k views

Create custom route in Custom module magento 2

How to create a custom route in Magento 2 http://127.0.0.1/magento8/trails/post/view/id/13 module:- trails folder :-post controller :- view argument :-id/13 I want to http://127.0.0.1/magento8/...
Nitesh Kumar  Singh's user avatar
2 votes
3 answers
1k views

<sequence> not working?

I've made a script in a custom module that is dependent on customer-data.js, a .js file initiated by Magento_Customer. So, what I did in my module.xml: <config xmlns:xsi="http://www.w3.org/2001/...
Condor's user avatar
  • 647
2 votes
1 answer
911 views

Magento 2 can I have 2 front names for a module?

I want to create a module for which I would like 2 frontName is it possible. if yes how can I do it ? Example 1. example.com/a/index/test 2. example.com/b/index/test both pointing to app/code/...
Arun Karnawat's user avatar
2 votes
2 answers
6k views

Magento 2 Set Array Data in Controller and call in PHTML

Controller public function execute() { $bags_result = array( 'height'=>$height, 'weight'=>$weight ); $result =...
Slimshadddyyy's user avatar
2 votes
4 answers
9k views

Magento 2 how to make go back button on custom admin page?

I have a custom module with an preview of orders with custom functionality. But on that preview page i want a 'Go Back' button to go back to the main overview of orders. Is there a way to add such a ...
sander758's user avatar
2 votes
2 answers
166 views

Store Locator Module suitable for mobile

We have +3000 store locations to show on a map. The store locator module we are using right now works fine on a desktop view, but when we open it on a phone it's taking between 40 seconds to 2 ...
J Plana's user avatar
  • 337
2 votes
2 answers
3k views

Custom module does not get its classes loaded

I'm trying to create a module for my Magento 2 installation because I need to change some behaviours. I followed this guide to build a module which basically (at the moment) just wants to override a ...
Gianluca Gillini's user avatar
2 votes
1 answer
664 views

Magento2 custom module downloaded by composer at two places

I have hosted my custom module on bitbucket, and using satis proxy between comopser and bitbucket. The problem is, when i use the command composer require vendor/module, it downloads the module at two ...
Taral Patoliya's user avatar
2 votes
1 answer
406 views

Magento : url structure

Please explain what is the meaning of this statement in Magento $this->_redirect('*/*/');
PankajR's user avatar
  • 210
2 votes
2 answers
1k views

Build Magento module from the command line

looking at the output of mage shell script it seems that it is possible to build a module via the command line. Does anyone have and idea how i can do it? Connect commands available: =================...
Evgeni Ivanov's user avatar
2 votes
1 answer
1k views

Magento 2: Add multiple products to cart programmatically does not work if cart is empty!

I have the same problem as mentioned in this Question: Magento 2: Add multiple products to cart programmatically But it was never answered. This is my Controller.php: <?php namespace MassiveArt\...
Felix Schönherr's user avatar
2 votes
1 answer
4k views

Magento 2 How to add grid/phtml file on Slide out panel [ popup modal ] in custom grid action?

Here is the link of what I expected to do in my custom module http://admin-actions-log-m2.demo2.amasty.com/_router/redirect/admin-actions-log-m2/index.php/admin/amaudit/actionslog/index/ just open ...
Mohit Rane's user avatar
  • 1,964
2 votes
2 answers
1k 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/...
Sammu Sundar's user avatar
2 votes
2 answers
1k 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 ...
CJNotts's user avatar
  • 412
2 votes
2 answers
1k 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 ...
Utsav Gupta's user avatar
  • 1,243
2 votes
1 answer
2k 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 ...
Utsav Gupta's user avatar
  • 1,243
2 votes
1 answer
1k views

Magento 2: How to stop event/observer if another already ran

I have 2 events running if subscribe to newsletter is checked on the checkout page. sales_model_service_quote_submit_success newsletter_subscriber_save_after Can i prevent event #2 from happening if ...
Kasper Morberg Bang's user avatar
2 votes
1 answer
2k views

How to extend the checkout Success block?

In module-checkout, there are 2 blocks as below. I am working to show a custom success page so which one we have to override? what is the correct way? Magento\Checkout\Block\Onepage\Success and ...
Suman Singh's user avatar
  • 1,007
2 votes
3 answers
782 views

Installation issue in magento marketplace 'page doesn't contain HIT in cache header.'

I have developed customer module in magento. When i am trying to submit in marketplace its keep giving the same error even after trying so many solutions. Installation issue: http://magento.dev/gear....
Pramod Kumar Sharma's user avatar
2 votes
1 answer
8k views

Missed required argument request in parent::__construct call

I'm working on a Magento module for the past month, and everything works great on my local machine. Then I decided to release the module as a beta and test it online in a newly installed store, and ...
Pablo's user avatar
  • 237
2 votes
4 answers
2k views

Magento 2 Update custom module Admin form throws error

This is my function, if i update it without image it throws the an error . Update with image it works Fine. How to fix this ** 1 exception(s): Exception #0 (Exception): Notice: Array to string ...
Magento 2's user avatar
  • 3,834
2 votes
2 answers
1k views

What is the structure of the $data array in Magento 2?

I am studying/developing a module for Magento 2. I created an observer for a specific event and now I'd like to collect some data such as Customer information and Product information. I know I can use ...
Tony Morello's user avatar
2 votes
1 answer
60 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 ...
xanka's user avatar
  • 2,114
2 votes
1 answer
3k views

Magento2 - A simple custom API module

I have a problem when I create a new custom API module, my module is below: Content of : CalculatorInterface.php <?php namespace Tohq\Webapi\Api; interface CalculatorInterface { public ...
MrTo-Kane's user avatar
  • 3,674
2 votes
1 answer
3k 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"> <...
Qaisar Satti's user avatar
  • 32.5k
2 votes
3 answers
2k views

How can i add existing customer in BCC or CC while sending new customer account creation welcome email in magento2?

How to add some existing customer's emails in BCC or CC in welcome emails in magento2 ?
shownak shah's user avatar

1
5 6
7
8 9
29