Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
6
votes
1answer
4k views

How to Integrate Magento Social in Magento 2.2

I would like to know more about Magento Social which was recently introduced in Magento 2.2. The module is available in the following location. System -> Extension -> Integration -> Magento ...
5
votes
1answer
2k views

Magento 2 Add text in checkout page via XML

I'm trying to add custom text in checkout page via XML. I have my custom checkout_index_index.xml file with this inside: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="...
5
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
4answers
7k 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-...
4
votes
2answers
3k views

How to create new product slider in home page in Magento 2

I want to create a new product slider in home page of my website without using external extension.
4
votes
0answers
471 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
3answers
178 views

Magento 2 - Get product image url in API

I am creating custom API in magento 2 and I need to get image URL of product. I have used this code to get image URL: $imageUrl = $this->listProductBlock->getImage($product,"category_page_grid"...
3
votes
1answer
4k 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
2answers
189 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="...
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
1answer
1k 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
2answers
260 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
3answers
580 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
771 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 ...
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 ...
2
votes
2answers
78 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
435 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
1k 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
3answers
391 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.
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
476 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
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
1answer
82 views

Magento 2: Product is not displayed on category and search after indexing

I'm facing an issue with the specific product visibility on the Magento 2.2.9 website. The configurable product is not visible to the assigned categories or search page but accessible with its URL. ...
1
vote
0answers
67 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
0answers
27 views

language translation and migration

I've used the data migration tool to move from magento 1.6.2 into magento 2.2.7 I've some issues (mainly on backend) where it seems as if magento doesn't properly put text, instead it displays curly ...
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
2answers
487 views

Element 'css': This element is not expected. in Magento 2.2.5 (upgraded from Magento 2.1.9)

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'css': This element is not expected. Line: 542 facing this issue in 2.2.5. I have upgraded from Magento ...
1
vote
3answers
596 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
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
0answers
76 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
3answers
2k 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
2answers
3k 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
401 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
2answers
89 views

Base image is blank

i hope someone can help me. Base image is not showing when I choose the product, but small and thumbnail works fine.This happened after I imported products again but with the Default attribute (I ...
1
vote
1answer
171 views

Magento 2 Remove Estimate Shipping costs and Tax on cart page based on condition

I want to show/hide "Estimate Shipping costs and Tax" based on customer group. I just do not write to css that hide block as it is bad practice. Is there any way we can disable component based on ...
1
vote
0answers
41 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
255 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
2answers
327 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
3k 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
4answers
5k 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
597 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
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
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
1answer
762 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
130 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
565 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
478 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
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
637 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
2answers
3k 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 ...