Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
3
votes
1answer
3k views

Magento 2 Grid custom column value in Ui Listing

I followed this link How to display Yes/No values in admin grid (Magento2)? to get the dynamic custom column value where the column field in grid was app/code/Vendor/Theme/view/adminhtml/...
3
votes
1answer
2k 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
3answers
5k views

Magento Checkout Stuck: Failed to load the “Magento_Checkout/js/view/payment” component

I am on Magento 2.2. When I click on proceed with checkout, the checkout page opens (where it asks for address) but the checkout-loader jig keeps on spinning. I get below error on console: console-...
3
votes
1answer
1k views

Hide Configurable product images from details page when color swatch is selected

I want to hide the configurable product images when a configurable swatch is clicked. So by default configurable shows Green, red and blue. And when I select Blue swatch of my simple product only ...
3
votes
2answers
167 views

How can I add a Tab in sales_order, but not be selected by default?

I use the code below to add after order_info tab, but I want when I display the order details the active tab to be order_info. <referenceBlock name="sales_order_tabs"> <action method="...
2
votes
3answers
307 views

How to get recently viewed product collection in magento2?

I want to get the recently viewed product collection directly from model without using block function. Thanks.
2
votes
1answer
893 views

Magento2.2 configurable products out of stock issue

I am working on Magento 2.2 I install https://github.com/interjar/configurable-child-visibility module to show Configurable child products visibility when out of stock and its working fine I want to ...
2
votes
2answers
48 views

Magento cloud hosted M2 EE site compromised and got malware attack

Today i noticed in my client's magento 2 cloud hosted enterprise edition site is compromised. In footer hacker added some link along with following url: <script src="http://write-cdn.com/...
2
votes
1answer
389 views

InstallData.php not executing on Magento 2.2.1

I have the following InstallData.php in my Setup directory in my module. The script does not seem to execute at all. I have tried throwing an Exception at the beginning, dumping and dying, etc. ...
2
votes
1answer
79 views

How can i change order of Details tab to first in product detail page?

I want to change order of Details Tab to very first in product detail page. How can achieve this?
2
votes
2answers
188 views

How to set the category ids to a products from category path?

I want to progrmmatically create products from a xml. Ex : I am getting the product categories as like below. Default Category/Beer , Default Category/Beer /CRAFT, Default Category/Beer /CRAFT/...
2
votes
1answer
853 views

How can i add icon before shipping method name in magento2?

I want to add Image before Shipping method name in Checkout page.I have checked in shipping.html but here all data coming from js.I can't find proper way for it. Right now i want to add icon for "Flat ...
2
votes
3answers
499 views

Magento2 - missing adminhtml custom block after upgrade to 2.2

We had a custom block injected in the adminhtml section. This block is managed in a module (let's call it Vendor/Module) & it was working fine in Magento 2.1.*, following this methodology magento ...
2
votes
1answer
1k views

Custom fields checkout checkbox toggle required?

in the Magento 2 checkout I added 3 custom fields, a checkbox that shows the customer two password fields that are used to create an account. Since the checkbox toggles if the fields are visible or ...
1
vote
1answer
1k views

Magento 2.2 : getcollection is not working in the Block

My custom collection is not working in block file Helloworld.php <?php namespace New\MyModule\Block; use Magento\Framework\View\Element\Template\Context; use Magento\Framework\View\Element\...
1
vote
1answer
2k views

How to add new country in country dropdown in magento2.2.1

I want to add new country and its region in magento2.2.1 so it can be shown throughout the site(including backend countried dropdown, checkout at frontend). I have tried this link of magento1 but did ...
1
vote
0answers
28 views

Magento 2 Knokout.js remove element define in differen template file

I want to remove html element from template file using knockout.js code. I have write my code in shipping.js which is getting called on checkout page. In shipping.js under i have defined my variable ...
1
vote
0answers
50 views

Order not creating - Magento 2

I just added the custom order form on my products page(form.phtml) as below image to create order. Based on this input values orders should created and also custom email need to send with the form ...
1
vote
1answer
662 views

How to get Product rating code and its value in magento 2

I have modified review form as popup modal.And I have also created an empty stars rating for the product which does not contain rating yet.But I have created those stars statically. But Now I need to ...
1
vote
1answer
410 views

Checkout page validation not working in magento2

I have added custom text field for bank transfer method. In template file: <div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}"> <div class="payment-...
1
vote
0answers
64 views

Catalog Search Issue

When I'm seraching product title "Mixer, Ribbon, 25 CF, 304 S/st, 15 HP, New, HD, (2)" on the website, then getting following error:- 2 exception(s): Exception #0 (Zend_Db_Statement_Exception)...
1
vote
4answers
4k 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 ...
1
vote
1answer
2k views

Magento 2: Css changes not reflecting

I am using Magento 2.2.1. I want to do changes in my CSS file. After inspecting on the website I am finding the source of CSS is from somewhere in pub/static folder. I tried editing the CSS in that ...
1
vote
2answers
351 views

Multistore Maintenance Mode Magento 2

We currently have a multistore Magento 2 set up, we have a custom maintenance page set up using /pub/errors/default/503.phtml, this shows fine when the sites go into maintenance mode, we however want ...
1
vote
0answers
64 views

Converting MySQL query to Model

I have been building a module for Magento 2.2 but am having trouble figuring out the query. I have created one in PHPMyAdmin so I know it works there, but doing it with Model is escaping me. The ...
1
vote
0answers
217 views

Include discount amount on subtotal in order export file Magento 2.2.2

I would like to export sales order from sales->Orders and the column subtotal(in csv and excel file) which should include the discount amount which we have apply while purchasing the product. for ...
1
vote
1answer
500 views

Magento Data Migration using script

I am trying to migrate data from Magento 1.7 to Magento 2.2. We have several custom tables and we tried by using some of the tools available in the market, which are free. However, The team came to ...
1
vote
2answers
288 views

Custom Category Attribute - Adding 'insert images' button

I've created a new category text area attribute called featcms. In my custom module category_form.xml I have; <field name="featcms" template="ui/form/field" sortOrder="13" formElement="wysiwyg"&...
1
vote
1answer
712 views

How to add css file in magento 2.2.2

My default_header_block.xml path is app/design/frontend/custom-theme/my-first-theme/Magento_Theme/layout/default_head_blocks.xml my css file app/design/frontend/custom-theme/my-first-theme/...
1
vote
1answer
2k views

Magento 2: How to create a configurable product programmatically

I am new to magento and i have created a simple product programmatically from frontend and my question is how can i create a configurable product and link attributes and price and all, what to do, and ...
1
vote
1answer
334 views

Magento2 remove slider of gallery images on product detail page

I'm using Magento2.2.5 Version, On product detail page by default gallery images showing in the slider. Here is the screenshot for the same:- http://nimb.ws/YrIb2P But I want to show, gallery ...
1
vote
1answer
64 views

Displaying last bought quantity by current customer in product view page

I am trying to get the last quantity of the current product from the product view page bought by the logged in customer and display it with a button to add the same amount into the cart. It should ...
1
vote
1answer
356 views

Call custom Js to particular page only Magento 2

I created a custom module in Magento 2, in this i am using one external js library and one my js file in which i put all my custom js to handle the extension whenever required suing the requirejs-...
1
vote
3answers
995 views

Unable to serialize value problem with Magento 2.2.6

Please teach in order to solve the problem. cd /vagrant sudo php bin/magento setup:upgrade sudo php bin/magento setup:di:compile sudo php bin/magento setup:static-content:deploy sudo php bin/magento ...
1
vote
3answers
451 views

Ui form: image not saved in DB in magento 2

I need to save below fields in DB. All other fields are saved except Image.But images are saved in pub/media folder.Please suggest me a solution Here, i have mentioned my controller for save.php ...
1
vote
1answer
131 views

Magento2 Plugin to remove Parent category

Referring the answer to this question - How to remove parent category from subcategory URL? I created the file in Module Plugin folder - RemoveParentCategoryPathPlugin.php with contents like: <?...
1
vote
1answer
2k views

How to fetch the image from DB and display it , to frontend in magento 2

I have created custom Backend grid and Ui form to add image slider and it is working good in Backend. In Backend I have fetched the image by getting media url.In frontend, have fetched the image name ...
1
vote
1answer
2k views

magento 2 Rest APi How to use default methods

Magento 2 Rest API have many default methods. I want to use those method and display data. For that i have create one new user and assigned full admin access. Trying to get the product information ...
1
vote
1answer
2k views

How to call customer login form in the custom module action magento 2?

I have created my custom module for specific customer group. so, admin will send link to customer to download some matter after login. The login URL and login screen will be different for normal ...
1
vote
2answers
2k views

Magento 2: Change quote from current quote to other quote id

Please let me know how can I change my current quote to any other quote saved in database using an event observer in magento 2.2
1
vote
1answer
115 views

How can I add new Class in Magento2 sales grid?

I was trying to add new class in Sales order grid in table rows based on some conditions in admin of Magento2 but I couldn't succeed. Can anyone help me out how to do such thing? please find ...
1
vote
1answer
522 views

Product Add to cart before I want to set Product custom option values in Magento2.2

I want to add product to cart with some product already create custom option values put. So what happen current magento create new product in cart while same product different custom options or values....
1
vote
2answers
2k views

Get list of all modules using code in Magento 2

I am working on creating a base module for all other modules under one namespace. I want to show a list of all modules (with their version and their status as enabled or disabled). I have injected ...
1
vote
0answers
110 views

How to update success/error message using PLUGIN in Magento 2?

I have already checked this link and found it working, but in this thread, the observer is used to change the success/error message. I want to know whether it is possible to change/update the success/...
1
vote
1answer
344 views

Fatal error: Uncaught Error: Class 'Spyc' not found in app/code/DeviceDetector/Yaml/Spyc.php

I'm facing the issue with order placing on Magento ver. 2.2.2. After completing the payment when I redirect to the website https://domainname/paypal/express/placeOrder/ page and display on that page: ...
1
vote
2answers
2k views

How to add default values for system configuration in magento 2

How to add default values for system configuration in magento 2. I need to create and assign default values for system configuration(system.xml) for my custom module. I have already created ...
0
votes
1answer
100 views

Admingrid: Ui-component form in magento 2

I have created admin form using ui-component in backend, I have two fieldsets one(general) is containing noraml text fields another one(upload) is containing image uploder fields(small,large,extra ...
0
votes
0answers
596 views

Customise grid collection in magento2?

I have created admin grid for product in product view page.It display all product details.But i need to display the current product details in admin grid. How to apply filter collection from table ...
0
votes
1answer
601 views

Error in php Module

I have some problem, on my magento,please help~ 2.2.0 php71 centos7 EasyApache 4 PHPfpm suphp MYSQL5.6.38 An error has happened during application run. See exception log for details. [07-Dec-2017 ...
0
votes
1answer
303 views

Magento 2 - How to remove/unset all categories from a product using plugin?

I am trying to remove/unset all categories from a product using below code. It's working with Magento 2.1 but not with Magento 2.2. How can we do this? app/code/Vender/Module/etc/di.xml <plugin ...