All Questions
22 questions
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 ...
16
votes
5
answers
19k
views
How to "add to cart" a product with custom input field and save it to Database?
I had created a custom module in which I am overriding the add to cart form on the product page, and I successfully did it with catalog_product_view.xml file. Now I can see a custom input field on the ...
6
votes
1
answer
10k
views
Module created gives Error filtering template: {Classname} does not implement BlockInterface
I need a way to show products from a category and created a module following the advice of this answer of Marius (https://magento.stackexchange.com/users/146/marius) here: Magento 2: get product ...
3
votes
1
answer
1k
views
How to properly override a core JS file in Magento2
We are attempting to override the behavior of Bundle Products in Magento2, specifically, to enable user defined quantities for Checkbox type products within the bundle.
We have written an extension, ...
1
vote
2
answers
3k
views
adding new admin page to backend(magento 2)
I can get into the execute() function if I do not run the construct function. but I cannot find the bug in my __construct function.
The file is \app\code\Cleargo\Contactus\Controller\Adminhtml\Grid\...
4
votes
2
answers
1k
views
Magento 2: good practice regarding custom module README.md
As you may have noticed, every Magento 2 core module contains a README.md file.
Example for the Magento_Catalog module:
Magento_Catalog module functionality is represented by the following
sub-...
5
votes
3
answers
4k
views
Magento 2: how to set grid getRowUrl via the uiComponent
In my current Magento 2 module developement, I currently have the following code in my Grid.php file:
public function getRowUrl($row)
{
if ($id = $row->getMageProd()) {
return $this-&...
1
vote
0
answers
210
views
Magento 2: how to use a custom renderer in grid uiComponent for a column? [duplicate]
In my current Magento 2 module developpement, I currently have the following code in my Grid.php file:
$this->addColumn('image', [
'header' => __('Image'),
'align' => 'left',
'...
6
votes
4
answers
8k
views
Magento 2 : override customer login.phtml file in custom module
I had developed "Hello world" extension in Magento 2.
I want to override Customer login form of core files. What is correct way for overriding Customer login form file in Magento 2.
I have coded ...
10
votes
2
answers
9k
views
Magento 2: how to create your own custom cache type?
In Magento 1, it was possible to create your own cache type by declaring the following in your config.xml:
<global>
<cache>
<types>
<custom translate="...
7
votes
3
answers
4k
views
Magento 2: update an existing backend menu item
Let's say there's a module that declares a custom admin menu item via menu.xml like this:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
23
votes
2
answers
2k
views
Magento 2: what are the benefits of using UI grid components over the standard Grid.php?
So Magento 2 introduced the UI Components.
One of them is the UI Component Grid (you can find more information about it here: Explanation of UI Component Grid in Magento 2)
When creating a custom ...
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 ...
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
128
views
Magento2 error when trying to create a record in db
I have the following resource model.
namespace Vendor\Gift\Model\ResourceModel;
class GiftInformation extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
protected function _construct(...
1
vote
2
answers
3k
views
New Magento 2.0.0 module gives error: Setup version not specified
After creating a new module in Magento 2.0.0,
I am getting this below error:
a:4:{i:0;s:64:"Setup version for module 'Trimantra_HelloWorld' is not specified";i:1;s:2337:"#0 /var/www/html/magento/...
2
votes
3
answers
2k
views
Unable to overwrite Contact Form in Magento 2
I'm trying to overwrite contact form but it's unable to overriding. For this I have followed below steps.
Step 1) app/code/Learning/Contact/composer.json
{
"name": "learning/contact",
"...
4
votes
4
answers
4k
views
Magento 2.0 Stable - Enabling Custom Module gives error
Download
Today I downloaded the Magento 2.0 Full Release from the Magento website. I downloaded the Full Release with Sample Data (ZIP with sample data) and installed it. I wanted to test if my ...
1
vote
1
answer
59
views
unable to enable custom module in Magento ver. 2.0.0-rc
I have created custom module in Magento ver. 2.0.0-rc and I'm trying to enable by using below commands.
php -f bin/magento module:enable --clear-static-content Learning_Custom
php -f bin/magento ...
25
votes
7
answers
19k
views
Magento2 CLI module:enable gives error "Unkown module(s)"
In Magento2 I've built a simple custom module and want to enable it by CLI:
bin/magento module:enable Vendorname_Modulename
But it is giving me the following error:
Unknown module(s): '...
7
votes
1
answer
10k
views
Magento 2 - Sample module displays blank page
I'm using Magento 2 version beta-1.0.0 and trying to create a simple new custom module. The custom module works but is showing a blank page on body content.
The module done in below way.
Folder ...
1
vote
1
answer
3k
views
"Setup version for module 'xxx' is not specified" [closed]
I've been trying to get up to speed on how to build Magento 2 modules using the merchant beta but when building a module I'm getting stuck at the error message in the title.
From what I've understood ...