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
12 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
16 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
42 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
18 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
19 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') ...
1
vote
1answer
18 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
14 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
8 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
27 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
26 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
26 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
32 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
26 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
18 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
12 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
39 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
5 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
7 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
20 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
20 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, ...
0
votes
1answer
20 views

How to properly replace database in Magento 2?

I want to connect my Magento 2 to a new database, I've updated the /app/etc/env.php What other steps do I need to take
0
votes
0answers
25 views

how to show stock quantity on module-catalog-widget (luma theme, grid.phtml)

I try to show product quantity on module-catalog-widget (grid.phtml) by using the below code (Magento 2.3) <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState =...
0
votes
0answers
18 views

Store switch error in admin magento 2

I have a custom module. when I switch store view it not show anything. normally it still working fine in all store view update: I have added it in XML file <referenceContainer name="page....
1
vote
1answer
19 views

Magento2 Cannot pass data into form

I have Mageplaza/HelloWorld/Controller/Adminhtml/Post/Edit.php <?php namespace Mageplaza\HelloWorld\Controller\Adminhtml\Post; use Magento\Backend\App\Action; use Magento\Backend\App\Action\...
0
votes
0answers
16 views

How to disable auto logout customer function in magento 2

I have some customers in my Magento2 application, now I try to delete them from backend. When these customers status is "Logged-in", they will auto logout by the system when they refresh the page. ...
0
votes
0answers
8 views

How to create export grid listing to csv file in magento with filter and search?

I wrote a controller to export data from grid to CSV. It work fine, but I call the export controller directly and it export all data. It not follow the grid result when user filter. I want to export ...
0
votes
0answers
6 views

magento 2 Product description tab image problem gets smaller?

As shown in the image bellow im importing image in product discription with original size is (826px x 8191px) but after importing it it's getting smaller and resized to (152px x 1507px). how can i ...
0
votes
0answers
12 views

How to implement prices by range

We have an online store in Magento 2, and we need to calculate prices according a price table like this. The product page has two text fields where users type their measures. After they type the ...
0
votes
0answers
5 views

Maximum of selected options in multiple select attribute in Magento?

We have a shop and have run into problem since multiple select attribute is set to "varchar" and can only have 255char. This means we can have aprox 51 different options per product but we need more ...
0
votes
1answer
21 views

How to test module in different Magento and PHP versions using CI?

I have an open-source module in Github and I'd like to automatically test it via CI using the Magento Coding Standard and different Magento installations in different PHP versions. For example: ...
0
votes
0answers
14 views

Magento2 move a specific div id inside on the bottom of another div

I have a div with id homepagebanner I want to move this div to the top of the div with id maincontent I am not sure how to edit the default cml this would be for the homepage only . <page layout=...
0
votes
0answers
8 views

Options Not Displaying in Configurable Products Dropdown On Front End

We have a configureable product, with a couple options under each Configurable option. On the front-end, when viewing the product, the dropdowns do not populate with these options. We see "Choose an ...
0
votes
0answers
7 views

Add saved credit card to dashboard

I'm wondering if paypal payflow has the ability to allow a customer to add a credit card to the paypal payflow vault from the magento 2 dashboard? I know that the customer can remove a credit card and ...
0
votes
1answer
37 views

How detect mobile in Magento 2?

I can't find the correct code to check if my Magento 2 site is visited by Mobile. These are the two codes that I tried in the header.phtml file in my custom theme but they don't work: $userAgent = $...
0
votes
0answers
5 views

Can CE extensions be used in EE edition Magento 2

What would happen if I install the CE extension in EE Magento 2 store? Will my CE extension work exactly same or it will throw an error? Also why EE extensions are costier than CE?
1
vote
0answers
10 views

CSP Reports being thrown, even after allowing links in whitelist

I created a new module to allow urls, and have them not make noise about csp. I have a csp_whitelist file under /etc, and I've added all of my links to it (and cleared the cache), but the warnings ...
0
votes
0answers
15 views

How do you remove the wrapping DIV from Page Builder elements?

Page builder seems to like wrapping everything in a <div> tag. This is causing an issue especially with HTML elements which for some reason is automatically wrapped with... <div data-...
0
votes
1answer
37 views

Magento 2.3.4 - How to create filter by product rating in layered navigation

I want to have a filter by product rating in layered navigation. Regarding this, I found a solution Magento 2 : Rating Filter in Layered Navigation. This is working fine if you modify vendor\magento\...
0
votes
1answer
23 views

How to create custom plugin for TinyMCE 4

I'm trying to add ability to create custom forms with TinyMCE 4 but can't understand how to do it properly. I should create my custom plugin and then connect it to editor, but can't find any useful ...
0
votes
0answers
6 views

Add Product Attribute to Product Selection From Order Create

I'm trying to add a column to the product list table when creating an order. I followed the Q&A from Magento 2 add custom column in product grid? but wasn't not able to achieve my desired outcome. ...