Questions tagged [magento2.4]
Denotes questions related to the features included in Magento version 2.4.x
1,714
questions
0
votes
1
answer
13
views
Magento 2 Hosting
I am running 2.3.5 and in the process of moving to 2.4.6. We are currently using Webscale (formally Magemojo) for hosting and have been for several years.
I am Looking at Nexcess.
I am not sure what ...
0
votes
0
answers
8
views
Exist a way to one file for all language?
I'm doing my .csv for language files in Spanish.
I need to do es_BO, es_ES, es_CL, etc for every kind of language.
Is possible to do an "es_*" or similar?
Thanks
0
votes
0
answers
19
views
Error: Cannot instantiate interface Magento\Catalog\Model\Layer\ContextInterface Magento Plugin
I've created a plugin in Magento 2.4.5 to overwrite Magento\CatalogSearch\Model\Layer\Filter\Price 's method.
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/...
0
votes
1
answer
16
views
Magento 2.4 Admin Custom Controller Check If User Logged In and Redirect to Login If Not
In an Admin Controller Class, How do I check if the admin user is logged in, then redirect to the login page if not logged in, then return to the previous controller after login?
A cut down version of ...
0
votes
0
answers
6
views
Why is the Magento AbstractMethod class throws an error when I use Dependency injection on my own class that extends it?
I have a simple payment method module.
I have successfully used Dependency Injection on both the 2 Controllers I have for 2 new Routes and on my Observer where I grab some data from the config.
BUT, I ...
0
votes
1
answer
23
views
Redirect to Home after login
I've been strugling with this a lot, I have to redirect the users to Home when they login to the site. I've been following solutions given in other questions about the same, but nothing works, here ...
0
votes
0
answers
18
views
Why does my own payment method not get disabled?
I have created a payment method module in Magento 2.4.4 after a lot of trial and error and I finally have a small working version that works both in the adminhtml and the frontend.
The problem I have ...
0
votes
0
answers
9
views
Error on exporting Advanced Pricing
I'm new on setting up Magento. I'm currently on 2.4.6-p2, running on Apache 2.4.58, php 8.1, MySQL 8.0.35-cll-lve.
I have a setting of 2 Web Site, both having 1 Store View.
When I tried to export the ...
1
vote
1
answer
39
views
Products regularly not showing up but reindex
I'm new on setting up Magento.
I'm currently on 2.4.6-p2, which I had imported a list of products by csv.
Previously on the Index Management I was using "Update on Save" which the product ...
1
vote
0
answers
17
views
Add field to Checkout
I created a custom field for customer:
<?php
declare(strict_types=1);
namespace Vendor\MyModule\Setup\Patch\Data;
use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetup;
...
0
votes
0
answers
8
views
Added custom field/attribute to magento 2 pageBuilder all content types but the attribute is not displaying on frontend html
I extended magento 2 pageBuilder media content types (image, banner, slide, slider etc..). So if I add any value in that custom field that will be displaying on frontend CMS (home) page correctly but ...
0
votes
0
answers
21
views
Change url filter in Magento 2
Me again.
When I filter in a category in Magento, it show a page like www.mymagento.com/mycategory?cat=3
Exist a way to replace the ID for the name? for example www.mymagento.com/mycategory?cat=...
0
votes
1
answer
25
views
Show all products from root category
Exists a way to show all products from all categories in a page in Magento 2.4.6?
for example www.mymagento.com/all-products.html
Thanks
0
votes
1
answer
39
views
I can't add custom css file
I created the default_head_blocks.xml file in app/design/frontend/Magento_Theme/luma/layout and the local-m.css file in app/design/frontend/web/css/
and the code for the xml is:
0
votes
0
answers
8
views
Magento2.4.5: How to lazy load Jquery and remove unused scripts from Theme Desgin?
I want to optimize my website and remove unused javascript/jquery and also defer or lazy load javascript/jquery for better performance
any tools or techniques to achieve this?
0
votes
0
answers
17
views
Cart Price rule is not working if the product is available in multiple categories Magento 2.4.6
In my magento we are using Mexbs Bunlde Discount extension to create cart price rules.
i created one rule like - A product from X category + B product form Y category + C product from Z category for ...
0
votes
0
answers
15
views
Broken layout XML LUMA CE2.4.6-p2
Broken layout XML files after installing Magento 2.4.6 on Ubuntu 22.04 Nginx, PHP 8.1.
domain: kiqlik.com
Looks all good in the front...
/var/www/html/2.4.6-p2$ cd /var/www/html/2.4.6-p2/var/log
...
0
votes
0
answers
18
views
Composer conflict : Magento Upgrade from 2.4.2-p2 to 2.4.3
I am working on upgrading a bit older Magento site (version 2.4.2 to 2.4.6) hosted in AWS. I began it as a series of incremental upgrade through versions and subversions to avoid dependency version ...
0
votes
2
answers
24
views
Creating custom redirect payment method?
I've been having trouble finding documentation to implement a custom payment method. The flow needs to be like this:
User selects [custom payment method] on the checkout page.
Order is placed.
...
0
votes
0
answers
24
views
Finding attribute option value between configurable product and its simple products by sql query
Using Magento 2.4
MaySql 8
I am investing now a lot of time to try finding the option_id (red marked) of the connected simple product to the configurable products.
I ended up in the following tables:
...
1
vote
1
answer
25
views
Itemcollection get latest updated_at item - Magento 2.4
We use the following code, to get the last item that was most recent updated.
$itemsCollection = $cart->getQuote()->getItemsCollection();
$itemsCollection->getSelect()->order('updated_at ...
0
votes
4
answers
45
views
Magento2.3.5: How to optimize product export scripts?
I Have a product export script that uses product collection to create an array and write the array to CSV, I want to know if this script can be optimized.
<?php
error_reporting(E_ALL);
ini_set('...
0
votes
1
answer
18
views
Our Magento website show file log name like debug.log-20231106.gz, Where and how can I change it?
I think normal, Magento doesn't change the file log every day like this.
https://prnt.sc/Fu2U8hDurkAs
Does anyone have experience with it? Thank you so much!
0
votes
1
answer
13
views
Magento 2 after programetically cancel the order stock restored but item showing as out of stock message in reorder process
I am facing a problem with resume order process.when customer click resume order I am cancelling the order programatically and creating new order with the same qty. In this process the stock is ...
0
votes
2
answers
30
views
Magento2.3.5: How to remove index.php and theme id from url?
my website homepage is accessible with index.php and theme ID which is as below
https://baseurl/index.php
https://baseurl/porto_home_26
how do I fix this issue?
0
votes
0
answers
15
views
Using Page Builder Apply the Multiple Template
I am using a page builder in Magento2. I need to apply the multiple templates in blocks or on the page but once I apply the one admin template on a block it's overwritten the older template. Please ...
1
vote
1
answer
35
views
Custom Attributes and Shipping Method
I'm very new to Magento. I installed version 2.4.6.
And I'm trying to make a shipping method to estimate the cost of shipping.
I created three new products' attributes (height, width, and length), ...
1
vote
2
answers
66
views
CollectRates() in getAllItems() is empty
I'm using Magento 2.4.6.
When I try to access $request->getAllItems() it returns an empty array.
Also, I'm trying with Quote and the same result.
public function collectRates(RateRequest $request) /...
1
vote
1
answer
27
views
Magento2.4.3: While importing products, getting this error (The value specified in the URL Key field would generate a URL that already exists)?
I'm trying to import products and while importing I'm getting this error, i have tried this extension for URL rewrite but still getting this error, any temporary fix for this problem
0
votes
0
answers
10
views
Multi-website redirects to main domain
In the same Magento instance I've configured two different Websites with only one Store and two Store Views for each Store.
Website 1 -> Store 1 -> Store View 1
Website 1 -> Store 1 -> ...
0
votes
0
answers
18
views
Magento2 integration tests magentoConfigFixture getting empty value for obscure field
i am writing integration tests for my custom module that has a configuration field type obscure.
in test file app/code/Foo/Bar/Test/Integration/Model/ConfigTest.php i have code:
<?php
namespace ...
1
vote
1
answer
22
views
Product Detail page custom option in accordion not validating in Magneto 2.4.6
After upgrading Magento 2.3.3 to 2.4.6-p3, custom options of product are not being validated in Magneto 2.4.6. In Magneto 2.3.3 we added validation ignore to apply validation on hidden field
$('....
1
vote
0
answers
34
views
Auto Logout Issue in Magento 2.4.4 when Accessing Review Report – Suspected Source in Controller and Block Files
I'm currently working with Magento Commerce 2.4.4p4, and I've encountered an issue when accessing "Marketing > All Reviews." Upon reaching the review page, it appears that the session is ...
1
vote
0
answers
21
views
Magenerds Baseprice not working in Magento 2.4.6?
I am using Magenerds Baseprice in my shop. It worked in version 2.3, in 2.4.6 it stopped working - the base price is not updated on swatch change. I tracked it down to \vendor\magenerds\baseprice\view\...
1
vote
0
answers
17
views
How can I remove base currency conversion from the table rate shipping method?
The shipping price needs to be set without converting base currency from a CSV file. As the base currency, I have set Kuwaiti dinar, and Saudi Riyal as the default display currency. In the current ...
1
vote
1
answer
20
views
Magento2.4.3: After decreasing quantity to 0 on cart page, product doesnt remove from cart?
I want to update the cart page when the quantity goes below 1, it works fine if the quantity is above 1, but it does not change the cart if the quantity is below zero as shown in the picture below, ...
1
vote
1
answer
57
views
Magento not showing products in category list page due to elastic search issue
I am getting that exception when view category in front end , I did re index also.
[2023-11-09T05:26:45.393702+00:00] report.CRITICAL:
Elasticsearch\Common\Exceptions\ServerErrorResponseException:
{&...
1
vote
1
answer
31
views
Magento2.4.6: After upgrade magento from 2.3.5 to magento2.4.6, getting this error "Attempt to read property "paymentMethods" on null"?
I have upgraded my website from magento2.3.5 to magneto2.4.6, and everything works fine but when I open any order detail page that was placed before upgradation, it gives me this error, any idea?
1
vote
0
answers
41
views
Magento2: Guest checkout error - No such entity with cartId =
I'm getting this error while guest checkout. Please let me know if anyone knows the solutions.
No such entity with cartId = b9bjhi5wbeEs20PIP9WXxiBgF32gcpHY
Adobe Commerce ver. 2.4.4-p2
Thank You.
1
vote
0
answers
14
views
ProductRepositoryInterface plugin how to join another table with sort option?
I need to add the most-viewed and best-seller sort options into the rest/v1/products API. I created a plugin to add sort condition for following of below link
How to add custom sort like Most View ...
1
vote
0
answers
47
views
How to show preview selected options of multiselect attribute in magento2 product form?
I am trying to extend the Magento multiselect element to show the preview of options selected as per below screenshot.
https://i.stack.imgur.com/uUYtR.png
I tried to override Template file and js ...
1
vote
0
answers
14
views
String manipulation in Customer Order Email body
In Magento 2.4, I have a need to process both shipping and bliling addresses before sending the email alert to the customer. Basically I need to do a regex replace of addresses. It should be ...
0
votes
0
answers
15
views
Magento 2 Multiple translations
Is it possible to implement multiple translations in a "Magento 2" way?
I have a form on my website where I should have the same language text as a user browser language. How to achieve it?
...
1
vote
0
answers
20
views
Magento 2 - How can I update the cart summary totals when quote grand total is modified
I have a controller that is called by ajax in the cart page. A gift card amount is passed to the controller and a function then updates the quote grand total based on that amount.
protected ...
0
votes
0
answers
17
views
Magento 2 error: CGI Generic Local File Inclusion
I get an error "CGI Generic Local File Inclusion" in the report. The issue is on the Magento or server side, and how can I solve it? Any suggestions or help to fix the issue?
Thanks in ...
2
votes
0
answers
34
views
How to integrate Google Pay library into website?
I'm trying to integrate Google Pay into my Cart page. But, I always get an error, it looks like this:
Uncaught Error: Script error for "https://pay.google.com/gp/p/js/pay.js" https://...
0
votes
0
answers
18
views
Uncaught TypeError: Cannot read properties of undefined (reading 'modal') error in Magento 2.4.6
we recently upgraded from magento 2.4.3 to magento 2.4.6. In my previous version below code is working properly.
/**
* Magedelight
* Copyright (C) 2019 Magedelight <[email protected]>
*
* ...
1
vote
2
answers
103
views
Class "Zend_Http_Response" not found error in magento 2.4.6
In my magento2.4.6 am facing below error -
"Error: Class "Zend_Http_Response" not found in C:\xampp\htdocs\wff\app\code\Amasty\InvisibleCaptcha\Model\Captcha.php:100" -
$...
0
votes
0
answers
20
views
Magento 2.4.6-p2 ReservationData::__construct(): Argument #2 ($stock) must be of type int, null given - when redirecting to third party payment
I am getting the above error randomly when redirecting to third-party payment page after clicking on the Place Order button.
This mainly occurs when a failed payment, and when we retry the checkout ...
1
vote
1
answer
72
views
Magento2 : Get Customer Phone number in Abandoned Cart Reports
Currently core magento2 gives Customer name, email, qty, subtotal, created, updated, applied coupon and ip address in Abandoned cart reports.
It is in Admin panel. Reports > Marketing > ...