Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
12 votes
7 answers
49k views

Magento2 : How to get product id to my custom module

I am new to magento2 and currently I'm building a custom module and i want to get the product ID/SKU from the catalog. I'm trying to call using a function located in the Block folder. please advise!
ming's user avatar
  • 125
0 votes
2 answers
4k views

How to fetch data from a custom table in magento2 and show in home page

I have created a custom module with a custom table, now I need to fetch the data from the table and display in the home page. I achieved it by applying object manager I know it's not the correct ...
jithin 's user avatar
11 votes
3 answers
10k views

Magento 2 How to uninstall attributes added by custom module?

So far I know that when uninstalling a custom module, it is possible to remove custom tables or columns added by custom module by using uninstall.php which extends \Magento\Framework\Setup\...
Ricky.C's user avatar
  • 2,182
5 votes
1 answer
14k views

Magento 2: Creating a custom layout

I'm having trouble creating a custom layout. I have successfully created a layout called home_page.xml which is a copy of the default 1column layout. I have selected this layout for my home page, ...
David's user avatar
  • 51
4 votes
1 answer
10k views

Magento 2: Check condition on Click of "Proceed to Checkout"

May be I need to create Event Observer. I would like to check Product's Type Condition & Display Message Accordingly on Shopping Cart Page. <event name="...
Jackson's user avatar
  • 9,969
3 votes
3 answers
8k views

Magento 2: store selector for custom module in admin form

Stuck in a new issue regarding adding store selector for my custom module in admin form - I need to add a store selector and to add the values of a store in a different table as it is working with ...
Amit Dwivedi's user avatar
  • 1,550
2 votes
1 answer
2k views

Magento 2: Server side validation not showing filled up data while error [SOLVED]

I have below code app\code\Custom\Module\Controller\MyModule\PostForm.php namespace Custom\Module\Controller\MyModule; use Magento\Framework\App\Request\DataPersistorInterface; use Magento\...
Jackson's user avatar
  • 9,969
2 votes
2 answers
2k views

How do i add product grid in customer admin section and save the checkbox values to database

I want to add product grid in Magento 2 admin customer section with a separate tab, that I got completed, but when I select the checkbox values from grid and hit save. It does not get the values of ...
Yogesh Trivedi's user avatar
1 vote
2 answers
8k views

How to change the price in quote while adding product to cart?

I want to apply a custom price for the current order. I read that I should use sales_quote_add_item, But its looks like I am doing something wrong. I found some tutorials for magento1 but not for ...
Rahul Chaurasia's user avatar
1 vote
1 answer
948 views

Magento 2: How to define Scope For Router.php

I have created Custom Module. As it requires some front-end routing, have to create Router.php Whenever I'm accessing Magento eCommece Frontend other pages, say Category/Product Page. It will call my ...
Jackson's user avatar
  • 9,969
0 votes
2 answers
2k views

Observer for Admin while creating an order

Is it possible to have an observer while making an order in the admin panel? I'm trying to change the 'purchased from' depending on which customer group the customer is in. So if a customer is in ...
user2963379's user avatar
5 votes
5 answers
9k views

Custom router is not working in Router.php Magento 2 [SOLVED]

I am trying to redirect the page/action by using a custom router as Router.php, but I am getting 100 router match iterations exception. app\code\Custom\Module\etc\frontend\di.xml <?xml version="1....
Jackson's user avatar
  • 9,969
4 votes
1 answer
2k views

Magento 2: Fatal error: Uncaught Error: Call to a member function getId()

After adding custom module on Server. It's giving below error Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/html/magento/vendor/magento/module-backend/Block/...
Jackson's user avatar
  • 9,969
4 votes
2 answers
1k views

Back-End "Save and Continue Edit" Button Works Partially

I created a custom module and the "Save and Continue" button on the back-end grid edit page works partially. Either it saves the values and doesn't stay on the same (edit) page or it stays on the same ...
bestwebdevs's user avatar
3 votes
1 answer
223 views

Create an Attribute Set and create a Product Attribute in Product Details Group for only One Attribute Set

I asked a question here about this just over a week ago, but it took a little while to edit the post to include some code. The original post and code can be seen here I am able to create an ...
Anthony's user avatar
  • 431
3 votes
2 answers
9k views

Magento 2 - Element with same id already exists

I'm trying to set the Magento 2 pager on my custom module, my custom module get the product collection and makes some special filters on the collection. I'm able to filter my products, but when I try ...
3tech - Alessandro Staffolani's user avatar
2 votes
1 answer
438 views

Magento2 : Create SOAP connection in magento custom module

I am using below code in M1 to establish the connection using SOAP:- <?php class Company_Module_Helper_Webservice extends Company_Module_Helper_Basehelper { private function ...
Purushotam Sharma's user avatar
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
2 answers
2k views

Making edits to core controllers OnepageController.php

I have attempted my first rewrite module since i needed to make some edits to a core controller. For whatever reason it is not working as the edits are not taking effect. Here are my files: app/code/...
Drewski22785's user avatar
2 votes
1 answer
1k views

Magento 2 : Custom model with EAV attributes. PUT is not working

I'm trying to figure out how works EAV attributes. So I made a simple example with API rest. Everything is working except when I call PUT function: { "sample" : { "id": 22, "name":...
Marc Pont's user avatar
  • 1,453
1 vote
3 answers
12k views

Magento custom block shows Fatal error: Call to a member function setTemplate() on a non-object

I have created one block inside my custom module but it's not working. My module is working fine but my block is not working when I call my block from footer.phtml file it shows 'Fatal error: Call to ...
monojit banik's user avatar
1 vote
1 answer
2k views

Magento 2.2 : getcollection is not working in the Block

My custom collection is not working in block file Helloworld.php <?php namespace New\MyModule\Block; use Magento\Framework\View\Element\Template\Context; use Magento\Framework\View\Element\...
Selva Kumar's user avatar
1 vote
1 answer
3k views

Magento 2 Custom Module Frontend Error

I'm using Magento 2 CE Version 2.1.0 I'm following http://www.mage-world.com/blog/how-to-create-a-simple-module-in-magento-2-0.html I have followed steps when i run it gives below error. {folder ...
Jackson's user avatar
  • 9,969
1 vote
1 answer
515 views

Magento Customer created from code not login to the website

I am creating a customer from the code for a specific group code created a new record in the customer_entity table but when I try to login from the website its shows invalid username or password error ...
mudit mehrotra's user avatar
0 votes
0 answers
145 views

Block is not getting called in custom module - Magento 2.3

I created a custom module to list all categories in a custom page. But the associated block is not getting called in the layout file. I can see the controller function is getting executed and page ...
Sayanth's user avatar
0 votes
1 answer
2k views

Magento 2: Can we call one observer in another observer?

I already have 1 observer on checkout_cart_product_add_after . Before end of $this I woule like to call another observer which is located in different module magento\app\code\Custom\Module\Observer\...
Jackson's user avatar
  • 9,969
0 votes
2 answers
1k views

I want to display my custom module table data in front page (Magento 2)

<?php namespace WebQillaModule\FinalModule\Setup; use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\Setup\...
Fareeha Rana's user avatar
0 votes
3 answers
2k views

How can i develop my custom module?

I am using magento 1.7. I want to develop my own module for my site. I need to add two tables in my database. My module is to manipulate these two tables from the Admin interface as adding, editing, ...
Amirov's user avatar
  • 441
0 votes
3 answers
3k views

Uncaught TypeError: $el.ColorPicker is not a function Magento 2

Magento ver. 2.0.18 I created a custom module in backend there is color picker options. for this i used this link color picker answer of @EmizenTech it works perfectly but some time it gives and if ...
inrsaurabh's user avatar
  • 1,676
0 votes
1 answer
439 views

Use 3rd party jQuery files in custom module Magento 2

Trying to use slick slider in my custom module All css is loaded by /var/www/html/magento2/app/code/CompanyName/ReviewRating/view/frontend/layout/reviewrating_index_index.xml I am In Developer Mode. ...
inrsaurabh's user avatar
  • 1,676
0 votes
3 answers
2k views

Magento 2: RuntimeException it is being used by another process

When I do clear cache using command line & refresh page on Frontend 1st time it gives below exception. 1 exception(s): Exception #0 (RuntimeException): The path "D:/wamp/www/magento2/var/...
Jackson's user avatar
  • 9,969