Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
11
votes
5answers
34k 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/...
8
votes
5answers
13k 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 ...
9
votes
5answers
28k 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, ...
22
votes
2answers
16k 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="...
8
votes
6answers
16k 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 ...
4
votes
3answers
5k 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 ...
6
votes
1answer
6k 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/...
2
votes
2answers
3k 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:...
7
votes
1answer
3k 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 ...
4
votes
1answer
5k 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?
2
votes
2answers
5k 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. ...
6
votes
3answers
12k 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?
1
vote
1answer
414 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 ...
10
votes
4answers
5k 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 ...
9
votes
3answers
29k 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 ...
6
votes
6answers
10k 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
1k 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.
8
votes
4answers
3k 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
1k 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'), '...
16
votes
2answers
3k 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 ...
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
2answers
3k 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 ...
3
votes
1answer
870 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 ...
10
votes
2answers
16k 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 '...
2
votes
2answers
185 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 ...
3
votes
1answer
827 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
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
971 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
3k 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 ...
0
votes
0answers
18 views

Magneto admin Url is not working . Need to clear cache always

I am using magneto 2.2.6 . The website is working fine until i installed new extension . When the time of installation i run the following command php bin/magento setup:upgrade php bin/magento ...
11
votes
4answers
15k 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 ...
7
votes
1answer
1k 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?
12
votes
2answers
4k 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 +-------------------------...
8
votes
2answers
1k 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....
7
votes
1answer
5k 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 ...
5
votes
1answer
4k views

Magento 2.2 - adding name field to newsletter module [closed]

I'm using magento 2.2 and I want to add name field for newsletter module, so there has to be input box in front-end, and also it needs to show in backend, how to achieve this? There is a lot of posts ...
3
votes
1answer
514 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" ) "...
3
votes
3answers
1k 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 ?
6
votes
5answers
6k views

app:config:dump locks everything in configuration

I am using pipeline deployment. As suggested in Magento 2.2 documentation, to use pipeline deployment process use below code: app:config:dump and add config.php to source control. But when i ...
3
votes
2answers
3k 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
415 views

Magento 2 blocks and templates

Following are the 4 conditions. Single block and multiple templates - I think this is possible and we use it frequently while customizing Magento. Multiple blocks and single template - Never seen ...
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
1answer
1k 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(...
4
votes
2answers
3k 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
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 ...
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
5answers
3k 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
0answers
115 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
2answers
1k 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
4answers
6k views

How to display product discount percent on product details page in Magento 2.2.1

Am I wondering how to add percentage discount value on the product details page? I have found a similar topic, but apparently, it does not work with 2.2.1 How to display product discount percent on ...