Questions tagged [magento2.2]
General questions about the Magento 2.2.x versions
2,446
questions
3
votes
1answer
286 views
Remove block from Magento 2.2
I have a custom theme which was working fine on 2.1.9.
Just upgraded to 2.2 and noticed some blocks I used to remove are now in place.
app/design/frontend/MyThemes/custom1/Magento_Theme/layout/...
3
votes
1answer
2k views
Magento 2.2 - Unable to unserialize value, when editing categories
The following actions produce the results listed below each action.
If a category has more than 50 items it seems to always happen, categories with less than 50 items will usually work, but will ...
1
vote
2answers
567 views
Magento 2 : Possible bugs/solution in Magento 2.2.0 [closed]
Magento 2 released it's new version Magento 2.2.0
I just want to know what are structural changes which are new in this series.
Also is it the right version which we have to use instead of the last ...
3
votes
1answer
661 views
Magento 2.2.0 partial Credit Memo/Refund doesn't work properly
We have to try partial credit memo for Magento 2.2.0 shop admin for below step:
1) Proceed order with default payment and Grand Total are €37.00
2) Create the Invoice.
3) Try to Credit memo with ...
1
vote
1answer
616 views
Custom mail form on Magento 2.2.x
I'm trying to create a custom mail form on Magento 2.2.x. I have looked at several instructions for Magento 2.0.x and/or Magento 2.1.x but they dont seem to work anymore for Magento 2.2.x. Perhaps ...
2
votes
2answers
9k views
Magento 2.2 Incompatible argument type
I have compilation issue on my custom module. Code works properly in magento 2.1 but in magento 2.2 it's shows error at compilation like this
Incompatible argument type: Required type: \Magento\...
8
votes
2answers
4k views
Magento 2 form field toggled type
I want to create a toggle input option in magento 2 like this:
but i don't know what type of field is that, right now i'm using select dropdown like this:
$fieldset->addField(
'...
1
vote
2answers
2k views
Magento 2.2: Problem with varnish.vcl generated
I have installed Magento 2.2.0-rc23 and now try to setup varnish FPC.
I generate VCL on BE System -> Advanced -> System -> Full Page Cache -> Varnish Configuration -> Export VCL for Varnish 5.
VCL ...
2
votes
1answer
4k views
Difference between magento 2.1 and 2.2
I'm currently working on Magento 2.2. And found that In Magento 2.2 core team made many changes in files and folder structure, deleted many files, replaced classes and many other things.
One other ...
0
votes
1answer
204 views
How to Set Product video url Programitically in magento2.2?
I have created a script for import CSV products everything's working perfect but one issue is product video url not set.
<?php
use \Magento\Framework\App\Bootstrap;
include('app/bootstrap.php');
/...
2
votes
1answer
1k views
How to escape output in templates in 2.2 - XSS security [duplicate]
I've noticed that the way we escape data in templates is changing as part of 2.2
Escape functions for templates
For the following output cases, use the specified function to generate XSS-safe ...
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 ...
2
votes
1answer
2k views
Display text if attribute yes/no is set to YES in Magento2?
I'm trying to display something in the product page if a YES/NO attribute is set to YES.
Actually the only way I found to do this in multilingual magento 2.1.8 is :
if($_product->getAttributeText('...
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 ...
1
vote
1answer
528 views
Magento2 Override 2 classes in single plugin di.xml
I am making a custom module for displaying attributes in Minicart and cart page and I have changed two core classes
vendor/magento/module-checkout/CustomerData/DefaultItem.php
vendor/magento/module-...
4
votes
1answer
6k views
UI form validation in Magento 2
I want to validate text field to numeric or not in UI form.
<column name="sortorder">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
...
4
votes
2answers
2k views
How to retrieve variable from CMS page in Magento 2
In Magento 1.9.x, we can do it like below
In CMS page, add content:
{{block type="core/template" name="..." my_vars="123,456" template="path-to/test.phtml"}}
Create path-to/test.phtml:
<?php ...
3
votes
2answers
934 views
Change save button text in admin form
I created a form in backend like this:
I want to change save button text from 'Save' to 'Insert', here's my code:
Block\Adminhtml\Tools\Edit.php:
namespace Test\UploadFile\Block\Adminhtml\Tools;...
1
vote
2answers
2k views
How to remove edit and delete button from minicart?
I tried,
vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html
I removed below lines
<div class="product actions">
<!-- ko if: ...
2
votes
2answers
3k views
Magento 2: Get image url in phtml file
I'm trying to add an image to my first module can someone tell me how I cando this I am new to Magento
this is phtml file
<h2>Hello world</h2>
module is in
app/code/Test/Helloworld
...
10
votes
2answers
13k 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 '...
0
votes
2answers
1k views
How to get Product Review based on Product id in magento 2
Here I want a Product Review based on Product id.
An object containing something like:
review_id
product_image
date
author
price
product_id
rating
product_name
comment
1
vote
2answers
669 views
magento 2 custom module layout issue
Created Magento 2 custom module but the layout seems not showing anything.
It is supposed to show some output but it is showing white blank screen in the page.
Please help
My URL
http://localhost/...
2
votes
0answers
544 views
Detect Inventory change on Magento2 triggered by API
I'm working on a module for keeping track of inventory changes on orders, admin variation, api calls.
I'm using the event cataloginventory_stock_item_save_after which works fine on 2.2 but it seems ...
21
votes
2answers
13k 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="...
1
vote
2answers
804 views
Get value from “core_config_data”
I'm trying to get value from the core_config_data table but when I follow various guides on the internet or previous topics here, it doesn't work..
Disclaimer: I'm new to PHP and Magento in general ...
4
votes
3answers
10k 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
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
2answers
371 views
How to make css changes in magento 2.2
http://websitename.com/pub/static/frontend/organica/organica_default/en_US/css/style.css
I want to change in to this folder.
I have no idea where to make css changes
/app/design/frontend/organica/...
1
vote
1answer
165 views
always show My Account & Wish List user logged in or not
Am new in magento 2 and also no experience in magento 1. I'm try to show My Account & Wish List links in top nav link in my custom theme (parent: Magento/luma ) like blank theme. I try with ...
2
votes
1answer
1k views
call custom phtml in product.info.details
I call custom phtml in product.info.details but it's not working.
How I call:
<referenceBlock name="product.info.details">
<block class="Magento\Framework\View\Element\Template" name="...
4
votes
2answers
5k views
Loading Helper in Controller
I have a module and I am trying to get my module config data ( from system.xml ) within my module controller. It works when I get it in a template file but not when I try to access it in the controler ...
0
votes
1answer
65 views
How to lowercase the words in the front end products page?
so I have made the products in the admin page of magento 2 like below picture.
but on the frontend it look like this
so my question is how to make Mm lowercase into mm in the products page on the ...
2
votes
3answers
2k views
How to get current customer id in helper class of module in magento2
I want to get current customer id in Helper class of module in magento2.
How to get using helper in Magento 2.
Can anyone help me?
1
vote
3answers
2k views
Magento 2: Add text in system.xml
Is it possible to have plain text next to the label in system config instead of an input field, something like:
<field>
<label>Hey you</label>
<plainText>Lorem ipsum......
2
votes
2answers
926 views
Magento 2 - Showing iframe in admin configuration panel
I want the users who download and install my extension from the marketplace to go through a registration/login flow. Since the normal system.xml file supports only static pages and doing the entire ...
2
votes
1answer
948 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 ...
8
votes
3answers
25k 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 ...
2
votes
3answers
3k views
Where is defined the Place Order button in default checkout payment step section?
I wanted to know where the button from the image is defined (The place order button in the payment step of checkout)
And also where is the discount code section defined?
8
votes
4answers
3k views
Magento 2: When will 2.0 support stop?
Right now the Magento team supports 6 different versions of Magento:
1.9.3.0 CE
1.14.3.0 EE
2.0.10 CE
2.0.10 EE
2.1.2 CE
2.1.2 EE
I reckon it's a lot of work to deal with and 2.2 is coming next. So ...
14
votes
1answer
505 views
Conditional RequireJs configuration (Load requirejs-config.js programmatically?)
I would like to replace a RequireJs component only on certain conditions (for example, based on configuration). Is there any way to programmatically prevent loading of my module's requirejs-config.js ...
9
votes
6answers
13k views
Magento 2 : How can I get the sitemap in magento 2?
How we create the sitemap page in Magento 2 like same we have in Magento 1?
http://example.com/catalog/seo_sitemap/
11
votes
3answers
4k views
Magento2.1 ui grid, remove or clear filter issue (after removing filter, result row apply to whole collection)
I created ui grid in magento 2.1.0 and facing issue while removing filters or clear all filters from ui grid. My filtered result occupies whole grid means same row repeated in the whole grid after ...
9
votes
5answers
24k 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, ...
2
votes
1answer
5k views
Magento 2 “Recoverable Error: Argument 2 passed” when trying to define model in constructor
I am trying to define 2 models inside controller constructor to use it later inside execute function. This is my code:
namespace Company\Modul\Controller\Adminhtml\Index;
use Magento\Backend\App\...
8
votes
5answers
14k 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 ...