Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
2
votes
3answers
437 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
3answers
263 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
2answers
136 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/...
1
vote
1answer
943 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
2answers
245 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
182 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
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
2answers
259 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
626 views

Magento 2.2 IWD Onepage Checkout Issue

I have installed and enable one-page checkout extension by IWD Agency it shows correctly but removes my theme header and footer how to prevent it and Show my header footer as it was before. Here I can ...
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
3answers
511 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
1answer
294 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
1answer
265 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
1answer
1k 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
21 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
1answer
279 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
2answers
39 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
274 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
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
3answers
369 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
0answers
95 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
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
110 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
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
577 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
437 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
1answer
55 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
0answers
54 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
1answer
686 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
443 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
1k 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
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 ...
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
0answers
43 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
119 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 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 ...
0
votes
1answer
91 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
3answers
423 views

Magento 2 : Overriding Default Contact Form Controller POST.php file

I'm trying to override the contact form post controller in Magento 2.2.6, by following the answer from this thread (Override module-contact view and controller) by creating my own module. I added \...
0
votes
0answers
454 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
2answers
3k 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 ...
0
votes
1answer
82 views

Magento 2: “All in Column” does not work if actions column is not present in the grid

I have built a custom grid where I have only 3 columns, i.e. Category and Priority, and the Mass Action column. Since the priority field is the only field which can be changed, so I don't want Edit ...
0
votes
1answer
98 views

Magento catalogProductAttributeOptionManagementV1 AddOption SOAP

I am sending a soap request to Magento and getting an error per below. <?xml version="1.0" encoding="UTF-8"?> -<soap:Envelope xmlns:def="XXX/soap/all? services=...
0
votes
1answer
56 views

How do I make a module with the form component?

I want to know how I can create a module that uses the Form Component. Nothing advanced, I just want to know how to make a simple form that can read and write entries from a database, for example a ...
0
votes
1answer
231 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 ...
0
votes
1answer
990 views

Magento 2.2 - How to change default attribute set

I have two attributes sets Set1 Set2 While adding the product, By default Set1 is selected for Attribute Set. I want this default Attribute set to be Set2. How to change this attribute set. ...
0
votes
1answer
618 views

Magento2 extend core block constructor

Let's say I have a helper class (let's call it \Vendor\Module\Helper\Cart) which I'd like to use in a block. I understand I should add the helper class in block constructor, so I should extend core ...
0
votes
2answers
66 views

Product sku in magento2 [closed]

I have created custom grid using ui component. I want to add product sku column in custom grid which contains product skus list from product table. How to do that .... If anyone knows please ...
0
votes
1answer
278 views

catalog_product_import_finish_before Event in magento2?

Created an observer file in Magento1, using event catalog_product_import_finish_before event $productIds = array(); $adapter = $observer->getEvent()->getAdapter(); ...
0
votes
1answer
99 views

Magento 2, how to add 'textbox' into 'cancel modal'?

Using magento 2.2, admin. I need to add textbox into dialog when confirm Cancel status in sale order.
0
votes
0answers
186 views

Accordion not working Magento 2 after minify JS

I have minified JS and HTML and CSS in Magento 2. After that Accordion is not working. <?php $collectionTitle = $this->getCollectionFaqcat(); ?> <div class="shy-shadow-container row mrg0"...