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 [custom]

Denotes questions about Custom code or Custom modules which is used to add/extend/enhance the existing functionality of Core Magento.

13
votes
0answers
439 views

Create new Magento Rest API to get category list in Magento 1.9

I am very confused about what kind of error I am doing to follow these steps provided here at the following link : Create new Magento Rest API to get category list in Magento After doing all ...
11
votes
0answers
342 views

How to override a static method in Magento2

Plugin Interceptors and overriding with preference does not work on static methods. Need to override getOptionArray method in Magento\Catalog\Model\Product\Visibility to return a custom visibility ...
6
votes
0answers
663 views

How to add dynamic custom column in UI component

I have configured UI component columns in admin grid and its working fine. I need to add custom columns dynamically. For example we can add custom column in __prepareColumns function in Block layout ...
5
votes
0answers
878 views

Magento 2: Get Order Information Outside Magento Issue for Date

I have below script, trying to get all Orders. I have issue with Date. That i have solved using https://github.com/magento/magento2/issues/7560 //place this before any script you want to calculate ...
5
votes
0answers
891 views

Magento 2: How to Show Discount Coupon Applied Code Product wise?

In Shopping Cart, I have 2 products. When I am applying the Promo Code it's going to apply on only 1 product as per the Shopping Cart/Promotion Rules. I would like to show discount code on basis of ...
5
votes
0answers
350 views

Case / Package Products in Magento 2

I have this requirement: A product should have each individual price and case / package price. For each product, N items make a case. For example: In product, A 20 items makes a case. In product B 5 ...
3
votes
0answers
37 views

How to custom id input on field in form ui component Magento 2?

How to custom id input on field in form ui component Magento 2? Here's my code: <input class="admin__control-text" type="text" data-bind=" event: {change: userChanges}, value: value, ...
3
votes
0answers
293 views

Display custom drop down in registration page using Magento2.1

I tried this code but it's not working app\code\Customer\Attribute\Setup\Installdata.php $customerSetup->addAttribute(Customer::ENTITY, 'customer_type', [ 'type' => '...
3
votes
0answers
65 views

Check if block is called in phtml file

Is it possible to check in default.phtml file (app\design\frontend\MyNAMESpace\MY_THEME\Magento_Catalog\templates\product\price\amount\default.phtml) that catalog.product.related (block ) is loaded or ...
3
votes
0answers
127 views

How to save/select a custom phml form in DB on Magento 2

I have created a custom module, and i have this phtml: <div class="container-club"> <h2>test<h2> <div class="club-img"> </div> <div class="club-...
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
733 views

sorting not working magento 2

I created a custom column "product_name" in sales/order grid, When I am sorting this column grid showing error: Item (Magento\Framework\View\Element\UiComponent\DataProvider\Document) with ...
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/...
2
votes
0answers
48 views

I am creating a custom widget “SPONSORED BEST SELLER PRODUCTS” block to show on home page. Bestseller.phtml file not rendering in the front end

This is my registration.php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Relabs_LabAPI', __DIR__ ); This ...
2
votes
0answers
49 views

Newsletter subscriber custom EDIT route Magento 2.3

I am having custom edit route for core module Magento_Newsletter Subscriber. When I access Edit route loader keeps spinning and doesn't stop. In nginx log I got: 2019/02/11 14:55:33 [error] 15820#...
2
votes
0answers
31 views

Custom plugin files updated code is not showing in admin panel though cache is cleared

I have created a custom module. Controller files are working fine. I am trying to update my module MySQL version and adding new fields to the module in block folder files but they are not applying in ...
2
votes
0answers
247 views

Magento 2 - Custom module file upload configuration and save in custom module table

File upload in Magento 2 store configuration <section id="custom_section" translate="label" type="text" sortOrder="301" showInDefault="1" showInWebsite="1" showInStore="0"> <label>...
2
votes
0answers
73 views

M2 Add fields to custom payment method [ship to multiple address]

I have created a custom payment method, which is working fine, but when i select ship to different address, than payment method was not appearing. I added "allow_multiple_address" to 1. Now payment ...
2
votes
0answers
39 views

Not able to access custom input in collect method of AbstractTotal on clicking next first time but i can access it on second time

I am learning magento , so I am trying to create a custom vat module that will allow users to validate vat and on success vat validation tax will be 0. I have added field on frontend checkout step to ...
2
votes
0answers
27 views

Modification to core files

A developer modified some of our core magento files... not sure I trust the code... Our profiler is saying "mage::dispatch::routers_match" and "mage::dispatch::controller::action::predispatch" are ...
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
349 views

How to change custom order status through rest api in magento2

Can any one explain me or give me an example for changing the magento2 order status to customized status using rest API
2
votes
0answers
68 views

How to create Declaration page in admin control panel

Am using magento 1.9 in sales>order am creating a custom url for Declaration, following image will explain you Here am creating a link for Silver Exchange Declaration. This url like this http://...
2
votes
0answers
149 views

magento 2 custom option price don't want to show?

Magento 2 don't want to show the custom option price in the cart page, customer dashboard and admin end. Please suggest me thanks
2
votes
0answers
161 views

Magento Order Export with custom attribute Magento 1.9.2

Currently the order export dump only provides Order # Purchased On Bill to Name Ship to Name G.T. (Base) G.T. (Purchased) Status We need to add to this, Invoice Number, SKU, HSN ...
2
votes
0answers
94 views

Unable to Create Roles by Roles Resources “Custom” option type in Magento 2

We are Unable to access Roles Resources "Custom" option type in Magento 2 to add the custom roles. When we select Custom option type, nothing is getting displayed. And also no issue is getting logged ...
2
votes
0answers
205 views

add custom text field as configurable attribute for Magento 1.9.x

We are preparing a tourism agency website and we have packages to sell online. These packages are inclusive of transfers, tours and hotel stays (eg. 3* - 4* - 5*), accomodation types (eg. sngl - dbl - ...
2
votes
0answers
2k views

Magento 2: Duplicate key-sequence unique identity-constraint 'uniqueVirtualType' fatal error while di:compile

When i run php bin/magento setup:di:compile it gives me below error [Magento\Framework\Exception\LocalizedException] Invalid Document Element 'virtualType': Duplicate key-sequence ['Custom\...
2
votes
0answers
291 views

Product long description, additional info not showing for configurable product

Kindly help me out, I am not able to figure it out why the description tab nor additional info tab is showing for configurable product while it is working fine for simple product. I am using pagayo ...
1
vote
0answers
19 views

How to add a custom label in shipping address form in Magento2.2.5?

I want to add a only a label - just for informing a user in shipping address form in Magento2.2.5? Any help would be appreciated.
1
vote
0answers
19 views

Magento2.3 SetTemplate is not working first time ajax

I would like to add additional some field info in sales_order_create_index.xml I used setTemplate: <referenceBlock name="data"> <action method="setTemplate"> <...
1
vote
0answers
21 views

How to add style(css,js) to custom widget

Hi i can try to add style to widget in the usual way. like here https://webkul.com/blog/magento2-how-to-add-css-and-js-file-in-module/ its not working. How can i add to css file to widget?
1
vote
0answers
15 views

How to add category Path when creating product progrmatically in magento 2

I want to create products programatically by reading an xml file. Reading from xml, and creating product part is completed. I have no idea how to assign the products to category. This is my xml node ...
1
vote
0answers
31 views

Issue in pragmatically create orders in magento 2

I want to create orders pragmatically by getting the data from xml. Reading data from xml part is done. when creating order steps i am getting this error. Parse error: syntax error, unexpected '$...
1
vote
0answers
117 views

Magento 2 : Custom field data is not saving in product add edit

Custom Field is showing in Product add/edit but data not saving. Here is my full code Vend\Customattrib\etc\adminhtml\di.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="...
1
vote
0answers
20 views

Admin form placeholder won't show

I dug up the "stack" and found one good example of how to add new attribute to the field but it won't work. $founderFieldset->addType('text', 'Amber_SupaSlid_Block_Adminhtml_Text'); $...
1
vote
0answers
50 views

How to create a custom discount “Gift card” in Magento 1.9 at cart page

The functionality will be = Enter Gift Card number(16 digit) Enter Gift Card Pin(6 digit) Enter Amount(amount entered by user) I have already created the above mentioned input fields in the cart ...
1
vote
0answers
92 views

Magento 1.9 - Custom Input Checkbox Types in Custom Options

I wanted to add custom Input Checkbox Type in product custom option and I have followed bellow link in order to add the type. This is working fine as default value (always associated/added to the ...
1
vote
0answers
24 views

Create Custom Shipping Method with Live Rates Magento 2

I have to integrate one shipping method with Magento 2 site. For this I am following below link to create custom shipping method, but it's for static rate. https://magenticians.com/create-magento-2-...
1
vote
0answers
109 views

Magento 2 - How to add custom order item field on order export API

I added a new field on table sales_order_item. I need to display it on REST API order export, in the "items" node. Is it possible to do that ?
1
vote
0answers
177 views

Dependable fields in custom widget

I have created a custom widget having Title and dropdown field and image chooser. I wish to add dependable fields.the image uploading field is visible according with drop down menu. widget.xml <?...
1
vote
0answers
86 views

Custom module works on localhost but not on server | Magento 2

I have a simple custom module. It works fine on localhost but not on server. Frontend test route get a 404. Backend button action exist but does not works. I have no server log and no magento log. I ...
1
vote
0answers
49 views

Magento 2 : Call a function at the time of module installation

I want to call a function to send some store information through api call at the time of my custom module installation. Is there any event observer for this? How can we do it? Thanks. class ...
1
vote
0answers
54 views

Magento 2 Custom price option for multiply with base price

I have one special requirement. How to multiply my base price with custom option price? For example: Base price is 17 and custom option price is 3 So if user select custom option at that time ...
1
vote
0answers
68 views

Create a custom product form based on user role in magento 2

I want to hide some field of the product creation form. I know that i can do this with some xml file, but i want to hide them only for specific user role. I found that the event ...
1
vote
0answers
147 views

Custom mega menu by overriding Topmenu.php

I can't find a good mega menu on the web. I want a mega menu which shows thumbnail categories directly in the dropdown menu. But I can't find it, I tried many mega menu but they didn't work. So I ...
1
vote
0answers
342 views

Magento2 : How to join table with where condition using getSelect()?

I am new Magento 2.2.3. I am trying to fetch data from custom table and display the same in UI components. Everything will work but If I use where clause with getSelect then UI component will show "...
1
vote
0answers
55 views

Magento 2 randomly applying wrong custom layout

I have got an issue applying custom layout to a CMS page. I am on Magento 2.2.0 Enterprise edition on a multiserver stack. Here is my configuration : File Vendor/Theme/view/frontend/page_layout/...
1
vote
0answers
29 views

Custom changes does not apply on magento 2.2

I reinstalled magento on localhost with the old database. Even though all extensions work as they should my changes on the custom theme under //Magento_Theme/layout/default.xml do not apply. All css ...
1
vote
0answers
163 views

Magento 2 : How To Customize Validation Error Message

Is there a way to add a custom error message to a custom validator? I use already the default rule required-entry, can I define my own rules? and where exactly? I found something with overwriting ...