Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
8
votes
5answers
9k views

Magento 2.3.0 “A technical problem with the server created an error.” When uploading the logo image

I'm using Magento 2.3.0, with php 7.2 version, on a ubuntu os. Everything looks working fine, but when I try to go into Magento backend, Content - Design/Configuration - Header, and I try to upload ...
8
votes
5answers
13k views

How to change currency format in Magento 2?

Currently the price shows like $2.999,00 I want the price to show like $2,999.00 for locale es_MX (spanish, Mexico) in product pages, anywhere else the currency format is correct. I've tried all ...
19
votes
2answers
11k views

Magento 2: Implement UI Fileuploader

I recently implemented the FileUploader Ui Component in my form on Magento 2.1.7. The code for it is here (app/code/Vendor/Blog/view/adminhtml/ui_component/vendor_blog_form.xml): <field name="...
9
votes
4answers
21k views

Magento 2.2.2 : Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes)

I am working in magento 2.2.2 and when I save product It will display this error. Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes) in /var/www/html/...
4
votes
3answers
4k views

Magento 2.2 error: Unable to unserialize value

After upgrade to the version 2.2 my modules which has serialized values does not work any more. Here is some info from the Magento 2.2 release notes: Significant enhancements in platform security ...
2
votes
2answers
2k views

Load Custom CSS After style-l.css For Home Page

I am using below code to include my custom CSS file in home page only: File: app/design/frontend/[Package]/[Theme]/Magento_Theme/layout/cms_index_index.xml <?xml version="1.0"?> <page xmlns:...
6
votes
1answer
5k views

Notice: unserialize(); Error at offset in Magento 2.2

This code not working in Magento 2.2, But it's working in Magento 2.1. I am facing this error Notice: unserialize(); Error at offset 0 of 168 bytes in /var/www/html/M2/app/code/Vendor/Module/Block/...
8
votes
5answers
21k views

Magento 2 - Get Subcategories of Specific Parent Category

What I'd like to do is grab all of the child categories of a specific parent category. I'm assuming the best way to do this is by using the parent's ID and of those child categories that are returned, ...
4
votes
1answer
2k views

LiveReload configuration via Grunt

Edit : about the possible duplicate ! I would like to mention that this answer does not answer my question, if someone sees that it is the same thing, I invite him to answer me instead of saying that ...
1
vote
2answers
4k views

Magento 2: Apache mod version not enabled/installed/allowed by host, causes 500 error on all pages due to failing .htaccess files

I created a fresh install of Magento 2.2.2 on a debian server using php7.1 and mysql 5.7. Once files were extracted, I was unable to access the setup wizard and received 500 errors from all pages. ...
1
vote
1answer
257 views

Magento1 to Magento2 data migration

I am new to Magento2, I need some guidance from magento geeks for migrating data from magento1 to magento2. Quick Overview I received a system that was built in magento2 from scratch. So I think ...
8
votes
3answers
4k views

Add rule to rules.js Magento2

How to add new rule to rules.js? I have created extra-rules.js define( [ 'jquery', 'Magento_Ui/js/lib/validation/validator' ], function ($, validator) { "use strict"; return ...
6
votes
5answers
9k views

Magento 2.2 Cant find how to disable module from back end

I am using Magento 2.2 I can't find a way to disable module. It was use to be under configuration > Admin but it's not there anymore.. Can someone please help me out.thanks
6
votes
1answer
728 views

How to uncheck “My billing and shipping address are the same” checkbox during checkout? One Page/Magento2

I am having an issue where the box is being marked automatically. I want to unmark it.
4
votes
3answers
9k views

Magento 2: Get Customer data after login with observer

I need to detect in frontend section for my custom module if customer has just successfully logged in, and i need to run some function before it redirect to another page, is there any way to do this?
3
votes
1answer
397 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 ...
2
votes
1answer
3k views

How to make auto select first child product of configurable product in magento2?

I am trying to make auto select first child product from the configurable product in product detail page. Is this possible?
8
votes
3answers
2k views

How to update customer address using custom Api in magento2?

I have created custom API to update customer address using customer id or address id. Below code I used to implement it. [Vendor]/[Module]/etc/webapi.xml <route url="/V1/address/createUpdate" ...
2
votes
4answers
640 views

Shipping address custom attribute value not getting in RateRequest object in Carrier Model in magento2.x

I have added the drop-down custom field on checkout page with custom values. InstallSchema.php $connection->addColumn( $installer->getTable('quote_address'), '...
6
votes
1answer
1k views

Upgrade Magento from 2.1 to 2.2.1 with sample data using composer

What steps do I need to follow to upgrade a demo installation with sample data from Magento 2.1 to the latest 2.2 version? Instructions that work for Magento Commerce (Enterprise Edition) as well as ...
3
votes
1answer
718 views

Magento 2.2.0 Upgrade error

When I am trying to upgrade my Magento version from 2.1.7 CE to 2.2.0 CE, through composer update, I am getting the following error. Problem 1 - magento/module-wishlist-sample-data 100.1.0-rc1 ...
3
votes
2answers
2k views

Sales : Orders :How to add custom order status programmatically

I need to add custom status for an order programatically I have below controller file to save order status. I need to add custom status as cancel initiated.Provide me a solution... Controller file ...
9
votes
2answers
12k views

Magento 2: How to get current language of store?

I'm trying to show a custom block for each store view / language. Therefore I want to create switch statement like: $lang = // Get language code or store view code here; switch ($lang) { case '...
8
votes
2answers
1k views

Magento 2.2.x cache disabled automatically

First of all, I couldn't find any info about this kind of issue anywhere on the web. We have a production environment with git integration. We pull our changes to it only via git (git pull). The ...
2
votes
2answers
140 views

Magento 2.2.3 - Add custom required validation for company

I want to add validation only for billing address on the checkout page. By default in the backend, the company name is optional. But if when I go to the checkout page and click on the Place Order ...
2
votes
2answers
2k views

Change the background color of the catalog product view page?

Which file should I edit in my custom theme to change the background color and any other CSS of the catalog product view page?
2
votes
1answer
2k views

Add placeholder and remove all labels in Magento 2 Checkout

Searched a lot but didn't found anything removing the Lables like "First Name, Last Name, City, Address, Email, Phone etc" Add Placeholders in all "shipping fields" and "sign In" places. After ...
7
votes
1answer
995 views

Run static tests for a specific module

I am running php bin/magento dev:tests:run static to check my code quality but it takes a really long time. Is there a way I can run them for one module and/or one theme?
7
votes
4answers
10k views

Magento 2 customer-data.js:90:23 [object Object]

I'm using Magento 2.2 with Porto theme and getting an [object Object] javascript error at customer-data.js line 90 in the console after logging into the store and refreshing the page or switching to ...
8
votes
3answers
22k views

order confirmation email not send in magento 2

I Installed magento 2 on my vps server and configured store email like this but order confitmation email will not send to the customers what should I do , should I setup cron as some link ...
8
votes
2answers
2k views

How to solve indexer status “suspended” (n in backlog)

One of the indexers that are configured to be updated on schedule is locked in the state "suspended" and does not get updated anymore. Output of bin/magento indexer:status +-------------------------...
7
votes
1answer
890 views

Magento 2 .2 - How to add Static Product Prefix to Product Url?

I would like to add a Product Prefix (Static Path) to product URLs. Something like www.test.com/product-prefix/product1.html So all products url of the website follows the same structure - www.test....
3
votes
1answer
248 views

Magento2 : add New address type to customer

I want to Create a new address type "neighbors address / alternate address " . To assign it to customer i have created new customer attribute ( just like "default_shipping" and "default_billing" ) "...
6
votes
1answer
3k views

How to display Yes/No values in admin grid (Magento2)?

I have created a InStock column in admin grid and table. In table, Instock column values are 0 (or) 1 based on productstock. In admin grid, the Instock column values are dispalyed 0 (or)1 . But i ...
3
votes
3answers
2k views

I want to override vendor\magento\module-email\Model\AbstractTemplate.php

I want to override method setForcedArea() because I'm using Magento 2.2.4 & whenever I tried to save Content->Configration->Design Configuration->Edit I'm getting following error:- ...
3
votes
2answers
2k views

Php max_input_vars prevents attribute options saving in M2

Magento 2.2.1. PHP 7.0.26 Nginx After 2 days struggling around with attribute options in M2, I found out where the problem was. I have several custom dropdown attributes with hundreds of options. I ...
3
votes
1answer
976 views

Confirmation popup before removing item from cart

When i remove item from cart i get a poup confirmation: require([ 'jquery' ], function($) { $('.action-delete').off('click'); $('.action-delete').click(...
3
votes
2answers
623 views

How to disable a swatch, once it is been selected in Magento2.2?

I am trying to disable a swatch, once after it has been selected. So it should not be deselected... How to do it in Magento2.2.x ?
2
votes
3answers
2k views

Get recently viewed products programmatically in Magento 2.2.2

I am trying to fetch recently viewed products. I tried to implement the provided code from here but did not get any success.
2
votes
1answer
536 views

Magento 2: how to hide ''price' of custom option in configurable product

Using Magento 2, Front, Configuration Product. I need to hide price from custom option of configuration product. Front -> Product Option
2
votes
1answer
2k views

Create link dynamically in customer account navigation in Magento 2

Hi i have created account navigation link, and i have two customer groups in magento admin panel, and i only want to display that links to specific group rather than displaying all the time. here is ...
1
vote
2answers
752 views

What does “canRestore” attribute mean in system.xml?

Maybe someone already saw an <field> attribute canRestore="1": [...] <field id="provider" translate="label" type="text" sortOrder="100" canRestore="1" ...
1
vote
1answer
489 views

Extra column in catalog_product_entity_tier_price not saving/updating in observer

I have added an extra column 'title' to the catalog_product_entity_tier_price table using Setup/UpdateSchema.php and an extra field to the tier price backend by overwriting Magento\Catalog\Ui\...
1
vote
0answers
96 views

Magento 2 Hide price and add to cart button for specific product

I want to hide the Prices and add to cart button on the specific product places e.g bags,shoes etc. I have hide the price for all stores but I am not able to hide price on the specific products.
1
vote
1answer
1k views

How to auto fill the shipping address field in Checkout in Magento 2.2

I had referred this link How to auto fill the shipping address field but this is throw an error This is required Field. I have to Auto fill Address in Magento 2 Checkout. I have to fill the State and ...
1
vote
1answer
815 views

Sales Emails going via wrong email address magento 2.2.x

I have setup email address in sales representative but getting sales email from apache@domainname So where I need to fix this issue? Can anyone let me know? Other emails except sales are working ...
1
vote
5answers
2k views

How to get customer custom attribute value in observer in magento 2.2.X?

I have created a customer custom attribute like(gst_no). In my Observer where I get my customer data I want to get the value of this attribute too. $order = $observer->getEvent()->getOrder(); ...
1
vote
1answer
1k views

Change invoice status in DB

We are getting problems with Authorize.net 'timing out' but then creating the order in Magento and then creating the transaction on Authorize.net. To resolve, I have to go to Authorize.net and ...
0
votes
2answers
360 views

Magento2 : How to add Custom Block?

How to add custom block under payment method(admin order invoice)
6
votes
2answers
2k views

Add Phone Number column in sales order grid

I am trying to add phone number column in my order grid. I have added new column through sales_order_grid.xml in my ui_component directory. Code is below: <?xml version="1.0" encoding="UTF-8"?>...