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
1 answer
3 views

How to Autofilll custom attributes field in checkout address for logged customer in Magento 2

I created custom attribute fields like DOB, and gender on the checkout page. If you see in the screenshot birthday is a custom address attribute. I tried to fill the attribute field(custdob) in two ...
user avatar
0 votes
0 answers
11 views

Magento2 admin panel menu not working

I have Installed Magento2 frontend is working fine but there is haviing some issue with admin panel in the backend. Menus not working I had already tries This Modification but still it didn't work
user avatar
0 votes
1 answer
9 views

Weird errors with Catalog -> Products adminhtml page on 2.4.3-p2

I am getting this error with Magento 2.4.3-p2, and only in development (Docker). When I go to the Admin UI page for Catalog -> Products, I get the following error: Looking at the AJAX call that ...
user avatar
0 votes
0 answers
10 views

Magento 2 Klarna Error: 'Order line totals do not total order_amount - 17311 != 17310'

When I add a configurable product to the map and go to the second checkout step and after loading it again I reload it, I get this error: 'Order line totals do not total order_amount - 17311 != 17310' ...
user avatar
0 votes
0 answers
12 views

Magento2 programatically create coupon code error

I have a code I have used in the past. However now I have a cms page that calls in the phtml file and when I then try to go to the page in my browser i just get an error saying "an error occurred ...
user avatar
  • 791
0 votes
2 answers
13 views

How to call Magento 2 Oauth 1.0 API for services without Callback & Identity URL?

We cannot integrate with 3rd Systems like ERP with Callback URL or Identity URL in some cases. The git repository available can be used to call Oauth request from PHP https://github.com/daviddesberg/...
user avatar
  • 101
0 votes
0 answers
8 views

Magento 2.4.1 disable shipping method selection until email, name and address fields are filled and validated

Good Afternoon Everyone, I need to disable the the selection of shipping / delivery options until the address fields have been filled in and validated. I would like the customer to have filled all ...
user avatar
  • 156
0 votes
1 answer
11 views

Magento 2 setStoreId VS setCurrentStore

What is the exact(!) difference between: setStoreId() setCurrentStore() Example where the two give different results. // setStoreId solution $product = $objectManager->create('Magento\Catalog\...
user avatar
  • 1,309
0 votes
1 answer
17 views

How to run Magento CLI command in docker Magento 2.4.4?

I tried to run the Magento command in docker but am getting the error as per the screenshot. Error ScreenShot:
user avatar
0 votes
2 answers
15 views

Maento2 Rest Api for Categories

Is there any API to get all categories detail with images as well? I am using the below API but it won't return image information /rest/default/V1/categories
user avatar
1 vote
1 answer
19 views

Magento 2 GraphQL Error: Undefined property: GraphQL\\Language\\AST\\FragmentSpreadNode::$selectionSet

I am working with magento 2.4.4-p1. I got an error on calling the below graphQL query on the site. query Route($url: String!) { route(url: $url) { redirect_code relative_url ...
user avatar
1 vote
1 answer
14 views

Magento2 How to Get ID of Street Address from Billing Address Using UiRegistry?

I want to get the uid of billing address's street address at checkout page. I got the name of the field but getting the error when trying to get the uid of the field. For getting the name i used the ...
user avatar
1 vote
1 answer
14 views

How to import sensitive configuration in system?

<type name="Magento\Config\Model\Config\TypePool"> <arguments> <argument name="sensitive" xsi:type="array"> <item name="payment/...
user avatar
0 votes
0 answers
14 views

Magento 2 blocks not showing up on homepage after cloning to localhost

I have copied my Magento 2 website from production to a: Local Environment: Ubuntu 20.04.4 LTS Apache 2.4.41 MySQL Version 15.1 Distrib 10.5.16-MariaDB PHP 7.4.30 in the normal way: Copied all ...
user avatar
0 votes
1 answer
14 views

"Class string does not exists" error - only on production

so here's the situation. It is PHP 7.4, Magento 2.4.3-p1 On the production server, an error is showing up on the exceptions.log. It reads as follows: Class string does not exist at /var/www/public/...
user avatar
0 votes
0 answers
11 views

Magento 2 : Order Totals section in admin showing blank after placing order from backend

I have placed the order from admin but on the sales order view page Order Totals is showing blank. There is no issue with the frontend orders. But after placing second order from admin it works fine. ...
user avatar
  • 1,848
0 votes
0 answers
9 views

Every time I run setup:upgrade command it execute queries like ANALYZE TABLE for every table

I am using Magento 2.4.3-p2 and mysql 8. Every time I run Magento php bin/magento setup:upgrade It will execute below queries for all the tables. ALTER TABLE `admin_analytics_usage_version_log` ...
user avatar
  • 835
0 votes
1 answer
16 views

How to make id field auto increment in db_schema.xml in mageno 2.4?

I have a custom table created through db_schema.xml (code below): <?xml version="1.0"?> <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
user avatar
  • 5
0 votes
1 answer
13 views

Magento 2 - How to detect shipping method change

In Magento 2 I try to track shipping method change in JS. For exemple when pickup relay is selected I need to display a specific message on frontend. Do you how can I do this ?
user avatar
  • 107
0 votes
0 answers
8 views

Magento Email Translation Problem

I am using Magento 2.4.3 I want to show customer gender as Dear Mr. xyz, Problem is magento only provide values of gender as 1,2,3 I tried the following {{if order.getCustomerGender() == 1}} {{trans ...
user avatar
0 votes
0 answers
16 views

Widget Configuration For Product Not Appearing Correctly

I recently create a new product page In admin panel I go to Content > Element > Pages I add in 3 section of the same widget as above named Widget++ Products The content of the widget is as ...
user avatar
1 vote
0 answers
18 views

Mini-cart not showing products added

I'm developing a Magento 2.3.6-p1 store, using a based luma custom theme, and mini-cart is not showing added products, it only shows the products when i add a product, but when i reload the page, the ...
user avatar
1 vote
1 answer
35 views

How to add validation for telephone number in the format (xx) 10 numbers in address book in my account

I want to validate telephone number in the below format in my account address information page (2digits)10digits Ex : (56)1234567890 while saving data this format will be validate
user avatar
  • 1,093
1 vote
0 answers
21 views

ShipStation Shipping Label creation is not working Magento 2.4.2

We upgrade the Magento 2.2 to 2.4.2 . We have configure the ShipStation as shipping. But we are not able to create shipping label. We are stuck in Add to products to packege popup. Save button doing ...
user avatar
  • 11
0 votes
1 answer
23 views

How to add a Name variable from Billing or Shipping address?

I need to use a Name from Billing or Shipping Address in an order confirmation email. I tried several ways but none of them work… It's Magento 2.4.1 How can I do that? Thanks in advance!
user avatar
1 vote
1 answer
30 views

After upgrade magento 2.3.5 to 2.4.3, Can't update product quantity to minicart

I can't update product quantity in mini cart after upgrading the Magento 2.3.5 to 2.4.3-p2 version. I got this below error Notice: Trying to access array offset on value of type int in /var/www/html/...
user avatar
1 vote
3 answers
26 views

Magento2 reindexing

I want to know how reindexing works in Magento2. I am wondering what affects in my database when we do reindexing in Magento2. Can anyone help me in this please Thank you
user avatar
0 votes
1 answer
15 views

How to register datasource for admin grid layout

I am new to magento 2 and my magento version is 2.4. I am trying to show my custom grid on magento admin but, I get the following exception: main.CRITICAL: Exception: Not registered handle ...
user avatar
  • 5
1 vote
1 answer
13 views

Magento 2: How to show Customer Attribute in Sales Order Grid

I have created a custom customer attribute. It is visible in customer registration page and customer dashboard But it is not visible in sales_order_grid. I want to display it how can I achieve it Help ...
user avatar
  • 23
0 votes
0 answers
5 views

Magento 2 theme not displaying configurable price

I am using the Solwin FreeGo theme on my installation of Magento 2.3.4 - and I have noticed that configurable product prices are not displaying on the product page. (Screenshot attached below) When I ...
user avatar
0 votes
1 answer
28 views

Using object manager

I've question in the link below : Get grand total and customer data variables Now I solved the issue by using object manager directly, but I found too many people said it's not recommended ! Could you ...
user avatar
  • 11
0 votes
1 answer
13 views

Split button for catalog product admin page

I have created some buttons on catalog product admin page. I would like to group them in a dropdown (split) button like the Add Product button. Can you please help? My product_listing.xml below <?...
user avatar
  • 21
0 votes
0 answers
9 views

Getting error "Please enter a correct entity model" while creating product csv import

I am creating a custom product import function. While importing the csv I am getting an error Please enter a correct entity model. This is what I have done Model\Import\ProductImport\ProductImport.php ...
user avatar
0 votes
1 answer
32 views

Get grand total and customer data variables

I'm using Magento 2.4 and I'm trying to get grand total and customer data variables to be inserted to Google tracking code. I've followed the link below to create custom module to call $block->...
user avatar
  • 11
0 votes
1 answer
20 views

Adding tracking code to success page

I'm trying to add tracking code to my onepage success page. I've created layout and created success.phtml to my custom theme. app/design/frontend/my_theme/Magento_Checkout/layout/...
user avatar
  • 11
0 votes
0 answers
11 views

How to show system admin configration message on checkout?

I have created system.xml file and passed value from config.xml file want to show that value message on checkout page.like this
user avatar
  • 27
1 vote
1 answer
41 views

Delivery date in order email template - Magento 2.4.3-p2

Previously, we used the following module to load the email variable with a custom CreatedAt value. Because this is deprecated, it will not work anymore (https://devdocs.magento.com/guides/v2.4/...
user avatar
  • 1,498
0 votes
0 answers
4 views

The CSP directive 'frame-ancestors' does not support the source expression ''unsafe-inline''

I can't succeed to make this error messages removed from my M 2.4 I did my custom csp module, everything works fine except this one The Content-Security-Policy directive 'frame-ancestors' does not ...
user avatar
  • 782
0 votes
2 answers
32 views

Magento2.4.2: How to sort product by custom price attribute?

I want to sort product collection by Custom Price attribute. here is my code Here is my code, what is the problem here, i dont understand? <?php namespace Vendor\Module\Model\VisualMerchandiser\...
user avatar
  • 204
0 votes
0 answers
8 views

Magento2 admin 502 Bad Gateway error

I'm using magento with docker and deploying to a kubernetes cluster. When I install it it finishes successfully, but when I try to access the admin panel it returns the 502 Bad Gateway error. I've ...
user avatar
0 votes
0 answers
10 views

How to create custome picking shipping method in magento2

Create a 'picking shipping method' and on checkout when customer select picking shipping method on checkout display custom message after shipping methods list
user avatar
  • 3
0 votes
0 answers
6 views

Magento 2 Bundle - Remove Slide Down

When I click on "customize" it moves me to the bottom of the page. Is there a way to remove the slide down to # product-options-wrapper> fieldset? Thanks.
user avatar
1 vote
1 answer
19 views

Magento 2.4.2: Disable/hide reviews tab in the product details page

The tabs in our product details page include a tab called "Reviews". Where does that come from, and can it be hidden or eliminated? The Yotpo system that we're using already has the reviews ...
user avatar
0 votes
1 answer
18 views

add attribute of customer with primary

I want to add an attribute of customer,like phone number,how to add an attribute for primary I find source like this $eavSetup->addAttribute( Customer::ENTITY, '...
user avatar
0 votes
2 answers
39 views

Get Customer Name if its logged in otherwise return message in API Magento 2

I am trying to get the customer's name by POST Method API if it's logged in but when I hit the link the postman, returns the Customer's Name even if it's not logged in. Please take a look CODE: <?...
user avatar
0 votes
1 answer
19 views

How to add htmlContent UI Component in product_form.xml custom attribute product group?

I create a custom product attribute with a custom group like this: $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, 'trademark', [ 'type' =&...
user avatar
  • 79
0 votes
1 answer
16 views

Cron job not running since upgrading to Magento 2.2.4

In my old version of my site i had a cron that ran at 2am every morning to product some reports from my Module. I have it set up as normal with my class in the cron folder and the correct xml in ...
user avatar
  • 77
0 votes
0 answers
31 views

Magento 2 some products not showing in categories/search

Some of my configurable products do not show inthe front end when trying to navigate to them through categories or when I search for them. They do appear in the backend. They do appear in the frontend ...
user avatar
  • 1
0 votes
3 answers
41 views

Magento2.4.2: How to sort product collection by sub category as shown in this picture?

I want to sort products by sub category as seen in this picture like Sort by Summer Collection as Muzlin summer 20 or Sort by winter collection and i'm following this approach Vendor\Module\Model\...
user avatar
  • 204
0 votes
0 answers
6 views

Magento2 why catalog_category_view handles both category list and category products?

I'm using Magento2, Hyva-Theme. I was working on catalog_category_view.xml and I came across this problem: If I reach catalog_category_view.xml page I wanna see first all the subcategories linked to ...
user avatar
  • 13

1
2 3 4 5
921