Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

1,197 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
2answers
3k views

Magento 2.2 error “The page isn’t redirecting properly”

I am testing my own module on Magento CE 2.2.0 but keep getting "The page isn’t redirecting properly". Looking at the network traffic I see these requests: /magento22-acumulus/admin/ /magento22-...
8
votes
0answers
306 views

Magento 2: Observer add product to cart?

I've read some other post about adding products to cart, but nothing seems to fit. I've an observer for checkout_cart_update_items_before that adds another product in same qty if specific product is ...
5
votes
0answers
35 views

Magento2 : Reduce time of Product Update API Using REST

I have created an API to update Product Price, Product Cost, and Tier prices. The issue is the API response timing in around 7 to 8 secs every time for a single product update. How can I reduce this? ...
5
votes
1answer
95 views

This order no longer exists for all sales orders > 1 month

i just realized that i cannot open any SO which is created more than 1 month ago, i'm getting error This order no longer exists : respective records exist in tables sales_order and ...
5
votes
1answer
655 views

Pass data to child template in cart-items of checkout page

My site is a market place site where vendors(sellers can sell their product). Now i want to customize the to group items in cart by each vendor like this: http://prntscr.com/hmsam6 ...
5
votes
3answers
965 views

Slow transaction on /customer/section/load Magento v2.2.5 CE

I was recently seeing slow response times on our Magento 2.2.5 CE installation, so we installed NewRelic to monitor some site metrics. One thing that instantly stood out to me was the /customer/...
4
votes
0answers
27 views

Where, why and how are we using Data Providers in Magento 2

Explain how to use Data Provider, situations and requirements. Tips and advices will be a plus.
4
votes
0answers
76 views

How to limit the search index fields in Magento?

We are using elastic search 6.x and facing search index limit exceeded error. As per this doc https://support.magento.com/hc/en-us/articles/360003290654-Exception-on-category-page-with-...
4
votes
1answer
162 views

PayPal All-In-One Payment Solution - Clone to multiple options in checkout process

TLDR; Clone "PayPal All-In-One Payment Solution" payment method to have THREE different payment options in “Payment Method” section of the checkout process. Magento 2 comes with "PayPal All-In-One ...
4
votes
0answers
213 views

How to display and save extension attributes on Magento 2 Admin create order page

I have created extension attributes to order for rest API services. Also, I'm able to display the attributes on the order grid. How can I display the same attributes on admin create order form and ...
4
votes
0answers
93 views

Module version in composer.json

I'm running the static tests on one of my modules and on magento version 2.3 it reports an inconsistency: Version must not be specified in the root and package composer JSON files in Git Failed ...
4
votes
0answers
70 views

Apply unique images by attribute to each sku magento 2 programmatically

How can I perform this task through a script? I already relate the configurations to the product with this segment $attributeModel = $this->objectManager->create('Magento\ConfigurableProduct\...
4
votes
0answers
124 views

Removeing exist item during update items from cart : magento 2

I am doing some customization work on cart page. I want to add product multiple times with same configuration during update items. Add to cart is working good but existing items get removed during ...
4
votes
2answers
317 views

Magento2 Delta Migration Issue

I have already migrated from Magento1 but after completed migration, I've added some more products on Magento1 site & also some customers have been added. So I want to include those products,...
4
votes
0answers
362 views

Magento 2 First Name is a required field Error While Placing Order

When I try to place an order after the customer registration/Login. Magento 2.2.5 shows "First Name is a required Field Error". A Sample error message is attached. This is the response I am getting:
4
votes
0answers
36 views

How can I create a key value input type for a product attribute?

I'm trying to get a table on a product page that exists of 2 columns. I want to use this to display technical details about that product. The first column would have a value like: 'volume' and then ...
4
votes
6answers
1k views

setup:static-content:deploy NOT UPDATE

I'm using Magento 2.2.2 & Redis, I have others language store in my Magento. I edited the app/fronted/(theme) .phtml file and then ran php bin/magento setup:static-content:deploy or php bin/...
4
votes
1answer
920 views

Pop-up modal on clicking 'Add to Cart' button!

In Magento-2.2, when we click 'Add to Cart' button, we need to show the following message as a pop-up modal: "Product is added to cart!" I know how to create modal outside of Magento with css. ...
4
votes
1answer
1k views

Magento 2.2.1 Checkout page broken and Js fail to load error

I have installed Magento 2.2.1 and set up my custom theme but checkout page looks broken and consoles showing errors: Not sure how to resolve this issue. Need help how can this be resolved. How ...
4
votes
1answer
192 views

Magento2: Cant change store in product listing and product detail page

I have successfully created multistore with different languages with URLs like: http://localhost/magento22/english/ http://localhost/magento22/french/ I can change store only in homepage. When I go ...
4
votes
3answers
581 views

Search Engine Robots Section Can't Be Changed (Grayed Out)

I have a fresh install of Magento 2.2. This is a test site, so we need to hide it from search engines. I found the Search Engine Robots section under - Content - Design - Configuration - Our theme, ...
3
votes
1answer
31 views

After enabling the SSL Magento gives 404 error to internal pages and to css and js

I am having a very irritating issue after i enabled the SSL in my website. I changed the Base URL (Secure) from http to https and I set "Use Secure URLs on Storefront" to YES. Then I regenerated ...
3
votes
0answers
68 views

How to reinstall module without any downtime or trigger InstallSchema.php on already installed module?

I am trying to reinstall a module on Magento ver. 2.2.8 to trigger the InstallSchema.php of a module without any downtime. My question: Is there a way of reinstalling the module or at least running ...
3
votes
0answers
28 views

Email not sending from admin in magento2

If I can place an order from the frontend, then the order email was sent successfully. But in the admin side, (Invoice, shipment, notify, send email) Email is not sending in live. But both side ...
3
votes
0answers
336 views

Magento 2: Uncaught TypeError: Cannot read property 'items' of null for restricted permission user

Note: This is not a duplicate of any similar error I have found a strange bug in Magento 2. It shows the following error in the browser's console for only restricted admin user (the user which has ...
3
votes
2answers
241 views

Run Magento 2 inside a Docker Container

Is there a way to run my existing magento 2 project inside a docker container? I have an existing project that is run inside a vagrant but I'm encountering a lot of issue in the vagrant and we decided ...
3
votes
0answers
62 views

Magento 2 ExportButton component Product grid not working

I have added ExportButton on admin product grid and when i click on export it shows error Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already ...
3
votes
0answers
132 views

Magento 2 How can I add State and Country attribute for customer in Admin?

How can I achieve State and Country field functionality in Admin under customer Account Information? I have referred this link to create in front-end https://magecomp.com/blog/create-country-...
3
votes
1answer
96 views

Any Observer or plugin event for specific module disable?

I want to perform some action when my custom module gets disable. Is there any observer event or plugin event that being fired when i disable my module? Any help would be appreciated. Thank you,
3
votes
1answer
473 views

How to disable “Cron Job” logging into system.log file in Magento 2

My logs are being flooded with cron jobs updates. How can I disable this? [2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is run [] [] [2019-02-27 06:28:02] main....
3
votes
0answers
88 views

Import products not escaping forward slash in category

I'm trying to import products into v2.2.7 but apparently this has been a problem since 2016 and has not been resolved until v2.3.x. When importing to magento, some categories are like Socks/types a /...
3
votes
2answers
281 views

Magento2.2.x How to remove a field filter from collection?

I am loading a collection: $model = $this->_objectManager->create('Test\Demo\Model\Book'); $collection = $model->getCollection(); $data = [regionCode => 111,regionCode=>222]; foreach ($...
3
votes
0answers
384 views

magento 2 custom email template image/logo not displayed

I am custom template for Magento 2 Created two new email template in admin backend order confirmation email template Shipment notification email template Both are sharing same header and footer ...
3
votes
1answer
270 views

How to return search API response from controller in magento 2?

I have an API(ukvehicledata) for search using registration id. I want to integrate with magento 2.2 I am getting response in controller as JSON format. I have converted it into an array. Now I ...
3
votes
0answers
418 views

Filter Condition Callback in custom admin grid using layout XML file

Note: I am using layout XML file to create custom admin grid, not UI components. I am working on a custom module where I have created a custom grid using layout XML file. Below is the sample code of ...
3
votes
0answers
100 views

Apply Cart Price Rule (Coupon) on empty cart

Is it possible to apply a Cart Price Rule using a Coupon to a customers cart when the cart is empty? The reason is the following: We’d like to apply a discount code (cart price rule) for customers ...
3
votes
1answer
1k views

How to change City field to a dropdown in Checkout step Magento 2

I tried multiple solutions found in here, but none seem to fit, the closest one was this one Magento 2 : How to change UI field(s) dynamically, here is my implementation of it: My\Module\view\...
3
votes
1answer
84 views

How to change the current password optional

How do I change the current optional password in edit account section in Magento 2 as customer is already logged in, hence I don't want customer to put the current password again for the store. How ...
3
votes
2answers
1k views

How to use Mage::getModel() on Magento 2?

I need to convert my following Mage::getModel() from Magento1 to Magento2 $cart_api = Mage::getModel('checkout/cart_api'); $quoteId = $cart_api->create($storeObject->getStoreId()); $quote = ...
3
votes
0answers
253 views

How to create API Endpoint in Magento2?

I want to create API route which can list/return products data in JSON or XML format. By creating this endpoint I will be able to fetch the all the products from Magento. Then I will access it on my ...
3
votes
0answers
431 views

Force to show the billing address form on checkout

What I want to do is to force user to fill out the billing address on step two at checkout. In my javascript file I've added a subscription: quote.billingAddress.subscribe(function (billingAddress) {...
3
votes
1answer
309 views

Minicart no update with custom add to cart in magento 2.2.4

I created my custom module for add a product to my cart, if I use my controller with this form : <form action="http://*********/mycart/cart/add/uenc/*******/product/1/" method="post"> My ...
3
votes
0answers
142 views

Magento2 - How to make same order increment_id number for multiple stores under single website?

I have 4 stores running under single Magento 2 installation. Right now each store has its own order number series. For Example:                  Order ...
3
votes
0answers
151 views

Problem with block override in Magento 2

Note: Before marking the question as duplicate or off-topic, please read the question carefully. Scenario: I have to show custom column in the admin grid of a custom extension. So I used override ...
3
votes
1answer
2k views

Magento 2 check which catalog rule is applied to cart product

I have created 3 catalog rules for category. Shoes Category: 5% Off , Catalog Rule Name: Shoes Offer Toys Category: 10% Off, Catalog Rule Name: Toys Offer Fashion Accessories: 8% Off, Catalog ...
3
votes
0answers
852 views

Magento2.2 - How to add success message after Ajax Success?

I am submitting the form by ajax. It's working properly but I have one issue with the success message. After ajax success, I have to display success message like default Magento2. How can I achieve ...
3
votes
1answer
138 views

Magento 2: Data migration Class error

I tried to migrate data from Magento 1.9.2.2 to Magento 2.2.2 for testing. I am getting below error [2018-02-14 11:45:37][INFO][mode: data][stage: volume check][step: EAV Step]: started 100% [====...
3
votes
1answer
34 views

Add content in sales order?

How to insert additional block in create order page (magento2 admin side order) after billing/ shipping address**
3
votes
1answer
918 views

Magento 2.2.1 “Sorry, but something went wrong. Please contact the seller.” Checkout using Authorized.net

Magento 2.2.1 : I have confirmed the transaction URLs, keys, and MD5 with Authorize.net. Transaction is processed and deducted from account. Order is created within Magento, and emails are sent. ...
3
votes
0answers
334 views

How to ignore(remove) <update handle=“name” added in other layout

module-sales/view/frontend/layout/sales_order_view.xml has following code: <update handle="sales_order_info_links"/> Is there any pretty way to remove such updates? p.s. I know about ...