Questions tagged [magento2]

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

How to get list of orders filtering by payment method

I would like to get a list of orders which have been made by a specific payment method using the search criteria. Is there any way we can achieve this? The only thing I've found is this thread: ...
0
votes
0answers
14 views

Uncaught Error: Mismatched anonymous define() module: function(t,g,u)

I have a fresh installation of Magento but this error is showing on all of the pages.This may be duplicate of some other but I cannot find solution for my problem so asking here. When I trace back it ...
0
votes
0answers
5 views

Magento 2 Multisite creating session issues

please excuse me if this is a really simple question but I have come across a very perplaxing issue. We have 2 websites running from run magento installation. The main website is running fine but the ...
0
votes
0answers
4 views

Add Shipping or Handling Fee if Residential Address

Quick question. I need to be able to add a shipping/handling fee if the address is residential. I am using Magento 2.3 Open Source and have Matrix Rates for shipping. Perhaps it could see if ...
0
votes
0answers
5 views

Selected Options not available to cart Programmatically

I am adding a product to cart programmatically and it says Some of the selected options are not currently available. while adding to cart Any solution to that? I have written this code: public ...
0
votes
0answers
11 views

How to create custom form in custom payment gateway ( Magento 2.3.5)

I'm new to Magento. I expected to create custom form in my custom payment gateway, Text field and also Image uploader. I had follow tutorial from magento :https://devdocs.magento.com/guides/v2.2/...
0
votes
0answers
14 views

hide a form attribute for a specific role in magento 2

in my case i want to hide an attribute's form for a specific role of users for example the role is = 'userrole1', this is the form attribute : <div class="admin__field" data-bind="css: $data....
0
votes
0answers
6 views

How to add custom checkout step after payment and review step?

I want to add an additional checkout step after the payment and review step. if anyone knows the solution to add the custom checkout step after payment and review step then please add a solution here. ...
0
votes
0answers
12 views

GraphQL url is throwing errors

I am very new to GraphQl Magento. When I access the graphql url in my installation, following the below tutorial, it throws the below error. https://devdocs.magento.com/guides/v2.3/graphql/ Do I ...
2
votes
0answers
10 views

Magento 2: AWS Elastic Search: Index product manually

I am using Magento 2. Using AWS Elastic Search Service. I want to index only 5-10 products. Is it possible to manually/progrmatically index only X products?
0
votes
0answers
15 views

Magento2 Fatal error due to not found interface in indexinterface.php

Fatal error: Interface 'Magento\Catalog\Controller\Product\View\ViewInterface' not found in C:\xampp\htdocs\magento2\vendor\magento\module-wishlist\Controller\IndexInterface.php on line 15
0
votes
0answers
19 views

How to get current Url value in magento 2

In Magento 1 we can the following function to get the referer url Mage::app()->getRequest()->getServer('HTTP_REFERER'); How to get it in magento 2 I have used, public function __construct( ...
1
vote
1answer
15 views

Magento2 PDF Invoice draw line between items

I need to add a line between items in Magento2 email Invoice template. I have referred below link for Magento1. How can I achieve same for Magento2 PDF Invoice draw line between items
0
votes
0answers
18 views

Magento 2 : How to add observer in core module?

I would like to add a new Observer class in module-checkout and also add this new observer in etc/events.xml. What is the appropriate way to achieve that?
0
votes
0answers
15 views

Magento 2 Custom Data Provider Listing

I'm trying to use the model in magento to show a listing of a custom table within my module. The model works and shows the listing table in the model. I can see that the get request is getting data, ...
1
vote
1answer
14 views

Does magento 2 have built in timing component like symfony stopwatch?

Does magento 2 have a built in timer component like Symfony Stopwatch? https://symfony.com/doc/current/components/stopwatch.html Would be useful for console commands / cron tasks. I'm aware that I ...
0
votes
2answers
15 views

I have to disable the MSI and enable the usual qty field only in the magento 2.3.5 version

I have to disable the MSI and enable the usual qty field only in the Magento 2.3.5 version https://www.rakeshjesadiya.com/disable-sources-in-multi-source-inventory-magento-2/ I tried to use the ...
0
votes
0answers
12 views

Magento 2 (version 2.3.1) CSV translation is ignored in Custom email

I have a custom email template in which i use the following {{trans "First Name"}}: {{var data.firstname}} It is somehow ignoring the translation in English. I am using Mageplaza translation ...
0
votes
0answers
13 views

Magento2.3.3 How to create validation class like 'required-entry' for checkout's existing field

I want to create new custom rule that will duplicate of 'required-entry' class applied on checkout page. Actually I need to change the error message for field so I want to create custom 'class' then ...
-1
votes
1answer
21 views

Magento 2 PHP Fatal error: Uncaught Error: Call to a member function getName() on null in

How solve this issue? Error log (PHP Fatal error: Uncaught Error: Call to a member function getName() on null in) is for line 4: $page_title = $brand->getName(); protected function _prepareLayout() { ...
0
votes
0answers
11 views

Apply filters or mass actions on grids with fake collection (or wirhout ui components)

I a admin grid with a change on _prepareCollection() function to get the collection from a response of api call, its working fine. But I do not have the filters or mass functions, how can I do that ...
1
vote
0answers
13 views

How to add icons to input fields if the field has not passed validation

I need to add a custom icon to the floor if the field does not pass validation, as in the screenshot. I tried to implement this functionality with ':after' in CSS &._error .control input { ...
2
votes
1answer
35 views

Database schema related change reverted

I have one of my Magento 2 projects running with version 2.3.3. There are so many simple products for one single configurable product and as a result, there is an issue with the length of the SKU. To ...
0
votes
0answers
16 views

Magento 2.3.4: Want to change the location of bundle product options near add to cart

I want these two portions of the listing in the same box under the (Choose Your Items) Button. I have tried to do with the XML but it changes the configurable list and simple product.
0
votes
1answer
16 views

How to add Price Slider Filter in Layered Navigation on category Page. Magento 2

I want to add a Slider filter (Scroller) on the SideBar currently My SideBar is but I want my Sidebar like is there is any core functionality to change the price to this slider if Yes please let me ...
0
votes
1answer
12 views

Fetch Category Image from collection object without loading category object

I am trying to get the category image from the below code $collection = $this->_categoryCollectionFactory->create(); $collection->addAttributeToSelect('name','image') ...
0
votes
1answer
13 views

Disable modules versus remove them

I have some modules that I'm not going to use. E.g Temando_Shipping, MSI modules, GraghQl modules,... Should I disable them using config.php or should I remove them from the codebase using composer ...
0
votes
1answer
10 views

Can we overwrite list.phtml and catalog_category_view in multiple modules?

Well I am vcery new to Magento, I have a module where I have already overwritten catalog_category_view.xml and list.phtml can I use the same file with other changes in other modules if Yes how?
0
votes
0answers
5 views

Want to bind my custom grid with existing core database table of magento 2

I have created a custom module under system tab. Now I want to create a custom grid on that page and binds this grid with the core magento database table "directory_country_region".
0
votes
2answers
24 views

where is simple product module folder?

From the Magento , I can tell by folder name Module-bundle is for bundle products Module-configurable-product for configurable product so what about the simple product? I can't find where it is, I ...
0
votes
2answers
13 views

Get Dropdown Value from a Custom Customer Address Attribute

I'm trying to get the frontend label of my custom address attribute and trying this:$address->getCustomAttribute("custom_attribute")->getValue(), gives me the value "95905" instead of the label. ...
0
votes
0answers
13 views

eav_attribute_option and eav_attribute_option_value not getting updated after adding custom attribute to customer admin

Basically I have been trying to add custom attribute in customer admin using upgrade data and customer setup. But here I can see in my db that my new custom attribute have been added successfully in ...
0
votes
2answers
28 views

My Observer is not executing

Hi i'm new at magento 2 and i've been trying to create a Observer for checkout_submit_all_after and looks like that the Observer is not even called. events.xml <config xmlns:xsi="http://www.w3....
0
votes
1answer
24 views

Magento 2 : How to get admin user data in observer?

I have observer of backend_auth_user_login_success. I need the data of the admin user who is login in observer. Can anyone please help me into this? Thanks in advance.
0
votes
0answers
12 views

How to display only left stock status for configurable products in product detail page magento 2?

By following this link(https://www.mageplaza.com/kb/show-stock-remaining-items.html), it shows in simple products only. But I want to display in configurable products also. Please help me.
0
votes
0answers
13 views

Set default value for Checkout Shipping Field

I want to set a default value for all the fields in the checkout shipping field. So I want to put N/A to all the field in the checkout shipping field also I want to add a class to all those field that ...
0
votes
1answer
16 views

Error to add product

In my admin area when I click on add product, I am directed to a screen with error 500, in my log, I have the following message "[2020-05-29 14:54:03] main.INFO: Broken reference: the 'product....
0
votes
1answer
11 views

How can we interchange the display of tax in magento 2

At the product detail page, we need to interchange the position of 'Excl. Tax' and 'Incl. Tax'. Please check the image.
0
votes
0answers
8 views

Display maximum price amount for configurable product in magento 2

By default magento 2 takes the lowest price from the simple product and displays on the product listing page. However, is there any way, where Magento 2 takes the highest price amount and display on ...
0
votes
2answers
28 views

How to Obsesrver place order event?

Hi i'm new at magento 2 and want to get orderId() using Observer on place order event. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
0answers
4 views

Removing a subcategory from the menu doesn't remove it

In my menu I've got 4 items: Products Services About Us Contact Us I want to delete the About us, so I went to magento 2 -> Admin -> Catalog -> Categories -> Categories -> About Us -> Delete It ...
0
votes
0answers
6 views

How to add pop up in backend above grid button

I have successfully added button "Send notification" using following code in m grid.php file: public function getMainButtonsHtml() { $html = parent::getMainButtonsHtml();//get the ...
0
votes
0answers
7 views

After deleting the authorization form on the checkout, the payment button for all Payment Methods stops working

I want to delete the authorization form on the checkout page so that any user can pay for the goods without authorization. The site will only pay via PayPay. When I delete the contents vendor/magento/...
0
votes
0answers
11 views

Embed attributes in Name or Description

I'm trying to work out a way of embedding attributes in other attributes, e.g. name or description in Magento 2.3 As an example static product name - Blue T-Shirt Size Large dynamic - {...
0
votes
0answers
9 views

How to use custom font in Menu [closed]

I have installed custom font for magento2 and can use it when styling anything but how can I change everything in menu ... categories subcategories and so on with my font ?
0
votes
0answers
15 views

Magento 2 : How to add Rule Condition in custom module

I want to add this rule condition based on yes/no field in my custom module form. In my custom module, I'm showing a form using the block method. Also, I don't want this rule condition on tab, it ...
0
votes
0answers
14 views

Add customer in grid on category edit page at admin panel Magento 2

As in the product page we can add related product with modal, I want to add the special customer to the grid table in the category page.I list,show customers in modal,i can select but when I add the ...
1
vote
1answer
18 views

Refused to connect to because it violates the following Content Security Policy directive

My js code: - const MODEL_PATH = 'http://s3-us-west-2.amazonaws.com/s.cdpn.io/1376484/stacy_lightweight.glb'; The console is throwing an error: Refused to connect to 'http://s3-us-west-2....
0
votes
1answer
15 views

Braintree Orders not Posting to Magento 2.3.3 admin

I am facing an issue on our Magento2.3.3 website when order is placed via Braintree. Some of the orders are missing in the admin but order confirmation emails are sent to customers. Even in the ...
0
votes
0answers
8 views

How to save custom model which has foreign key column

I've created a custom table to store some custom payment gateways' fee into a table sales_order_payment_gateway_fee , which is mapped by simple model Model\GatewayFee, Model\ResourceModel\GatewayFee, ...

1
2 3 4 5
790