Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [module]

Questions about developing custom modules

0
votes
0answers
12 views

Magento control when function on event is fired

Dear community I have made a custom module that will allow stock movement history to be kept for products. However, as illustrated below: figure 1; pressing edit on an order in the admin order view, ...
0
votes
0answers
14 views

How to regenerate var/package folder, If I deleted by accident?

I have deleted all files from var/package. Now I can't able to update the modules from Magento connect manager (Installed modules not listed). Please help me how to regenerate the XML files.
0
votes
0answers
4 views

Trying to create preference to override Default Currency

I have created a preference in my module's di.xml like so: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/...
0
votes
0answers
7 views

Magento2 How to send order email copy to custom email address with custom module when order placed?

I want to make one module where i can set email address in back end. When order placed i want to send that email copy to my custom email which is set in admin. how can i achieve this functionality ...
0
votes
1answer
26 views

Getting a table first row from repository

I'm building my first Magento 2 module, and I'm a bit stuck. First of all, this is what I have so far (I'm still fixing the coding standards on all the pages). https://github.com/moloni/magento2 I ...
0
votes
1answer
15 views

Change product price based on stock quantity in magento 1.9

I have a situation where the product price should change based on the number of items on inventory. Example, if the stock has > 10 item then the product price should be some special price like 100$. ...
2
votes
1answer
23 views

Magento 1: How to add a system configuration setting of custom module under the second module tab in admin?

I have two modules with same vendor name. I want to display the second module system configuration setting under first module tab in admin. Do you guys have any idea? Here are my system.xml files for ...
0
votes
1answer
25 views

Magento 2 custom module Collection join table _initSelect

My Collection.php .... public function __construct( \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, \Psr\Log\LoggerInterface $logger, ...
0
votes
1answer
35 views

From a plugin how can I override a different plugin template file.?

I'm really new to Magento. How can I override a modules templates files from another module ? I have this file: /app/code/Amasty/Shopby/view/frontend/templates/layer/filter/swatch/default.phtml ...
0
votes
2answers
36 views

Magento 2 Sequence - Multiple Modules Overriding Same Template

I am using Magento Commerce 2.2.6 running in developer mode. I have multiple modules that are overriding the same template via the setTemplate action in layout xml. I am using sequence in the ...
0
votes
1answer
15 views

Need help finding a wholesale pricing solution based on discounting list price rather than marking up cost

I am about ready to launch a new M2 store and the website will have two stores. One for retail sales and one for dealer sales. I need to be able to set the pricing in the dealer store to be based on ...
0
votes
2answers
35 views

How to print order details for event observer sales_order_save_after

want to print order details and product details (variants) which are ordered. My xml file <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
14 views

M2 - White screen shows when a custom layout loads

I followed this post. However, I am getting a white screen on the Tier 3 category pages. Troubleshooting steps: Cleared the browser cookies/cache. Flushed the cache using php bin/magento cache:flush ...
0
votes
0answers
14 views

Magento 2 - How to show product grid in my custom module?

I created a custom module,in that module I want to display product listing grid based on selection I want to do some different operations for selected product in frontend.Can anyone help me how to ...
0
votes
2answers
20 views

Magento 2 make new method available in list.phtml

If I need to create a method under Magento\Catalog\Test\Block\Product\ListProduct Class This class has methods such as: getProductItem,getProductNames,getProductsCount,getSortByValues I Would like ...
0
votes
1answer
29 views

Setup version vs Module Version

How to check the third party plugin version without any code in Magento 2? Also, please let me know what exactly is Setup version and Module version.
1
vote
2answers
18 views

How to include custom JS to admin create new product in magento 2

I want to include custom JavaScript to create new product form. I already try with below way Using XML way. app/code/Namespace/Modulename/view/adminhtml/layout/index_index_add.xml <head> ...
0
votes
0answers
12 views

Magento2 - Custom module translation not used for backend

I changed my admin locale to de_DE and installed a language pack for de_DE which is used by Magento without any problems - for frontend and backend. But it seems that my custom module's translation ...
0
votes
0answers
16 views

Product field in custom form

I am creating a custom module in which there is a custom form in which I want to add product as a reference field, Can anyone know how to do this?
0
votes
1answer
26 views

Magento 2 Convert backend admin grid to use joint table

What are the step I need to take to convert my backend admin grid to use a joint table I have my grid example with column id and name id comes from the mainTable and name from the secondtable: I ...
1
vote
1answer
26 views

Magento 2: How to stop event/observer if another already ran

I have 2 events running if subscribe to newsletter is checked on the checkout page. sales_model_service_quote_submit_success newsletter_subscriber_save_after Can i prevent event #2 from happening if ...
0
votes
0answers
28 views

Magento 2 how to override vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php file?

Need to override vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php file, how can i do that ?
1
vote
0answers
17 views

Need to save data while custom module installation

I need to save some data while custom module installation. I save some static data using setup/InstallData.php. I need to process the existing order data and save it into my custom table. Is there any ...
1
vote
0answers
26 views

How to override order.php vendor/magento/module-sales/Model/Order.php in custom module magento 2?

In Order.php i am trying to override getShippingMethod and getShippingDescription method but it is not loading the page and in logs Order.php <?php /** * Copyright © Magento, Inc. All rights ...
3
votes
6answers
67 views

Getting Items in Cart

I've tried many methods over the web including here too but still I can't seem to be able to get items currently in cart, tried checkout sessions cart model, cart helper nothing works, It sometimes ...
0
votes
1answer
27 views

Custom Module Layout Problem

I've created a custom Magento 2 Module and I am facing a problem of URL returning blank page If I am calling the block from template file using layout Magento Version : 2.2.4 URL Trying to visit : ...
0
votes
1answer
22 views

Custom cron not working in magento 2.2.6

I Have created the custom cron in my custom module. crontab.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
1answer
48 views

Magento 2 - Overriding `Magento\Sales\Model\Order\Payment\Info` not working

I am trying to override the Magento\Sales\Model\Order\Payment\Info.php to solve an error due to serialized migrated data from Magento 1 to Magento 2. The method I am trying to override is a protected ...
0
votes
0answers
29 views

Magento 1.9 Integrity constraint violation on duplicated product

When I duplicate a configurable I get this exception, but the product is created as excepted: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-0-0-1-4-23456-0' for key '...
2
votes
2answers
34 views

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/code/Bz/Bcs/etc/frontend/routes.xml:

While i create a router in magento 2.2.6 module i face the following error 1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /var/www/html/magento/app/...
0
votes
1answer
34 views

Custom module extension

I am new to Magento, I am trying to create a custom module in Magento2 2.2.6 but I am facing the following error. Element 'add', attribute 'resource': [facet 'pattern'] The value 'bcode_Bapp::...
0
votes
0answers
21 views

magento 1.9 doesn't save attribute value on sales_order_place_after

When the event sales_order_place_after is triggered the new quantity value is not inserted, what is the problem? How to update quantity or other attributes when this event is triggered? I need to ...
0
votes
2answers
47 views

how to add city dropdown on checkout page instead of typing the city(M2)

I need to get rid of this company text field and Country drop down since the store serves locally. Important : How I can overide the city (text area) to a drop down with my own custom city list.?
0
votes
3answers
33 views

Magento modules

We have installed some of the third party plugins on our Magento site. But, when I check the module status using the below command, It showing many of the modules which start from Magento_xxx that we ...
0
votes
0answers
13 views

magento 1.9 detach simple product associated to a configurable and assign to another configurable

How to detach simple product associated to a configurable and assign to another configurable in php. For example to attach a simple product to a configurable I use this code: Mage::...
0
votes
0answers
149 views

Add second dropdown based on first

I have created an custom widget. So far I have created file in app/code/Test/Testwidget/Model/Config/Source/Categorylist.php and it contains dropdown with all the parent categories I have - <?php ...
0
votes
0answers
61 views

Text swatches not selecting

I'm using a block to render swatches on the homepage of my website. I have used this before and it has worked perfectly. However, it's now not working and I can't figure out why. The swatches don't ...
0
votes
0answers
13 views

magento 1.9 ORM data are different from SQL data

I have added a new attribute with this code into the install script: $this->addAttribute( Mage_Catalog_Model_Category::ENTITY, 'macro_path', array( 'group' => 'General ...
0
votes
1answer
15 views

Magento 2 custom module shortened url with query string goes 404

I have a custom controller page : http://dev.test/myfrontend/ The above works fine. also the bellow one works http://dev.test/myfrontend/index/index/ Now if I add query string: http://dev.test/...
0
votes
1answer
23 views

How remove module name from url magento 2

Is it possible to remove module name through htaccess or any other way around to hide module name from url of magento 2 .i.e http://abcd.com/modulename/controller Only need to display controller ...
1
vote
0answers
25 views

Create a Bulk products using rest api with rabbitMq custom queue in magento 2.3 beta

How to publish message to rabbitmq and read message in consumer and create a bulk products in magento while running custom queue in rabbitmq. I want to create custom module in magento 2.3 beta to ...
0
votes
1answer
26 views

Admin Module not Working

I'm trying to create a super simple Admin module that will add a button to the Cache Management page. So far I have created the following files. Gamma/ExtendedAdmin/registration.php: <?php \...
0
votes
1answer
18 views

make a category branch undeletable

I would make a category branch undeletable, my idea is to use an observer on the events catalog_category_delete_before and catalog_category_delete_after. On catalog_category_delete_before the branch ...
0
votes
1answer
33 views

Magento 2: Overriding addtocart.phtml for Configurable Products

I've create a module and overriden addtocart.phtml to replace the 'Add to Cart' button with 'Preorder' when the Preorder attribute is set to 'Yes'. This works well on simple products, but I cannot ...
0
votes
0answers
29 views

Magetno 1.9 problem set category ids to product

When I try to set category ids to a product nothing happen, I use the method setData( 'category_ids' ), I cannot use the method setCategoryIds beacuse I built an observer on ...
0
votes
2answers
64 views

Force login to catalog and product pages in magento 2 custom theme

I have found this module : https://github.com/bitExpert/magento2-force-login But this show errors in Frontend - 1 exception(s): Exception #0 (ReflectionException): Class BitExpert\...
0
votes
3answers
43 views

Get all Module list with status - whether it's enable or disable in Magento 2

I tried below code which gives me all modules name not specifying the status whether it is enable or disable. __construct public function __construct( \Magento\Framework\Module\ModuleList $...
2
votes
1answer
31 views

Inside admin when i click on system i'm throwing an error on m2 2.2.5

I've tried to change the ID name but it did not work. 1 exception(s): Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists Exception #0 ...
0
votes
1answer
44 views

How to publish my module in magento Marketplace?

I have developed a module for magento 2. In particular is a custom shipping method, I would like anybody could be able to use my shipping method. How can I do to put my module downloable. I tried on ...
0
votes
2answers
31 views

How can I create a custom link Magento 1.9.3.x admin side menu?

I'm trying to create a custom section with custom links on Magento 1.9 admin side menu, but it doesn't redirect me to my controller action