All Questions
7 questions
35
votes
2
answers
42k
views
Magento 2: Default Values for `system.xml` Configuration
In Magento 1, it was possible to
Configuration a user interface for the System Configuration section in etc/system.xml files
Set default values for those fields in the etc/config.xml files
Behind ...
10
votes
1
answer
25k
views
How to add a custom helper in my module?
How to create new Helper or override/rewrite Core Helper in Magento 2 module?
I tried adding dependency into my module.xml of Custom Module, but it doesn't load Helper class at all.
Below is my ...
7
votes
2
answers
6k
views
How to set cronjob dynamic schedule from database in Magento 2
I am working on a custom module for Magento 2. I did setup crontab there and it is working good with static schedule.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
15
votes
2
answers
9k
views
How can I set configuration values in Magento 2?
Previously (in Magento 1, that is) we created a module called Setup which contained setting for the site. The upgrade scripts looks something like this:
$installer = $this;
$installer->startSetup()...
4
votes
4
answers
10k
views
Magento 2 module "Object domdocument should be created" error
I am getting above error when I run my module in browser as:
192.168.0.106/magento-2/module1/index/index
Below is my Controller code:
<?php
namespace Company1\Module1\Controller\Index;
class ...
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 (...
1
vote
1
answer
861
views
Magento2 - Add custom javascript to 'My Account' page
I've been trying to find questions, articles, or documentation covering this, but haven't been able to find what I need or haven't understood it yet.
I have a custom module that a colleague wrote (...