Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
148 votes
5 answers
12k views

How to write a custom extension?

Because I had a lot of issues lately with free and commercial extension I've decided to ask this question and answer it with the steps I usually follow when writing an extension. Feel free to edit the ...
Marius's user avatar
  • 199k
1 vote
2 answers
2k views

Zend framework is deprecated in magento 2.4.6

I have just upgraded my Magento version from 2.4.0 to 2.4.6 and it is giving this error while opening admin. please suggest any solution 1 exception(s): Exception #0 (Exception): User Deprecated ...
Tisha Jhanwar's user avatar
2 votes
1 answer
413 views

Call to a member function isGlobalScopeEnabled() on null

I have just updated my magento version from 2.4.0 to 2.4.6 and i am getting this error on frontend.Please suggest any solution. Also i have custom theme but i am not getting why this error is occuring....
Tisha Jhanwar's user avatar
0 votes
2 answers
256 views

There are no commands defined in the "setup:cron" namespace after upgrade to Magento 2.4.6-p3

After upgrading to magento 2.4.6-p3 in system.log and cron.log it is generating same error daily i.e - main.ERROR: There are no commands defined in the "setup:cron" namespace. Did you mean ...
Tisha Jhanwar's user avatar
0 votes
1 answer
159 views

Compilation from source: LESS file is empty:

I have upgraded my magento version from 2.4.0 to 2.4.6-p3 and in exceptions.log file i am continuously getting one error i.e main.CRITICAL: Magento\Framework\View\Asset\ContentProcessorException: ...
Tisha Jhanwar's user avatar
2 votes
0 answers
2k views

Magento 2: Create a custom module for banner slider

I want to create a custom module for banner slider in Magento 2. Could anyone please guide me? Looking forward to hearing from you.
MagentoDev's user avatar
8 votes
10 answers
9k views

How to create simple module in magento 2

I'm new to magento2. I want to create simple Hello World module in magento 2. How to create this module?
Saravanan DS's user avatar
  • 1,126
1 vote
2 answers
857 views

Magento 2. Failed to submit module to Magento Marketplace. setup/config/application.config.php failed to open stream

I am unable to submit a new module or update a existing module in the Magento Marketplace. For all modules/new versions, I get the error during the Technical Review at the Installation & Varnish ...
Victor S.'s user avatar
  • 320
14 votes
3 answers
2k views

Magento 1: improving my module development workflow (Modman, composer, git)

This is something I've had in mind for quite some time but I can't find the right method to do it. So basically, I'm working with 6 different websites, all running Magento CE 1.9.2+ On those ...
Raphael at Digital Pianism's user avatar
9 votes
6 answers
2k views

Magento 2: Changing Price of Product in Controller doesn't work at the moment!

I tried to change the Price of my Products like this: Controller.php: [EDIT] <?php namespace MassiveArt\ShoppingCart\Controller\Index; use Magento\Catalog\Model\ProductFactory; use ...
Felix Schönherr's user avatar
0 votes
0 answers
110 views

Magento 2 Remove Tier Price using Plugin

How to remove tier price using plugin ? I have no idea how to remove this price :(
Darshit Parmar's user avatar
1 vote
2 answers
2k views

Magento 2 - How to allow certain html elements in system.xml config field?

I try to add this HTML (<span style='color:red'>*</span>)to the content of a field with type text. But the html is getting stripped. How can I allow all secure html elements but disallow ...
Black's user avatar
  • 3,431
3 votes
6 answers
514 views

Magento 2.3: How can I get the customer ID with PHP?

I am trying to get the items of the cart as well as the customer ID in my Module. But the problem is that I don't know how to get the customer ID properly. In the Moment I have this Code and it works:...
Felix Schönherr's user avatar
16 votes
2 answers
9k views

How should I licence my module?

I have a module which I have written for my company. It takes data from our back office solution and imports it into Magento. It also takes orders from Magento and imports them into the back office ...
webnoob's user avatar
  • 987
3 votes
2 answers
1k views

How can I add a custom button by using a custom module in Magento 2.3?

I wanted to add my own button in the Shopping Cart as I tried to show you in the screenshot. But I didn't find a tutorial that worked for me. Do you have any idea how I can do this? (I want to make ...
Felix Schönherr's user avatar
28 votes
3 answers
5k views

What is the difference between an Extension and a Module?

What is the difference between an Extension and a Module? Just curious to know that what is the right term to use when we extend Magento's functionality by creating our custom code in local folder.
piyush_systematix's user avatar
1 vote
2 answers
2k views

Controller 404 Page Not Found [Extension Dev]

I am learning from tuts+ premium tutorials. i am using this link to get some output http://127.0.0.1/folder/mage3/index.php/demo/index/sayHello my xml file in config.xml <frontend> <...
atifaltaf's user avatar
  • 122
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
3 answers
4k views

Magento 2 - How to override module from vendor?

I try to change some "view" files from a module called Amasty_MegaMenu. I installed the module via composer. It is located in vendor\amasty\mega-menu. So I created app/code/Amasty/MegaMenu with ...
Black's user avatar
  • 3,431
3 votes
2 answers
982 views

Controller URL does not work

I have the problem that i always get the error 404 not found, if I want to get the url of my controller. This is my filestructure: And this is the URL I am trying to get loaded: http://localhost/...
Felix Schönherr's user avatar
4 votes
1 answer
12k views

Magento 2 System Config Enabled Yes/No

I would like to add module On/Off option in Configuration for custom extension. I have used below code and add into my system.xml but when I select option No module is not off. <field id="active" ...
Hitesh Vaghasiya's user avatar
0 votes
2 answers
649 views

Magento 2.3.5p2 - Invalid security or form key. Please refresh the page after installing banner slider

I downloaded BannerSlider from GitHub and pasted the files into the app> code> Magestore. in the admin panel, it showing the manage options but when I click it says Invalid security or form key....
Maksood's user avatar
3 votes
1 answer
2k views

Magento 2: After adding products to cart programmatically, cart is not refreshing until reloading page

Hello Magento 2 Friends. I have an ajax call to an controller, which adds some new products to the cart programmatically. This works fine, but the problem is that the cart and the mini cart are only ...
Felix Schönherr's user avatar
10 votes
1 answer
3k views

Magento2 : How to hide a Product from a specific Customer Group?

I want to create an extension that will hide a product from a specific customer group.
Toto Memeng's user avatar
  • 1,255
0 votes
4 answers
10k views

Magento2: Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity

I added one custom HelloWorld module in a fresh Magento 2 installation and I got the following error: Warning: DOMDocument::loadXML(): Extra content at the end of the document in Entity, line: 8 ...
Mukesh Chapagain's user avatar
14 votes
4 answers
3k views

When to dispatch events in a custom module?

This is a question regarding both Magento 1 and Magento 2. I understand that, as a good practice, 3rd party modules developers are encouraged to dispatch events in their custom module to make it ...
Raphael at Digital Pianism'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
0 votes
1 answer
271 views

Magento Data Migration Tool For Third Party Extension or Custom Modules

I have done default migration using Data Migration Tool. Now I want to migrate data of my custom module for that I am following below link: https://devdocs.magento.com/guides/v2.4/migration/extend-the-...
Yogita's user avatar
  • 784
2 votes
1 answer
1k views

Magento 2 add custom button next to cart button

I want to add a button next to the cart showed in the screenshot. Any ideas how to achieve this? (EDIT) Only need to know what to write in the layout.xml This is the current XML code <?xml ...
Felix Schönherr's user avatar
1 vote
2 answers
6k views

Create a custom category attribute and add it to the menu

I want to add a custom attribute to categories in menu. If, in Mage_Catalog_Block_Navigation.php in function _renderCategoryMenuItemHtml I transform $html[] = '<span>'.$this->escapeHtml($...
Claudiu Creanga's user avatar
3 votes
3 answers
2k views

Magento2 Delete config row while Extension Uninstall

I have created a custom module which is being installed via composer. When I run the command - php bin/magento module:uninstall Vendor_Faq It is removing all the corresponding tables which I wrote ...
Gagan's user avatar
  • 1,478
1 vote
4 answers
486 views

Can't override Mage_Review_Block_Product_View class

I'm trying to extend Mage_Review_Block_Product_View but my new class is not called... I think it could be a typo, but I can't find it. It is not a issue related to the code inside my class, but to ...
danipen's user avatar
  • 221
3 votes
2 answers
761 views

How do I disable all non-core modules in Magento 2? (in 1 step)

Suppose I want to go back to the code state where only M2 core modules are active. question: How do I disable all non-core modules in Magento 2? (in 1 step)
snh_nl's user avatar
  • 5,452
0 votes
2 answers
1k views

Installed module not visible in admin - Magento 2.3.2

I've installed a module and while the CLI says that the module is installed, the schema in the db has been created and the module has a record in setup_module it doesn't show up in the admin. When ...
Matthew's user avatar
  • 183
2 votes
3 answers
377 views

Error (Version not found) when uploading package to Magento Connect

I am facing a problem to upload version in magento connect extension. When I am trying to upload the package file for the extension, it's giving the following error. An error occurred during upload ...
Magento Devloper's user avatar
2 votes
3 answers
3k views

Programmatically installing a module

I need to install modules so that the database changes happen. I can't just let it be an install on logging to admin type of approach as I have a bash script that I am using to provision my test ...
Quantum's user avatar
  • 553
0 votes
3 answers
8k views

Magento 2 - add Enable / Disable field for custom module

I want to add some fields in the Magento 2 Admin Panel for my custom module and then I want to check in the phtml file if this field is have value or not. I need to add this fields: - enable / ...
Robert's user avatar
  • 2,186
6 votes
3 answers
2k views

Extensions charging more for enterprise?

Why are Magento extension providers charging extra for enterprise versions of their modules? I have a pretty good idea that the codebase for both of the module versions will be identical so where ...
Marty Wallace's user avatar
0 votes
1 answer
212 views

Magento 2 Module Development Workflow

What is the most Optimal Development Workflow using Magento 2.3.5 in 2020? I've got a Task to create Magento 2 Module. When i upload the written code to server the page doesn't update the code (CSS ...
Piotr's user avatar
  • 13
3 votes
1 answer
2k views

Magento 2.2 - Problem with Helper class not found in custom module

I'm creating a payment module and I'm having a curious problem. I started by creating the module inside the app/code/Vendorname/Payment folder for convenience. It is not yet complete, but the system....
Denis Spalenza's user avatar
1 vote
2 answers
713 views

How to determine if custom extension has frontend page/controller

I'm working with a custom extension that was developed for our site by our previous developer some time ago. The extension was fully built out and met the company's needs at the time however there is ...
sparecycle's user avatar
  • 1,479
0 votes
2 answers
1k 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 ...
Kishore Patra's user avatar
2 votes
2 answers
1k views

Magento 2: Layout override sequence custom theme vs extensions

I created a custom storefront theme and override the catalog_product_view.xml file in my custom theme. Below is the path. app\design\frontend\Akhilg\custom\Magento_Catalog\layout\catalog_product_view....
Akhil Gupta's user avatar
  • 1,956
7 votes
1 answer
841 views

Best way to replace the die function?

I have the following Magento code : protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') { $response = $this->getResponse(); $response->...
Robert's user avatar
  • 2,186
1 vote
2 answers
120 views

Magento 2 - site looks destroyed after installing a new module

I installed a very simple hello world module which works. php bin/magento module:enable black_test php bin/magento setup:upgrade However, now my site looks destroyed. The module is working fine, it ...
Black's user avatar
  • 3,431
5 votes
3 answers
6k 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 ...
WaPoNe's user avatar
  • 1,612
2 votes
1 answer
798 views

Magento 2 I want to set a custom price of a product programmatically but only for this one session

I have a little problem because I first add some products into the cart -> this is working. But I also need to change the price of this products I add. The problem about that is, that I only want to ...
Felix Schönherr's user avatar
2 votes
3 answers
276 views

Unable to display "Hello World" from custom module

I am following the book: Getting Started with Magento Extension Development. And I'm unable to make my extension echoing "Hello World". I believed there are 3 area I need to take care: active the ...
Yeo's user avatar
  • 345
0 votes
1 answer
152 views

Is there any free EMI calculator extension in Magento 2? [closed]

I like to know is there any free EMI calculator extension in Magento 2? Thanks
Kowsigan Atsayam's user avatar
1 vote
2 answers
3k views

Magento 2: Warning: array_merge(): Argument #1 is not an array vendor/magento/framework/App/Config/Initial/Converter.php on line 78

I have developed a module store view pricing in which I have edited price attribute's scope. Whenever I install that extension of time below warning populates during setup: upgrade in the command ...
Sameer Bhayani's user avatar