Questions tagged [module]

Questions about developing custom modules

Filter by
Sorted by
Tagged with
6
votes
1answer
3k views

magento 2 add/call css file in email template of custom module

I am trying to add inline CSS in the email template in my custom module. Example <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> &...
1
vote
3answers
957 views

Resolved - Admin Grid Redirects to Front End Page Instead of Backend

I took steps according to this article but the newly created link displays the "text block" on the front-end instead of back-end. http://alanstorm.com/magento_admin_controllers/ Can anyone help me ...
0
votes
0answers
11 views

Magento 2.4 Category image lost after re-saving category backend

After Migrating Magento 2.4 Category image lost after re-saving category backend issue How to i solve this ?
0
votes
2answers
23 views

Magento 2 - Created new table and model - but model does not save!

I created a new table company_shipping_quote and new models by using https://mage2gen.com/. But how can I create a new object and save it so that it appears in the database? Models: Company/Shipping/...
-2
votes
1answer
308 views

how to show shipping method selection for each item in cart

Can anyone give the solution for the below. I am using magento 2 CE. I want to show all shipping methods for each item in the cart on the shopping cart page and the customer can select the shipping ...
0
votes
1answer
14 views

Where to find magento2-sample repository with payment module and many others as examples?

There is no sample-module-payment-gateway to start by developing a custom payment gateway. And, in fact, there is no more magento2-samples repository, which made the developers life much easier. Where ...
0
votes
0answers
8 views

Mini Cart Icon dis-appear in mobile menu

I want help with the menu-cart icon that should be dis-appear in the mobile view in Magento 2.3.5-p1. so can anyone have an idea please share with me. Thanks In Advance.
2
votes
2answers
990 views

Custom Contact Form - Override Controller

I am trying to add a contacts form on multiple cms/products pages. I copied the default contacts form phtml and pasted it into a new phtml file. However, submitting the form redirects to the contacts ...
0
votes
2answers
29 views

Magento 2 - How to allow certain html elements in system.xml config field?

I try to add this HTML (<span style='color:red'>*</span>)to the content of a field with type text. But the html is getting stripped. How can I allow all secure html elements but disallow ...
1
vote
2answers
795 views

Magento 2 - display html content in system.xml configuration

i want to show some htmlContent in configuration. System.xml. how it could be?
3
votes
1answer
842 views

Magento 2: When registration.php is called?

When we built/install new module it should have registration.php as per Magento Standard. When we run php bin/magento setup:upgrade. Module will be installed. How actually this command check for my ...
0
votes
0answers
11 views

assign only one and leaf category per product in magento 2.3.3

I want that the only category checkbox selectable should be the leaf category that is the category checkbox without children in the current branch and only one category checkbox per product can be ...
0
votes
2answers
1k views

Module that adds code snippet to every page on frontend

I'm working on a module for Magento 2, it's my first time writing a Magento module and I feel like there is something very basic I somehow fail to understand, I'm trying to add a code snippet to every ...
0
votes
2answers
34 views

Custom module problem in Docker container

I am having an issue getting a custom module created with https://cedcommerce.com/magento-2-module-creator/ to work properly inside of a Docker container. I have tried containers from https://github....
0
votes
1answer
843 views

Error in php Module

I have some problem, on my magento,please help~ 2.2.0 php71 centos7 EasyApache 4 PHPfpm suphp MYSQL5.6.38 An error has happened during application run. See exception log for details. [07-Dec-2017 ...
4
votes
1answer
1k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
0
votes
1answer
40 views

Media images not showing in custom module

I have a problem, I have created a custom module in my Magento site, so in that module I'm calling custom attributes to display some content and images, but when I'm adding media image in this ...
1
vote
2answers
32 views

PHTML Uncaught TypeError: $(…).lazy is not a function

After installing this module I get an error sometimes: Images won't load and the next error will show on console: Uncaught TypeError: $(...).lazy is not a function With a link to this section of code ...
4
votes
1answer
855 views

Create a Report Showing Email Addresses of Customer Who Ordered a Specific Product

I'm trying to do something that seems simple but we've been pulling hair out here trying to get it done. We have a specific product on our store that has been downloaded more than 2,000 times. When ...
8
votes
2answers
13k views

How to solve the message “Character content other than whitespace”?

I've received that message below when I try to reset my admin password using the Admin panel, I've my custom module installed. I see this same message on a white screen when I try to access using the ...
1
vote
1answer
1k views

Magento 2: Submitted Form not calling Controller

To continue with the question below Magento 2: How to define Scope For Router.php app\code\Custom\Module\view\frontend\templates\posts\view.phtml <form class="form post reply" action="<?...
2
votes
1answer
40 views

Magento 2: Getting Module validation issue

I am getting the module validation error: D:\marketplace-tools>php validate_m2_package.php Abc.zip ERROR - "Abc.zip": "composer.json" found in unexpected place. Zip archive layout not to standard ...
1
vote
1answer
19 views

Send different email template to customer

I have a custom module which is a custom form for the user to book an appointment, this form works fine with no issues, the form once submitted sends and email to both the admin and user/customer but ...
4
votes
2answers
3k views

Magento 2 custom module not loading and it throws error

I am using windows 7. app\etc\config.php <?php return array ( 'modules' => array ( 'Test_Module1' => 1, ), ); ?> When I add My Test_Module1 in app\etc\config.php admin all ...
0
votes
2answers
1k views

Custom button to set custom order status

I created a custom module to add a button to the order view page. The button shows up and now it is time to create the action attached. When clicking the button I want 2 things to happen: Set the ...
13
votes
4answers
18k views

Magento2 REST API Error 'Class does not exist'

I've created a test Magento 2.0.2 REST web service based on Alan's blog: http://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ I'm using Postman to call the custom web service ...
0
votes
1answer
21 views

Remove Items from Mass Action Menu

I am using the following to remove an Item from the Mass Action menu in the orders screen, I am struggling with making it work for multiple items. class MassAction extends \Magento\Ui\Component\...
0
votes
0answers
27 views

custom module menu not showing for admin & admin users in magento 2

My custom module's admin menu not showing for admin & custom admin users. Here is the code snippet: acl.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
13 views

Upload SVG files as product image

we will have to enable the upload of an .svg image within the products. We have tried all possible solutions but none of them seem to be working because Magento disabled them for security. Can anybody ...
0
votes
2answers
21 views

Magento 2 : Module is disabled, shows in disabled list, but the functionality in admin remains

I have a module that I disabled that adds background patterns to individual product pages. We want to remove the functionality. So I ran the CLI command to disable the module. I listed the modules in ...
1
vote
2answers
1k views

Magento 2: How to Override File in Vendor Folder

I installed a 3rd party PHP sdk via composer and need to override a couple files in my own module. However, I'm not quite sure what the best practice is to override these files from the vendor folder. ...
2
votes
1answer
1k views

Magento 2: How to define scope in di.xml & Router.php

I'm using Magento 2 CE Version 2.1.0. app\code\Custom\Module\etc\frontend\di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
43
votes
17answers
67k views

Magento 2: Safe and easiest way to disable Compare products & Wishlist Module

I am building Magento 2.0 only to sell 2 of my products online. The compare products and wishlist module is irrelevant for me. How I safely and easily remove those modules? I dont want to hack the ...
0
votes
2answers
34 views

how to get image from a module

in my case there is a picture inside my module and I want to get that image inside an HTML file (it's an html file for email header), but when I use Magento syntax it doesn't appear, I have got the ...
1
vote
3answers
981 views

Magento 2 - HTML on the tag Comment in the custom module

How to add html on the tag comment in my module like this image?
0
votes
1answer
13 views

logo email doesn't show on mailbox of the customer

in my case i am using magento 2.2.x , so i want to override the file "vendor/magento/module-email/view/frontend/email/header.html" in order to add a logo in the email to show the company's ...
12
votes
2answers
576 views

Magento 2 How to add Tab Component in admin module

How can I add UI Tab Component in custom admin module with the help of below user guide ? http://devdocs.magento.com/guides/v2.1/ui_comp_guide/components/ui-tab.html There are not enough information ...
3
votes
2answers
10k views

CE 1.9.2 - Custom sales_order_save_after observer fires twice

This has been driving me crazy for the last few hours now. I created a module to test sending Suppliers a custom email only once the order has been paid for (Order status changes to Processing). I ...
0
votes
3answers
16 views

How to disable custom plugin in admin

I have created a custom module to disable free shipping based on some conditions. I have to used Custom/ShippingRule/Plugin/Magento/Shipping/Model/Shipping.php to do the functionality. It is working ...
0
votes
1answer
1k views

Magento 2 get custom module data in theme phtml

I have created the custom module and inserted all the required fields detail in the database. Now, I want to list all rows in below file path: I have tried with the $objectManager, but direct call $...
1
vote
1answer
8k views

Magento 1 - Create Simple Controller Not Working In My Module?

I am Trying To create a Simple Module. It's Found 404 page Error. My config file in app/etc/module/Ffay_All.xml <?xml version = "1.0"?> <config> <modules> <...
1
vote
2answers
987 views

InstallData not working

I have InstallSchema.php as follows: <?php namespace Namespace\Module\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\...
1
vote
2answers
3k views

Custom Translation of Backend in Magento 2 - path of the translate.csv?

I am familiar with translations in Magento 1 and found out also how translations in M2 work for the frontend. My questions is where to do my translation for my own custom module for the backend. Is ...
2
votes
3answers
2k views

How to override Magento 2 framework file?

I try to override this file : vendor/magento/framework/View/Element/Html/Link/Current.php I create a module.xml, registration.php and di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
1answer
1k views

Combine multiple shipping carrier rates with different shipping methods into one rate

Looking for a plugin or a way to combine shipping rates for multiple items that ship through multiple carriers into a single rate during checkout. Here's an example of what I'm talking about. Item 1: ...
1
vote
1answer
1k views

Admin Ui Form component JS error

What Im trying to do I started creating my own module for Magento 2. Module is simple - manage news articles in admin side and display them in frontend. No problems displaying data in frontend so far....
6
votes
3answers
5k views

Create magento 2 Patch

I am working on a Magento module that requires a quick fix. I assume I can fix it by creating Magento 2 "patch" way. I have never created a patch file before, can anyone help me to create a ...
1
vote
2answers
4k views

Create Custom Tab into Magento 1.9 Admin Panel

This Problem is related to Backend side (Magento 1.9 Admin panel) not for Frontend side: Part: 1) - I wanna Create Custom tab (suppose 'CategoriesInfo') in magento 1.9 admin panel. (like parallel to ...
0
votes
1answer
771 views

Magento 2 : Invalid block type while creating custom grid in backend

I've been trying to create custom gird in magento 2.0.11 but it keep returning Invalid block type: This error occurs while executing the file Tomrain/Appcustomizer/Block/Adminhtml/...
0
votes
2answers
1k views

Get Wishlist product collection in Controller of Custom module Magento2

I am trying to get Wishlist product collection in Custom module controller for the new functionality. I searched in google and I got this: Inject this class in your constructor: protected $...

1
2 3 4 5
61