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

Instanciate Class on Magento 2 and pass Array

Im building a custom module, this one is using an external lib, everything looks like its working, anyway now i need to instanciate the class with something like this php: $myClass = new Class(array('...
0
votes
0answers
16 views

Sorting products based on a custom attribute Magento2

I have a plugin that adds some custom product sorting, based on a customer attribute, in a way similar to below. # Vendor\ModuleName\Plugin\Product\ProductList\Toolbar; case 'capacity_low_to_high': ...
0
votes
1answer
21 views

Magento 2:How to add custom validation in Address book form?

Hello i want to add custom validation in address book of customer Account dashboard, when the customer is sign in they have one tab address information in that when we add new address that open form i ...
0
votes
2answers
29 views

How to add a block in Luma header

How can I add a static block to the top header in Luma theme (see screenprint) ?
2
votes
1answer
18 views

Event not fired when Full Page Cache is enabled in Magento 2

I am trying to run a piece of code on every page load. I have the following <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/...
0
votes
0answers
34 views

why magento2 is Showing multiple images on product detail page?

why magento2 is showing multiple images on product detail page? I am importing just base image through CSV file. I just want that one image on product detail page. but on product detail page i am ...
0
votes
0answers
9 views

Custom map file

I have a one little question about this error, i don't know where i do wrong, getting error message. Have somebody can help me to see the problem? Thank you very much! public function getLatLong($...
0
votes
0answers
15 views

Magento 2: how to add custom extension to product photos

I have a module that outputs an iframe. I need to place it in the place of the photographs, so that the photographs are also there. That is, the user can view photos and optionally switch to my module....
0
votes
0answers
18 views

How to resolve this Composer Update problem?

Please have a look on the screen shot below and let me know: What's the concrete problem here (it is not clear to me)? How to sort it out? Is there any way to do this update ignoring these ...
0
votes
1answer
16 views

Magento2 : Grand total changes to zero after placing the order

I am facing the issue of grand total becoming zero after placing the order in magento2. Some 3rd party module changes that. I want to know how to recollect the grand total again and set it as while ...
1
vote
0answers
18 views

Upgrading Magento and missing files

If I do the following php bin/magento maintenance:enable composer require magento/product-community-edition 2.3.3 --no-update composer update rm -rf var/di var/generation php bin/magento cache:flush ...
0
votes
0answers
21 views

Magento 2.2.3 + PHP 7.1.32 results in “Function mcrypt_module_close() is deprecated” error

I am running Magento 2.2.3 together with PHP 7.1.32. The M2E Pro extension throws the Function mcrypt_module_close() is deprecated error. I tried adding @ in front of any mcrypt calls, did not work. ...
0
votes
0answers
13 views

Magento 2 : Add custom data in product attribute using plugins

I want to add custom data of product attribute using plugin. Path : stores -> product -> edit attribute and save record. Class : Magento\Catalog\Controller\Adminhtml\Product\Attribute\Save I ...
0
votes
1answer
15 views

How to add language switcher in popup on loading Magento2 homepage for first time

I am creating a website with 2 store views - English and Arabic. I would like to add the language switcher inside a popup when a user opens the homepage. But the popup need to display only once (...
0
votes
0answers
26 views

upload file on server using FTP

I am uploading XML file using $ftp->write function. And in that function where I can pass a directory path where I want to upload my file on server? Please advise
1
vote
1answer
18 views

Magento 2: How to not use URL /home

By default, Magento uses the URL key 'home' for the CMS homepage. The problem is that the homepage now has 2 URL's. http://example.com/home and http://example.com/. I don't like this behaviour, it ...
4
votes
0answers
34 views

Running a single MFTF test that is included within a suite

I am trying to only run the test StorefrontVerifySecureURLRedirectCheckout. To run it I am using the following command: vendor/bin/mftf run:test StorefrontVerifySecureURLRedirectCheckout -k (I have to ...
2
votes
1answer
27 views

Update Cart Item quantity by customer quote id in custom API

I want to Update Cart Item quantity by customer quote_id in custom API. I have tried below code but it's not work with Magento 2.3 $quote = $this->quoteRepository->getActive($quoteId); ...
0
votes
0answers
8 views

Magento 2.2.6 Category items do not line up in the specified position

Currently, there is a problem that items are not lined up at the position specified in the category. I use Ultimo for the template. Please tell me the solution.
0
votes
1answer
23 views

Magento 2 : Import product with external image URL

I have a CSV file with image field is external image URL, how can I import it, hope anyone help me.
0
votes
0answers
10 views

Magento2 : Product attribute label translated into wrong language

I am currently experiencing a weird issue, where Magento the product attribute translated into a wrong language. I am running a Magento with more than 10 websites and each website has 1 or 2 store ...
0
votes
2answers
53 views

Magento 2.3.2: How to override a Inventory Deduction API model?

I want to override below Magento core file vendor/magento/module-inventory-source-deduction-api/Model/SourceDeductionService.php to add code $qty=0; inline 83. I tried by my self but getting an ...
1
vote
0answers
12 views

Magento 2 display if order status value contains both Delivery / delivery

We have migrated orders data but old orders we have sales_order_grid & sales_order order status is Delivered but in M2 we are considering status as delivered We would like to adjust the order ...
1
vote
1answer
50 views

Upgrading 2.2.8 to 2.3.3

If you are upgrading from 2.2.8 to 2.3.3 would it be advisable to start a fresh eg composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition myproject and ...
0
votes
2answers
33 views

Magento 2 Get custom attribute values in phtml

I want to populate attribute(Gender) values in select dropdown on listing page. On selecting specific value of the gender attribute, the product list should be filtered. The gender attribute has 3 ...
0
votes
0answers
8 views

how to display numbers row of tables fields to system configuration

I learning custom module, I want to display numbers row of tables fields to system configuration How to get number row of tables in database and set it to in field for system configuration. Thanks
2
votes
1answer
24 views

magento2 Programmatically change theme in runtime

I have a cookie variable mobile-application = "yes". I need to set a custom theme depends on this variable in magento2. I've already created a custom theme. How I can set it programmatically in ...
0
votes
1answer
28 views

Magento2 : Getting Error when enabled Flat catalog Category and Product

I am using magento 2.3.2. My site takes too much to load. I enabled flat catalog category and Flat catalog product. See https://prnt.sc/pgr3xu. But on site when i click on any product it gives me ...
1
vote
1answer
39 views

Why I can't change any configuration in admin panel?

I have all access to the admin panel by my user, I tried to use production and developer mode, I keep seeing the options locked as the image below. I can't click into the Use Default option, it's ...
1
vote
0answers
22 views

Why my Magento just send order emails using the Send Email button?

I have my cron configured, but my order emails are sent just when I click on the Send Email button. How could I have my emails send via schedule?
1
vote
0answers
30 views

Magento 2: Autoplay product video when video icon on left panel is clicked?

I want to autoplay video when video icon on the left panel is click. Once the video icon is click the video on the container will automatically play. Here is the current classes on the video icon: ...
1
vote
0answers
13 views

How to schedule a transactional email locally?

I want to test any transactional email by a schedule in my local environment. How could I do that in my local?
0
votes
0answers
30 views

Magento 2: Missing Default Inventory Stock and Source

While running the Magento indexer commands I received this error: No linked stock found. After checking the backend I realised that there is no default inventory stock entry or source. I am running ...
1
vote
1answer
14 views

How to fix URL rewrites massively via SQL?

I had migrated my store from Magento 1 and I'm having many URLs that contain .html.html in the final of the string. I want to update all my 88187 URL rewrites, replacing .html.html to .html I ...
0
votes
0answers
19 views

What makes a good theme for performance and reliability?

I am researching the most efficient themes for Magento 2 that will be reliable and supported hopefully for 4 to 5 years. On our current Magento, theme bloat is a big issue. We have extensions for a ...
0
votes
1answer
26 views

In Magento 2 how can I return a collection without the top 10% and bottom 10%?

I am looking to return a subset of reviews for example but discard the top x% and bottom x% I could do it with an SQL query such as SELECT * FROM ( SELECT review_date, review_score, @r:= @r + 1 ...
1
vote
0answers
9 views

Which emails are send by schedule?

I'm having some emails been sent by my Magento 2, and others not, I'm suspecting that the Magento has sent just the transactional emails sent immediately, not the emails by cron schedule, even with my ...
0
votes
0answers
13 views

Magento 2.2.5 Changes in Controller Don't Work

I am POSTing data to a controller and saving that data to a session variable for later use. I have no problem accessing the session variable later but I made a typo with how one of the value was sent ...
0
votes
0answers
79 views

Magento 2.3.3 Possible Issues

Magento just released a new version 2.3.3 with 170 core bugs fixes, supported PHP 7.3 and PSD2 compliance for core payment methods Has someone faced any issue in Magento 2.3.3? Thanks
0
votes
1answer
25 views

Magento 2 Price of configurable is zero on store front

We make an import of CSV with products programmatically and getting prices $0.00 on the storefront for the first time. After some minutes it's getting normal. I am using Magento 2.2.9 Community ...
0
votes
1answer
10 views

Store time in js

I need to use current store timestamp in js or phtml file, how can always have current store date-time or timestamp when phtml is cached and I cannot pass this variable to js. Any help will be very ...
0
votes
0answers
14 views

is it possible to add a plugin for Magento\Framework\Filesystem\Driver\File class?

I have tried to add around plugin on Magento\Framework\Filesystem\Driver\File::readDirectory method but couldn't succeed. <type name="Magento\Framework\Filesystem\Driver\File"> <plugin ...
0
votes
0answers
7 views

Amazon Sales Channel Failed to schedule the listings

I have the Amazon Sales Channel installed on Magento 2.2.9 . I have 4 products in the "Ready to List" tab. When I try to publish them to Amazon I get the following error message: Failed to ...
0
votes
1answer
21 views

How to override “gift card added to cart”

I need to override the action fired when a customer sets a gift card in his cart. I need to apply a custom check against an external web service about the validity of the gift card applied. Which is ...
0
votes
1answer
13 views

mageplaza social login LinekdIn error

For some reason when I try to use the MagePlaza Social Login extension, LinkedIn login throws this error: my configuration and ID on LinkedIn Please help!
0
votes
0answers
9 views

How to pull shipping Method title column in transnational emails

I need to Isolate the Method Title column from the shipping selector and display it in transnational emails. the Carrier title has been removed from the site but I am still having problems with the ...
0
votes
0answers
12 views

How show old price in final price of configurable product in magento 2.x

ok i have this problem, i add the configuration to show old price on base price of the product see this pic so now see this function correctly , so when i choose a option, if this have a special ...
0
votes
0answers
8 views

Magento2 - Empty cart by customer email in API

I am struggling to empty the cart by email in the API. The store is multi-website and my API endpoint works in that it takes an email and returns a message. The customer ID is retrieved but the ...
0
votes
1answer
15 views

SQL Error when importing bulk data. Product_id goes out of sync with Entity_id

When importing about 12000 rows of products from a .csv file, it suddenly gives me the following error: General system exception happened Additional data: SQLSTATE[23000]: Integrity constraint ...
0
votes
0answers
18 views

Getting Error Popup on frontend Magento 2.3.1

some time show popup error on screen.. Getting Error Popup on frontend Magento 2.3.1