Questions tagged [module]

Questions about developing custom modules

Filter by
Sorted by
Tagged with
4
votes
1answer
753 views

I need to add a extra field in product rest api response - Magento 2

I want to add a field "slider" in /rest/V1/products/:sku I created a custom module and in my di.xml i have added the following code <?xml version="1.0"?> <config xmlns:xsi="http://www.w3....
2
votes
1answer
770 views

Assets from module not appearing in pub/static folder

Running Magento 2.1 I am building a module with alert.js in the /view/frontend/web/ folder in my module: https://github.com/waynhall/frontend1/tree/master/Pulsestorm/FrontendTutorial1 However, after ...
2
votes
1answer
172 views

Custom module causing “Circular dependency” error after upgrading to Magento 2.3.2

I have a custom module with a plugin for Magento\Framework\Encryption\Encryptor that seems to be causing issues after upgrading to Magento 2.3.2 (from 2.3.1.) When I disable the module, everything ...
0
votes
0answers
11 views

How can I create a file that will override the core file containing the header section design of the frontend from my own module in app/code

How can I override the header section of the file containing the name of the default message and sign in options from my own module under app/code.
0
votes
2answers
38 views

Magento 2 : We cant place the order : SQLSTATE[HY000]: General error: 1449 The user specified as a definer your_db_user@% does not exist

I have migrated a Magento 2 site to a new server and getting the below error when placing order We cant place the order : SQLSTATE[HY000]: General error: 1449 The user specified as a definer ...
0
votes
1answer
36 views

Error when observer is executed after order is placed

I created a module in order to save order data to a custom table: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
0answers
75 views

Newsletter subscribe/unsubscribe email notification event observer

I am writing my own admin email notifications module. So far it has New Order and Low Stock observers set up and working just fine. I want to add the Newsletter subscribe/unsubscribe observer to it ...
0
votes
1answer
31 views

Magento Observer to block spam orders not working

I'm facing some issues with orders placed by bots. I noticed that all orders are made by a specific phone number and also by a specific street. So I looked for a way to block orders that are made ...
0
votes
1answer
25 views

How to run static tests for a single/specific module? [duplicate]

I am looking for a way to run static tests for a single module as my application is huge. So running static tests frequently and checking code consumes a lot of time. As per my knowledge, Magento ...
0
votes
1answer
18 views

How to place custom template (phtml) file in local module direcotry instead of default template directory

I am creating a new module for my Magento project where I have a few template files which get appended to >catalog_product_view catalog_category_default checkout_cart_index and few other pages. ...
1
vote
1answer
851 views

Magento 2 : How to add a product grid (assign product) in custom module using UI Component?

I want to add product grid (assign product) in my custom module using UI Component. I follow this ANSWER: Magento 2 : How to add a product grid in custom module using ui component? and I get the ...
0
votes
2answers
13 views

Magento 2: Getting Error When Adding Customer Address Attribute

I'm using Magento 2.2.3, i need to add Customer Address Attribute, but when i run setup:upgrade I'm getting error of Wrong Entity ID. Here is My code: CustomerAddress\Attribute\Setup\InstallData.php ...
3
votes
0answers
39 views

in custom module ajax-loading form translations not working magento 2.3

in ajax-loading form Change English it to italiano and it works but italiano to English not working proper. once transalte to italiano then switch to english store not transalte to english ...
3
votes
1answer
358 views

Magento 2 : How to create an EAV entity module?

I want to create EAV entity module. I refer these below links. I want to do the same in Magento 2. How to create an EAV entity? https://www.youtube.com/watch?v=nr8xuFA_XPU This youtube link is ...
3
votes
0answers
21 views

Production mode doesnt load any content for custom module

I have created a custom module in Magento 2. In developer mode it is working well, however same module does not show any content in the production mode of Magento its show only white screen. There is ...
3
votes
0answers
22 views

Magento 2 - How to create a custom product listing grid in admin?

I want to create a custom page for product listing in admin like the image using my custom module. How could i do that? If anyone have any solution please lighten me up.
0
votes
2answers
80 views

Contact Form in Magento 2 Custom Module is Not Sending Email

I am currently trying to create a custom form in Magento 2.2.7. The purpose of this contact form is to provide our trade (wholesale) customers with a separate contact form to our retail customers (i.e....
0
votes
0answers
52 views

Adding custom JS to existing module causing errors

So I've been trying to add some custom javascript to a module, however when the JS has added it works fine in itself, but it causes a lot of errors for a lot of different scripts, and I can't figure ...
2
votes
1answer
694 views

Block not showing after layout update

Considering this layout update XML: <?xml version="1.0"?> <layout version="0.0.1"> <checkout_cart_index> <reference name="methods"> <block type="...
0
votes
0answers
19 views

How to add my whole existing simple products catalog to configurable products with different colors/swatches?

So I would like to know the most optimal way how I can merge my existing simple products (let's say 1 product, in 5 different colors, so 5 simple product pages) to 1 configurable product. I would also ...
0
votes
0answers
19 views

Looking for email only signup extension for magento 2

Desired feature: When new user clicks on sign up - There is only one available field - his email address, which he has to fill in. The new user, after entering his email gets already redirected to ...
1
vote
1answer
63 views

Instagram pictures on homepage [closed]

I have to create a custom module (or anything else what let me do what i want to), which will display few latest pictures from my instagram on homepage. I do not know how to use Instagram api to do ...
0
votes
1answer
40 views

Convert Magento 1 Script to Magento 2 (Get Order ID by custom Block)

I am trying to get the ORDER ID, BaseSubtotalInclTax, BaseShippingInclTax, and TaxAmount on the success.phtml page by using custom block. On Magento 1 I had to put the following script in the success....
0
votes
1answer
703 views

Magento 2 Class Inject in Constructor

I am trying to create a simple module based on this answer https://magento.stackexchange.com/a/125519/45358 I just need a function to check if customer is logged or not in a custom theme header.phtml....
2
votes
0answers
14 views

Allow Another Free Payment Method Magento 2.1.0 [closed]

I create a payment module for Magento 2.1.0. My module works very well. But I need to give another free paid method with the same module... This is possible? Thanks for all.
0
votes
1answer
30 views

magento 2 system configuration with a custom .phtml template?

in system.xml: <field id="custom_field" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Custom Field</label> <...
0
votes
1answer
732 views

Custom Module Displays Blank Page

I am trying to add my own module to the admin in version 1.x but I'm getting the blank page when I try to open the module This is what I have managed to achieve so far; My module appears as a ...
0
votes
0answers
135 views

Magento 2.3.2 Invalid security or form key. Please refresh the page error while accessing custom back end module?

I have created custom admin module in magento 2.3.2. when I try access the module it is showing "Invalid security or form key. Please refresh the page" Can you please help me on this ? as per ...
0
votes
0answers
27 views

Magento2.2 Getting error after upgrade module

I am using Magento2.2 after upgrade module than comes this error on frontend side if any one idea reply me Class Amasty\ShopbyBase\Helper\PermissionHelper does not exist
1
vote
0answers
45 views

Magento 2 How to get category tree with checkbox to select only one category?

I want to call the categories into my custom admin form for admin. How can I call that? I want to show all categories into my custom form in admin and it will allow selecting only one category. I ...
1
vote
2answers
814 views

Magento 2 : Display multiple grids in admin area

I have displayed my one custom table in a grid format. Now, I want to display one other custom table in a grid format (Under different menu). But I am little bit confused, how to add code in di.xml ...
2
votes
1answer
35 views

Looking for inspiration/module meant for guiding customers step-by-step

I'm looking for a module, or inspiration for creating a module that can do the following: I would like to create a page inside my Magento 2 store which is named "Wizard". This Wizard can guide ...
1
vote
2answers
39 views

Display custom block on Homepage

I have a problem with custom module and displaying custom block template on homepage. I create a custom module to show product form specified category. my config.xml file: <config> <...
0
votes
1answer
32 views

Magento undefined variable this in custom block template

I have created a custom block and when I try to access a method from my block I get: exception 'Exception' with message 'Notice: Undefined variable: this­ in /Applications/XAMPP/xamppfiles/htdocs/...
1
vote
1answer
117 views

Custom modules disappeared after 2.2.9 upgrade

All custom modules have disappeared after upgrade to 2.2.9 from 2.1.9. When I run bin/magento setup:upgrade, last message is "Nothing to import." but the custom modules are not enabled and not added ...
0
votes
2answers
740 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 ...
1
vote
1answer
677 views

Custom Magento Payment Method not working - The requested Payment Method is not available

I need to create a custom payment method in magento, so that when I create orders programaticalyl via models, I can set the "Title" of the payment to anything I want (for e.g. Cash, Invoice, etc...). ...
0
votes
0answers
40 views

Magento 2 show pagination in admin custom module

I have created a module in which admin form I have shown product collection I want to paginate it. I have used a block and in which I have created Product collection. <?xml version="1.0"?> &...
0
votes
1answer
937 views

Magento 2 - Prevent form submit on page reload when Product add from sample script to Magento Shopping Cart

Below sample PHP script will list simple/configurable product with add to cart button. When user clicks on submit button, it will redirect to Magento shopping cart page and selected product will be ...
6
votes
1answer
768 views

Watermark Category Images with Brand Logo

I'd like to add a watermark to each small image (but only in the category listing page) that is based on the manufacturer attribute. I don't want to alter the small image for that product on other ...
0
votes
2answers
901 views

Magento 2 Override Model using Plugin

I have to override magento 2 code model file in the custom module. I have to override below method from Magento\Quote\Model\Quote\Address to my custom module and I have to change value of $amount. ...
3
votes
1answer
31 views

Magento2 : How to call shared package in another module composer.json Magento 2 Market place

My module A depends on B.I uploaded A in the marketplace and B as a shared package. I getting following an error while uploading an A module while submitting in the market place Installation failed,...
3
votes
2answers
91 views

Magento2: Custom module not working

I have created new module but it is not working.Please Help me on this. registration <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\...
0
votes
0answers
12 views

How do I add product data and directly to the database, which tables need to be updated in what order?

TLDR: Migrating Opencart to Magento, currently have 300+sku's and 100k+ product pages. What is the best practice for storing complex product data and programmatically adding and maintaining it ...
3
votes
0answers
70 views

How to reinstall module without any downtime or trigger InstallSchema.php on already installed module?

I am trying to reinstall a module on Magento ver. 2.2.8 to trigger the InstallSchema.php of a module without any downtime. My question: Is there a way of reinstalling the module or at least running ...
1
vote
2answers
2k views

How to get customer session id in magento 2?

I want to get the session-trail in a custom module. Without the session-related code, it is working fine, but it breaks the module when I add it namespace Scaledesk\Trails\Block; use \Magento\...
1
vote
0answers
14 views

EU cookie compliance

I'd like to have a (if possible) free magento 2 extension to deal with EU Cookie Compliance (RGPD). This module must allow the user to customize it's cookies. Which one would you recommand ?
8
votes
0answers
783 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.
0
votes
0answers
14 views

Magento 2.3 Cache / Clear Fields

In my checkout steps I have created a few custom fields, and after I fill them out complete the checkout process and am back in store and put a new item in cart and proceed to check out, the same ...
3
votes
1answer
45 views

How to send email by custom form

I created custom form module, if customer submit the form i need to get all values by email. My module files are Customform\ReturnRequest\Block\Index.php <?php namespace Customform\...