Stack Exchange Network

Stack Exchange network consists of 175 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

8
votes
0answers
402 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 ...
7
votes
0answers
675 views

How to hide a product from a specific customer group? Magento 2

I want to create an extension that will hide a product from a specific customer group.
5
votes
0answers
89 views

How to do the same controller action to create an image for one button but not for another?

We are calling same controller action for 2 buttons for create product programmatically and assign a custom image for that product. create - custom image uploading for newly created product login - ...
5
votes
0answers
259 views

Magento2 : custom rate for shipping method

I want to use custom price for one of my shipping method per quote. I want to show custom amount for only current quote. how to do it. Like there is a shipping method. "CUSTOM FLAT RATE" Now if ...
5
votes
0answers
125 views

Magento 1.9x - Include Dataflow Profile Functionality for Import operation into my custom module

I have created custom module for import operation by uploading csv, xls and ods files. It is working good, but now i need to include Dataflow Profile Functionality into my module. That means I have ...
4
votes
0answers
53 views

StoreRepository get($code) which does not exists

Till today all the code was okey, but after code review, I got that we use the method load() on the store itself so I replaced it with storeRepository->get($code) Code what I'm talking about ...
4
votes
0answers
65 views

xsi:type, is blocked or not validly derived from the type definition of the element declaration

I got this error : Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'title', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The type definition 'string', ...
4
votes
0answers
407 views

Magento 1.9 : Add form field to Admin Credit Memos

I need to add custom dropdowns to the Credit Memo create form. I read that you should be able to add a simple field without having to rewrite core code. The following line fails in the Observer: $...
3
votes
0answers
95 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
99 views

Custom Model Relationship (CMS Page + Product)

I am trying to assign a Product Object to a CMS Page Object, so when you have the CMS Page Object, you can do something like this: $product = $page->getProduct(); I have modified the CMS Page ...
3
votes
0answers
75 views

How to get custom table next id to be saved?

My scenario is saving an image to a folder. Why I am using id is I have to save a lot of items(images, pdf) into the same folder as it is all related to this item. When new data is created I want to ...
3
votes
0answers
37 views

Developed Module

I have 2 instance of magento store in your local system.instance Fresh Magento installation with sample date of Medium Profile and another with blank data. I want Sync all customer and customer ...
3
votes
0answers
165 views

loop through 2 collections with in one phtml

I am working on a custom module that is pulling in 2 different collections. When I try to use a foreach to loop through either of the collections the page displays the collection correctly. However, ...
3
votes
0answers
86 views

use system config value to disable code from requirejs-config.js

I would like to create a configuration setting in my module's adminhtml/system.xml to disable it's features. I know how I can system config values to disable code in LayoutXML or PHP but is it ...
3
votes
0answers
270 views

Magento 2 custom module friendly URL's

I have my url structured like so: "http://domain.com/post" where post is my module's main router url. Then for each post I have: http://domain.com/post/category/view/id/1. and my url rewrite is ...
3
votes
0answers
897 views

How to upload multiple images/files in magento2 custom module backend?

I have uploaded single image successfully by below code. $uploader = $this->_objectManager->create('\Magento\MediaStorage\Model\File\Uploader',['fileId'=>'image_photo']); ...
3
votes
0answers
524 views

how to add courier's API in custom shipping Method

I have followed a tutorial to add custom shipping method to magento 2.1.7 and i can't seem to understand how to implement NinjaVan Courier API. Could anyone help ?? API $headers = array(); $headers[...
3
votes
0answers
242 views

Bundle Price depending on items in bundle

This is a complex question about determining bundle prices. I have already hired a developer who cannot figure out how to make this work, and have spent days looking at extensions, so am reaching out ...
3
votes
0answers
1k 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/...
3
votes
0answers
998 views

Magento 2 custom module multi scope store view

I am diving into the world of Magento 2 development. I am writing a very simple custom module to show a slider in my store homepage. Each slide has its own title and an image to show and I made them ...
3
votes
0answers
579 views

Magento 2 - Display subcategories above product listing

I'm trying to display the first 8 subcategories above the product listing on a select few category pages. I know that I can easily do this using static blocks, but I'd rather use a custom template ...
2
votes
0answers
30 views

Magento 2.3 - AttributeMerger plugin is updating incorrect element

I am trying to either add an additional class "browser-default" to the country_id select field, or replace the existing "select" class with "browser-default" I put together a quick AttributeMerger ...
2
votes
0answers
12 views

Magento 2: How can I relate/link custom module data to products like Up Sell or Cross Sell?

I have created modules to store complex information like Dangerous Good Informations (UN-No, Proper Shipping Name, Class, Packing Group etc) or Customs Numbers (Taric Codes). Now, I want to relate/...
2
votes
0answers
37 views

Manage Brands / Manufacturers in admin. Show brand logo and story in Product Page

I am looking for a best practice to show content about the manufacturer/brand on a product page. For example brand logo and story/description. This could be achieved just by importing the description ...
2
votes
0answers
31 views

How to add fields to new custom module page in magento 2

Here the registration fields i need this fields to new custom module pages how to do ?? can i inherit this all fields need fields 1.phone no 2.company 3.street address note: this all fields ...
2
votes
0answers
42 views

ConfigurableProduct: How to get the configurable products out of stock?

I want to show all the attributes from my configurable product on my select. I followed this tutorial: Magento 2.2 How to show out of stock in configurable product, with some changes and fixes. So, I ...
2
votes
0answers
18 views

Product feed with 2 Facebook Page

I have the Facebook Ads extension plugin with Magento. I already have it configured with one Facebook Page with the product feed. Is it possible to add another page and a second product feed? The two ...
2
votes
0answers
130 views

Syntax for overriding config.xml module configuration with config.php in magento2?

I have a module MyCompany_ExampleModule. Its etc/config.xml file: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/...
2
votes
0answers
186 views

How to create mass credit memos magento 2?

Total noob in magento here. What I want is to select a bunch of orders, and create credit memos for them if their status is completed, and after the creditmemo is created, I want to set their ...
2
votes
0answers
47 views

Magento 2: Can't place the order corectly after return back from payment (3ds page)

I'm developing a payment module for Magento 2 and stuck at some point. and I already checked the similar questions, I send a callback URL with the post of data to PSP to get the customer back to it ...
2
votes
0answers
34 views

How to run my custom code before a cron job (catalogrule_apply_all) WITHOUT overriding Magento's core?

Plain and simple: my module must do stuff before Magento's own catalogrule_apply_all (meaning: Mage_CatalogRule_Model_Rule::dailyCatalogUpdate()). I see no event rised neither in this method itself ...
2
votes
0answers
57 views

The magento custom sorting functionality is not working

I am creating a Magento module to add a sorting option of a bestseller on the category page. For doing so I have to override few classes in the core. In the beginning, I have created config.xml file. ...
2
votes
0answers
231 views

Show custom Admin Messages In configuration section custom module Magento 1.x based on API response

I created a custom module which fetch data using third-party APIs. In admin Dashboard after module installation. I want to check few things form API( I am getting everything from API this is done , ...
2
votes
0answers
442 views

show currency symbol of SAR in both store view

I have store in two views Arabic and English. if I delete this code from /home/store/public_html/site/vendor/magento/zendframework1/library/Zend/Locale/Data/ar_SA.xml <numbers> <...
2
votes
0answers
16 views

Layout of magento admin module changes

i'm creating a module for magento admin and it has so many fields, but as seen in image attached, i want field of price 2 to be on next right to price 1 field. can you anyone please suggest the ...
2
votes
0answers
841 views

Magento 2.2 Web Setup Wizard missing

I am running Magento 2.2 and the Web Setup Wizard is missing. When I use the url: admin/admin/backendapp/redirect/app/etc on the backend. It leads me to /setup/index.php/session/unlogin not /setup/#/...
2
votes
0answers
112 views

Magento 2: How to add customer grid in custom module tab?

I want to add customer grid in custom module's tab in Magento 2.1 How can I achieve this?
2
votes
0answers
135 views

Magento 2 : Why my module is on the vendor and app folder?

I use these commands to install my dependencies today: composer config repositories.myvendor_cli vcs git@github.com:myvendor/my-cli.git composer require myvendor/cli:dev-master To work well I ever ...
2
votes
0answers
66 views

Magento 2 : How to change the attributes that manage the stock?

I'd like to change the attributes inventory_manage_stock and manage_stock for a product by ID. I'm using a custom module, how can I do that? Thanks
2
votes
0answers
79 views

How to go around “Incorrect namespace usage(s)” in static tests

I have a simple CRUD module for Magento 2. When I run the static tests I get the following error/warning. "Incorrect namespace usage(s) found in file..... <Vendor>_<Module>". The ...
2
votes
0answers
48 views

Clear the Text box data in the magento 2 module when validation fails in beforeSave event

I have a textbox which gets a input from the User. I have created a validation point using beforeSave function. If the validation fails, An error displays. Along with this I want to delete the value ...
2
votes
0answers
515 views

How to create ui-component and get it in custom block?

In Magento 2.1.4, I created custom template in backend. Company/Module/Block/Adminhtml/Edit/Custom has template Company_Module::html/custom.phtml. custom.phtml code: <div class="sample"> ....
2
votes
0answers
150 views

How can I split order based on the vendor?

I want to split the order based on the vendor selling the item. I have created a custom attribute sold_by in the the product details page. The order should be split on the basis of the said attribute....
2
votes
0answers
136 views

Magento 2: How do I load a cart populated by the REST API into the frontend?

Using the Magento REST API I am able to create and populate a cart on my external site, but I want customers to checkout on the actual Magento site. Right now I'm looking at creating a plugin for ...
2
votes
0answers
84 views

Magento 2 Custom Customer Attribute Save Data and edit data, i have problem

I create a customer module this module working good , when I migrate data mangento 1.x to magento 2.x wiht migration tool and i wish crete a new customer don’t save data or edit any customer don’t ...
2
votes
0answers
46 views

Question is related to Subscription and Discount Coupon

Following are the pointers Subscription Plan functionality for subscription of certain goodies. After subscription,if customer is purchasing the plan for the first time then coupon code should be ...
2
votes
0answers
76 views

Is there an API to work with CartaSì, in order to make a Magento module to work with CartaSi?

I need to somehow develop and install CartaSi module for payment, integrated with Magento, so a module that collaborates with CartaSi. Any suggestions on how to do this? I have found only couple of ...
2
votes
0answers
1k views

Custom Field on CMS Page - Magento 2

How would I go about adding a custom field (image upload, specifically) to the CMS Page section? I'm looking to have a field where the client can upload an image, which then you can access it in a ...
2
votes
0answers
344 views

How to list configurable product options in grid magento 2 product details page

Is there any way to list all configurable options in grid view of product details page using custom module instead of showing in select box, so that user can add multiple products to cart in one step.
2
votes
0answers
237 views

Magento 2: implement your own captcha type

Out of curiosity, I was going through the captcha module of M2 and I noticed this interesting code in Magento/Captcha/Helper/Data.php public function getCaptcha($formId) { if (!array_key_exists($...