Questions tagged [module]
Questions about developing custom modules
3,147
questions
0
votes
0
answers
22
views
Write Magento2 Custom Module to set Minimum Order Amount for Selected Customer Groups
I developed a Magento 2 module to add customer groups dropdown in admin panel Store-> Configuration -> Sales -> Minimum Order Amount so I can set min order amount only for some customer ...
0
votes
1
answer
19
views
Magento 2: REST API Endpoint uses wrong locale
I'm implementing an endpoint where the users can create products from a CSV, using the same logic that Magento implements in the backend to import CSV seems to work great but I have a problem, the ...
0
votes
3
answers
39
views
Preference Module - When to Pass in Parent Dependencies
I am currently creating a preference module to add additional functionality to \Magento\Catalog\Model\Product and in reviewing some of the tutorials, example below, I noted that dependencies weren't ...
1
vote
1
answer
31
views
Event observer hangs on order creation
Situation:
I'm creating a Magento 2 module that listens to specific event observers, gets the ID's associated with those events, and sends them to a third-party Node app. This Node app will receive ...
0
votes
0
answers
12
views
Third Party Module Layout Override - use custom module or within theme directory
When overriding a layout xml file from a third-party module, example being Amasty, is it best to include the new xml file within a custom module, within app/code, or within the theme directory, that ...
1
vote
1
answer
84
views
How To Disable Page Builder for specific form field in Magento 2?
I want to disable the page builder for specific fields in my custom module.
I want to show the default wysiwyg editor.
and all other page I need page builder with wysiwyg editor
Here is my UI ...
1
vote
1
answer
46
views
Magento 2.4.6: Getting error "Namespace not defined properly" when compile command running
When I am trying to compile, then I am getting Below error:
Namespace not defined properly
you can see proper command running here :
www-data@robert-php-fpm:/var/www/html$ bin/magento setup:di:...
0
votes
0
answers
17
views
Custom Module accessible to other users but not working properly
I have created a custom module named "Service voucher list"
I have created the acl.xml file too so that other users can have its access by custom resources too. now the module is accessible ...
0
votes
0
answers
33
views
Update increment pad length in orders to remove leading zero's
I'm looking for the most up to date and most recommended way to update increment_pad_length I've seen many posts about direct with sql statements and other with di.xml eg:
<?xml version="1.0&...
0
votes
0
answers
31
views
Child block is not loaded when the main block is called in a CMS page
I made a custom module block with the following layout:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:...
0
votes
0
answers
31
views
Captcha showing only on form route but not on CMS page
I followed this (with some fixes, since it wasn't working) and created a functioning form that I call as a block in a CMS page created in the backoffice from Content > Pages.
Later I followed this ...
0
votes
1
answer
69
views
Create an incoming data Magento 2 Webhook
I am looking into creating a module which would listen to incoming data from another custom service.
For example, the said external service would send data to domain.com/webhook (which would be ...
0
votes
1
answer
36
views
Magento 2.4 - Dropshipping module help
I am attempting to work on a module that will send an email to several different dropshippers when an order is placed. I am not getting errors after a few tweeks. although. i'm not receiving any ...
0
votes
2
answers
80
views
Cron job that delete customer in database
below is the cron job code that suppose to delete customer if they have value of 1 in deleteOrders field but it not doing that, what am i missing?
<?php
namespace Vendor\ThreeYearOrders\Cron;
use ...
0
votes
0
answers
34
views
In Magento 2.4.1 How to Add custom fields to dashboard diagram totals and remove Tax, Shipping?
I want to Remove Tax and Shipping and replace them with Quantity, Subtotal, Extra Fee, Total, etc
0
votes
1
answer
92
views
Trying to listen to the add to cart event
This is my first time playing around with Magento. I'm building a module and I want to listen when a product is added to the cart so, I've tried to use the ...
0
votes
1
answer
25
views
Apply the custom module optionally
Is it possible in Magento 2 to apply the custom module only if some condition is true?
The module is installed through composer and enabled. The installed module overrides the standard Magento ...
0
votes
1
answer
94
views
what does $this->_coreRegistry->registry('current_category') return in magento 2?
what does $this->_coreRegistry->registry('current_category') return in magento 2 ?
0
votes
1
answer
40
views
How to send the separate orderconfirmation mail for admin and customer
I created a custom module to send the separate mail for admin and customer but its not working.could you please suggest me regarding this so i can proceed forward.
0
votes
1
answer
76
views
add progress bar in minicart magento 2
I'm new to Magento, I have this module which adds progress bar in cart summary
https://github.com/christophermallory/magento2-freeshipping-progress-bar,
I want to add it to minicart
0
votes
1
answer
52
views
I'm trying to install sample data
The "https://repo.magento.com/archives/magento/sample-data-media/magento-sa
mple-data-media-100.4.0.0.zip" file could not be written to C:\xampp2\htdoc
s\myhikmadh/vendor/composer/tmp-...
0
votes
1
answer
28
views
my First Admin Page is not shown up
I try to write a own module. After 1 week of searching I hope u can help to go on.
Its a very simple admin page.
module_dir: app/code/famberg/module_afterbuysync/
... Controller/Adminhtml/Settings/...
0
votes
0
answers
104
views
Magento 2 - Error with new custom module - Impossible to process constructor argument Parameter #1
Does anyone have any idea what this error is when running this command in magento 2: setup:upgrade for a custom module?
Here is the error:
Impossible to process constructor argument Parameter #1 [ <...
0
votes
1
answer
122
views
Error in Postman and show that Invalid type for value: \"%productId%\
I have developed a module in my magento 2.2.6 for to create an API that can update the product price and quantity via product id . Please see my code below
/var/www/html/app/code/AdmNetsuitePQ/...
0
votes
1
answer
53
views
Can you restore old Magento catalog and product data?
our Magento catalog database has undergone an update which mixed items together and caused chaos.
Can we somehow extract old product data (product numbers, categories, which products were contained in ...
0
votes
0
answers
56
views
Magento 2: Save return to stock value from credit memo to database
I am implementing a credit memo export functionality and need to export whether the "Return to stock" field was checked when the credit memo was created.
I know the value is not saved, ...
0
votes
1
answer
31
views
Magento 2 - Change value in .less file of a third party module
I need to change a value in this file of a 3rd party module from my own theme:
vendor/amasty/xsearch/view/frontend/web/css/source/module/components/_search-input.less
Am I correct that I need to make ...
0
votes
1
answer
289
views
How to setup magento coding standard for the Magento 2 version
I am trying to set the magento coding standard in the Magento 2 version. I followed this link: https://github.com/magento-ecg/coding-standard.
When I check code sniffer for the directory path: /...
0
votes
2
answers
51
views
how to return custom data with response in Customer API
I am calling Magento2 API /V1/customers/me I want to add custom data in response of this API that is stored in my custom table how can I implement this ?
Thanks !!
0
votes
0
answers
60
views
Resource access issue for an Integration of custom module
I am using Magento 2.4.5
I created an Integration for my custom module. I am successful in generating the oauth_token & oauth_token_secret. But when I want to see an order using API, I get a 401 ...
1
vote
2
answers
106
views
REST API return JSON object using factory and interface
I am trying to create a simple module to return JSON data, if i returned string or array it will return the targeted data, but i can't return JSON object with key value
when i return the interface it ...
0
votes
2
answers
24
views
Local setup after disabling Magento_TwoFactorAuth admin panel still ask for Security Code
After local setup, I have disabled Magento_TwoFactorAuth and changed the value of Magento_TwoFactorAuth to 0 in config.php
and still can't log in to the admin panel Security Code:
After changing ...
0
votes
0
answers
122
views
Upgrade to 2.4.5-p1 app/code modules not recognized in setup:upgrade command
Upgrading from Magento 2.3.x to 2.4.5-p1, having sorted through the various PHP 8.1 issues, running setup:upgrade from the cli finishes, but the front end reports the standard Please upgrade your ...
0
votes
1
answer
31
views
Composer Patch vs. Custom Module for Vendor Directory Modifications
Is there a general consensus on when you should create a custom module to override core vs when you should use a composer patch?
At present, I need to add @ to a line of code and feel that a module is ...
0
votes
1
answer
37
views
How to check if a module needs an update using comands/code?
Is there a way to check if a module needs an update using commands or code ?
Maybe i can compare the current version to the latest version, but how do i check what the latest version for a module is ?
...
0
votes
1
answer
368
views
Using a data patch to add the block into cms page
my task sounds like : "Using a data patch to add the block into cms page"
i have
data patch cms block
class CmcBlock implements DataPatchInterface
{
const CMC_BLOCK = 'first_cmc_block';...
1
vote
3
answers
99
views
Help please , Well configured, but i can't get Model in Magento 1.9.4.5
app/code/local/Info/news/Bock/Adminhtml/news/Grid.php
<?php
class Info_News_Block_Adminhtml_News_Grid extends Mage_Adminhtml_Block_Widget_Grid{
public function __construct(){
...
0
votes
0
answers
49
views
Grid is showing the same record by it's id times in magento custom module
I am new to Magento and I just created my first module. But the issue is I can see the record from the MySQL database in the grid but let support if the latest record added has an id(primary key) like ...
0
votes
0
answers
31
views
Product Question Extension with Instant Search Results
while I wrote the title of my question, I saw that Magento Stackexchange already works exactly like the Module I require... But let's start from the beginning:
We are currently (a bit late, I know) in ...
0
votes
1
answer
28
views
Getting and Error
I'm installing SEO Suite Installation via Composer but during installation I'm getting an error. Can anyone help me for the solution of this. Screenshot of error is attached.
0
votes
2
answers
32
views
Custom Page Module with existing theme template?
Is there a way to use a template from a third-party theme, that is already installed, with a newly created custom page module?
0
votes
0
answers
27
views
Rename module's composer package
i'd like to know if it's possible (and if so, how) to rename a module i published to the composer repository/marketplace.
My module's current name is "companyname/magento-2-extension" and i'...
1
vote
1
answer
483
views
Module doesn't work when placed in `app/code`
i'm editing a Magento 2 module. If i install the module via composer require, then run all the necessary commands, the module works.
If i manually copy the module files from vendor/{vendorname}/{...
0
votes
1
answer
90
views
How to instantiate an helper class from my custom module in a test program in the directory at the same level as the root of Magento?
With the code below, I'm trying to instantiate an helper class from my custom module.
// Sanitize the $_GET[] value
// Create an object of the order loaded with the $order_id passed as query string.
$...
3
votes
2
answers
69
views
Injecting code into theme product page
The may well be too broad of a question, but I'm having extreme difficulty finding any answers. I want to know if its possible to add a phtml block/view to a product page when you have a theme ...
1
vote
1
answer
37
views
overwrite 2 templates file by custom module, still loading the core files
I am using Magento 2.4.3p-1
I have 2 files
vendor/Aw/Review/view/frontend/templates/email/review/request_form.phtml
vendor/Aw/Review/view/frontend/email/review_reminder.html
Since those 2 files in ...
1
vote
0
answers
238
views
How can I display a multilingual store from right to left for Arabic store view?
welcome everybody.
I'm Mostafa from Egypt, new to Magento.
I installed magento 2.4.5 in localhost, and used the default theme "Luma", and added the Arabic language pack for the system, and ...
1
vote
2
answers
67
views
layout messed up for Prince_Productattach module for magento 2.3.3
I am using a Prince_Productattach module on my Magento 2.3.3 CE, how can I troubleshoot some issues on the frontend.
as the diagram shown, the product attach block display on two places, i didn't ...
0
votes
2
answers
176
views
How to uninstall Stripe module installed in app/code
One of our client stores has had Stripe module installed in app/code as shown in the image below.
I need to uninstall it and reinstall its latest version in vendor folder. Could you please share ...
2
votes
2
answers
770
views
Magento2: How to create a patch for custom module composer.json?
I want to know that can we create patch for some changes in composer.json of custom module. I am talking about custom module composer not magento composer. Its just like changes but instead of any php ...