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
28 views

Magento2 AWS Disk Space is always full after some time

I have installed magento2.4 on AWS and after every 6 7 hours cache folder takes all the memory it always has 25 30 GB of cache data on sever and I have to delete it manually or clear the cache from ...
0
votes
1answer
27 views

Magento 2 compile css error during upgrade

I have made some changes in CSS and upgrade as usually, it gives that error but suddenly hide from and no prob will come on CSS deploying but now it struck and I have no idea why. I tried to recompile ...
0
votes
0answers
11 views

How to remove a container from the list of container where a widget can be injected?

In my custom module layout, I remove some containers that have labels. But they still appear on the back-office list of available containers for widget injection. For example, in a custom layout, if I ...
0
votes
0answers
12 views

magento 2 category field under cart price rule

magento 2 i need to create custom category tree field under cart price rule like How to acheive this
0
votes
0answers
25 views

Debugging Error while translating phrase “%s” in file %s. in Magento 2.3.5-P1

I'm currently building a site with Magento 2.3.5-P1 (installed via composer) I've added a theme (Porto) and a small number of 3rd party extensions I've just noticed that on the product pages there is ...
0
votes
0answers
9 views

magento 2 cart price rule for Buy X Get Y

I need to know Cart price rule for Buy X and Get Y I have 3 rules using Buy X and Get Y 1.Buy 1 Get 1 (third priority) 2.Buy 2 Get 2 (second priority) 3.Buy 3 Get 3 (first priority) First Buy 3 Get 3 ...
0
votes
0answers
8 views

Magento 2 not able to read the query parameters passed to category page on live server

I am trying to read the GTM parameters passed on page before page is redirected to external resource for authentication. I can read this query parameters on local server but on production server it ...
0
votes
2answers
26 views

Magento 2 Model file Const get in Helper

Magento 2 Model file Const get in Helper. I want to this type :- File Path :- GetSomeMojo\CategoryLandingPage\Model\Entity\Attribute\Source <?php namespace GetSomeMojo\CategoryLandingPage\Model\...
0
votes
1answer
15 views

Magento\Framework\Exception\LocalizedException: The XML in file “/” is invalid: Element 'event': Missing child element(s)

i am getting below error for magento 2.4 and it is working fine in magento 2.3 Magento\Framework\Exception\LocalizedException: The XML in file "/var/www/html/magento240/app/code/PPPL/PhonePe/etc/...
0
votes
1answer
46 views

Magento 2 How to get Category attribute value label

Magenot 2 How to get Category attribute value label. This code is magenot 1 and this code work to get Category attribute value label:- <?php $title = Mage::getSingleton('categorylandingpage/...
0
votes
0answers
15 views

Can i add internal links in adminhtml?

i am writing an payment module but sadly it only supports one currency. i would like to add a message which currency is supported and provide and internal link to the currency setup setting on the ...
0
votes
1answer
10 views

Display Customer Groups Dropdown in admin system configurations in custom module of Magento 2

I want to provide customer group based configuration in my custom group. So need to add customer group multiselect dropdown in system configuration at admin in Magento 2.x
0
votes
0answers
13 views

How to get an attribute of the configured product on cart page

I am trying to use a custom attribute to indicate to customers what products group together for different promotions using colour codes. I have the attribute and can get the parent product to work so ...
0
votes
1answer
27 views

Find the location an existing custom block

Please, forgive me for the probably dumb question but this the first time I use Magento. I have been asked to make a simple change to an existing page (insert a few words of text). I have been granted ...
1
vote
1answer
36 views

Magento 2 - How to override frontend javascript file

I need to overwrite a javascript file from a custom module at: vendor\amasty\module-single-step-checkout\view\frontend\web\js\model\one-step-layout.js because I need to replace a code line in it to ...
1
vote
0answers
25 views

Magento 2 : An ID is needed. Set the ID and try again

I am trying to perform order checkout on 2.4 EE and getting the below error: An ID is needed. Set the ID and try again. What can be the cause of this issue? I checked in the logs but can not see any ...
0
votes
0answers
15 views

Configure Apache and Elasticsearch Magento2 CE (Version 2.4.0), Any advice?

Ok, I found a post seems already answer my question, but still would like someone to confirm it. From this post, we know that Magento2 CE, should use this elasticsuite, instead of Elasticsearch. Is my ...
2
votes
0answers
16 views

Assign Image Role to Multiple Products Images

I have added image role by using this code namespace Vendor\Module\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use ...
0
votes
0answers
15 views

Magento2 Disable Shipping Method Selection Only in Shipping Method page

I want to ask customers to select their own shipping method rather than selecting one shipping method by default. here i tried the following code in app/design/frontend/Mypackahe/mytheme/...
0
votes
0answers
20 views

Magento 2 Payment and Review page

I want to display the error messages in payment and review page. Anyone has idea how to do it?
0
votes
0answers
20 views

Magento 2 I have product id and attribute ids, How can i automatically select that attributes in particular product?

i am making one custom form where i am loading particular atrribute collection, and save attribute id in custom table with product id. now at the moment when data save in custom table, i want that ...
0
votes
0answers
15 views

How to get Magento 2 Customizable Options with GraphQL

How to get Magento 2 Customizable Options with REST API - similar to this, but how to get same result with GraphQL in Magento 2? This Magento 2 documentation doesn't tell anything about getting ...
-1
votes
0answers
17 views

Add Card Holder Name Field

is it possible to add card holder name field to the Braintree credit card ? e.g like the picture below
0
votes
1answer
29 views

Change the default product image import directory

Dears, In magento 2.3.5, in order to add images within the product import csv, the images should be in: var/import/images While in the pass, the path was: pub/media/images My question is, is there ...
0
votes
1answer
28 views

How to manipulate special price— only for frontend in Magento 2

I want to change the special price when it get displayed on the frontend. so, if the special price is $25 then I want it to show $(100+25). How can I achieve this. I created a plugin which update the ...
0
votes
1answer
19 views

Magento 2 cart price rule Buy X get Y

In cart Price rule I need for example Buy X get y rule Means I need to select for Buy X(specifice cetegory and SKU ) for get Y(specific cetegory and sku) I need to select specific category and SKU for ...
0
votes
0answers
10 views

Hide out of stock products but show out of stock swatches on a product

Magento version 2.3.4 What I want to achieve: Don't show products that are fully out of stock, but show out of stock swatches of products. What I tried: Stores > Configuration > Catalog > ...
0
votes
1answer
17 views

How the unit tests in magento 2 are useful?

I'd like to know, what are the core benefits of running tests in magento ? How & what can be determined from the tests ? How to run a test ?
0
votes
1answer
15 views

Getting error Not registered handle cms_page_listing_data_source in Magento 2?

I have added some filter in Sales -> Order and for that add a di.xml file. di.xml file <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
0
votes
0answers
8 views

Unable to verify this site. Please recheck your verification code and try again!

Can someone help me? I've been resting on this for a couple of weeks, looking at a lot of solutions, and they haven't solved my problem, and I don't know why the Magento scan is giving me a headache?
3
votes
1answer
37 views

How to add custom js file before body tag in magento 2?

But script moving to inside body tag how to fixes this issue? Anyone can help me for this <referenceContainer name="head.additional"> <block class="Magento\Framework\View\...
0
votes
0answers
10 views

Magento2 error after adding color swatches in related products

Error: Call to a member function getShowSwatchTooltip() on null I keep o getting the above method error, because I have added color swatches for related products. How do I solve this error? Code for ...
0
votes
1answer
41 views

error getting to admin>stores>configuration page

I'm getting an error getting to admin>stores>configuration page. this started after I added a second store. I have removed the second store but I'm still getting this error. I tried to do a ...
0
votes
0answers
18 views

How to implement Ajax File Upload in Magento 2?

I have a custom form and there I'm using the default file attachment input type but I want the form uploading as a ajax. I have followed many tutorials but can't find the appropriate solution. Can ...
0
votes
1answer
13 views

How to create company account when saving the form details?

I have created customer attributes and created a custom form with the customer attribute fields. Now I want to create a company account when customer fill the form details and save it. But I don't ...
0
votes
3answers
16 views

Magento 2 how to work with CMS blocks and CMS pages on repository?

I have created many blocks but as far as I know only by exporting them from database is the only way to have their code. Is there another way to have the files? because pushing and commiting .sql to ...
0
votes
1answer
19 views

Can't download export file - The path is not writable

System - Data Transfer - Export I get this error when I try to download export csv file The path "/magento/var/export/catalog_product_20201008_102857.csv" is not writable. var/export ...
3
votes
1answer
23 views

Magento 2 - How to know all valid attributes to use in addAttributeToSelect?

I often see code like this where the developer just inserts * into addAttributeToSelect("*") instead of selecting only the necessary attributes. public function toOptionArray() { $...
0
votes
2answers
25 views

Magento 2 - How to run a script asynchronously?

In Magento 2, I trigger catalog_product_save_before event. But this observer takes a lot of time to run and it result with a 504 error. So i would like to know if it is possible and how to run an ...
0
votes
1answer
18 views

Magento 2 - Update collection data through ajax

I have a collection inside my Block file Vendor\MyModule\Block\PostsCollectionList.php protected function postCollection() { return $this->postCollectionFactory->create() ->...
0
votes
2answers
32 views

Custom module problem in Docker container

I am having an issue getting a custom module created with https://cedcommerce.com/magento-2-module-creator/ to work properly inside of a Docker container. I have tried containers from https://github....
0
votes
0answers
14 views

Magento2 Contact Us email is received via wrong from email address

Magento2 I am using SMTP for my Magento2 setup But I am facing a strange issue The contact us an email received have wrong from the email address. The name (Sender Name) is correct in the form email ...
0
votes
0answers
15 views

Magento 2.3.2 to Magento 2.3.5-p2 upgrad frontend display widget and mageTranslationDictionary error

After upgrade Magento 2.3.2 to Magento 2.3.5-p2 frontend side display widget and mageTranslationDictionary error. I have run all command still not resolve. Thank in advance,
0
votes
0answers
7 views

Add new option for existing bundle products

Can't find an example for adding new Bundle Items to existing Bundle products. I'm looking for an implementation like Upgrade Script or something similar, but I found an implementation for magento 1 ...
0
votes
0answers
9 views

magento 2 we can't generate sitemap right now

i have tried this link but nothing happens. my magento version is 2.1.5 and hEre is image PLEASE ANY HELP WOULD BE APPRECIATED
1
vote
0answers
10 views

XS Vulnerability - Failed.XSS Patch not detected (APPSEC-1716)

I have checked magento security scan and i am getting the failed patch. can any one please let me know . How to fix this and how to apply patch . is there any way to do this? Thanks
2
votes
1answer
17 views

Magento 2: Keep use default value when Updating product attribute programmatically in store view level

I have a dropdown product attribute in store view level that i need to update programmatically for specific store: I tried to update the product attribute programmatically like this: // \Magento\...
0
votes
1answer
12 views

Recoverable error while creating user

Hi am trying to create a user in magento 2 by taking custom password fields from the the checkout form but am getting below error 1 exception(s): Exception #0 (Exception): Recoverable Error: Object of ...
0
votes
0answers
16 views

Magento to compiling issue | Requested class did not generate properly

Firstly please don't label it as duplicate as I have tried everything suggested in other answers. Issue is that content of generated dir does not generate properly. Because generated dir is never ...
0
votes
1answer
20 views

404 Page Categories Not Found

We have problems with page 404 page and our URLs have two formats without knowing why. See the example below. www.mywebsite.com/catalog/category/view/s/herboristerie/id/419/ (Okay) www.mywebsite.com/...

1
3 4
5
6 7
835