Questions tagged [magento2.2]

General questions about the Magento 2.2.x versions

Filter by
Sorted by
Tagged with
2
votes
4answers
5k views

Magento 2 404 on all pages/files (except homepage)

I setup a Ubuntu server with the LAMP at my home network for testing. I downloaded Magento-CE-2.2.0-2017-09-25-08-19-44.zip and extracted it into /var/www/html and started the installation process. ...
6
votes
1answer
380 views

Unit test Issue on getting value

I am creating a unit test for my simple method, this method get the value from requestHeader here is my class which I want to create test class namespace Vendor\Module\Helper; use Magento\Framework\...
6
votes
1answer
5k 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/...
1
vote
0answers
184 views

custom customer attribute value in the e-mail template

I have install Clarion_CustomerAttribute and I don't know how to recall attribute value in the e-mail template I have tried Address Templates configuration and nothing. I use Port theme.
2
votes
1answer
518 views

Magento 2.2 - combining js

Has the combine js been moved from: Stores > Config > Advanced > Developer All i currently get under Advanced is : Admin System Tried switching different store views etc.
3
votes
1answer
889 views

How do you populate a Magento_UI dynamicRows element?

I've got a <dynamicRows> element. When I render the object, I'm able to create new rows, and all of the fields appear. However, I have no idea how to: Populate the rows from the database Save ...
4
votes
3answers
3k views

How to resolve unserialize issue [closed]

My extension has stopped working since updating to Magento 2.2.0 When running di:compile we get the following error: Errors during compilation: Vendor\Module\Model\ResourceModel\...
0
votes
1answer
392 views

Magento 2 installation stuck at 71%

Magento 2 installation stuck at 71% I installed many times but still installation stuck at 71%...have some one help me? Current PHP version: 7.1 allow_url_fopen On date.timezone UTC display_errors ...
3
votes
1answer
2k views

What is the correct way to create mock object in unit test

Now days I am focusing on TDD development, and I am following the Magento test class for reference. So firstly I look into Contact module (as it is the small module) and I found that in DataTest.php ...
3
votes
1answer
278 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
555 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
0answers
537 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
530 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
8k 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
3k 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
188 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
862 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('...
2
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
459 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
5k 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
830 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
1answer
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
2k 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 ...
9
votes
3answers
11k 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
494 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
456 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 ...
17
votes
2answers
10k 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
736 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 ...
3
votes
3answers
8k 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
352 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
136 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
912 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
4k 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
55 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
820 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
735 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
21k 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 ...
13
votes
1answer
418 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 ...