Questions tagged [magento-2.1]
Denotes questions related to Magento CE and EE 2.1.x
2,324
questions with no upvoted or accepted answers
13
votes
1
answer
842
views
Fedex Shipping Weight and Value is not setting while creating order programmatically
I'm trying to create orders programmatically using the FedEx shipping method. other methods are working fine. when I'm setting the FedEx getting the error like please specify the shipping method.
...
13
votes
1
answer
3k
views
Magento 2.1.1 - Improve security with Content Security Policy
I have a store running fine with the latest version of Magento (currently 2.1.1), and I'm trying to improve security through Content Security Policy on Apache 2.4.7 (Ubuntu 14.04). I removed all <...
11
votes
1
answer
2k
views
Magento 2.1.9 : Change store based on country
Important: I don't want to buy any GeoIP extension.
I have a Magento 2.1.9 website with multi-site and multi-store setup.
I have setup website for KSA, UAE, CHINA, EGYPT etc. and under each website ...
11
votes
1
answer
3k
views
Magento 2 - Update quantity and totals of cart page without page reload?
In Magento2 - We need to update main cart on change of quantity by Ajax without click on "Update Cart Button" and without reloading the page,
Below my code in this code only update cart subtotal but ...
10
votes
1
answer
3k
views
Magento 2 create admin config table with custom rows and columns
I want to create admin config with a table to take the data and save in config for that I followed this link.
But I also want to create custom rows in that table programmatically and also without the ...
8
votes
1
answer
1k
views
Magento 2 Customer address attribute not saved while creating new order from admin
I have created one "Customer address" type of attribute name "Suburb", It successfully created.
It shows on Checkout, Customer create(admin) and Create New Order address(Admin) section, While It ...
8
votes
1
answer
3k
views
Error message "Please enter valid date"
I am getting an error message when I use any date field for products or coupons. It tells me to enter a valid date. The dates are valid and there is no range that satisfies the system.
Some payment ...
8
votes
1
answer
1k
views
How to add custom customer attribute in custom tab in customer edit page of admin in magento2
I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.
I want to show them in my custom tab.
8
votes
1
answer
5k
views
How to Print PICKING or PACKING Slips Before Shipping - Magento 2.0?
We ship large items and we have to configure the shipment on a pallet (or pallets).
When we get the order, based on ship to location and carrier chosen, we may send on one pallet, two pallets or ...
8
votes
1
answer
3k
views
how to load or add js before require js in magento 2
I am trying to override default_head_blocks.xml like below
vendor\magento\module-theme\view\frontend\layout\default_head_blocks.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento....
7
votes
0
answers
1k
views
Debugging emails
I have a Magento ver. 2.1.3 setup that is not sending any emails.
I'm trying to fix this, but nothing I do seems to work.
My server has protections against spam which forces scripts to use SMTP.
I'...
7
votes
0
answers
232
views
Alternative to Authorize.net Direct Post?
Magento2 - payment method Authorize.net developer support notes that Direct Post Method is deprecated which is replaced with Accept.js.
Are there any plans for Magento 2 Community Edition to ...
7
votes
1
answer
3k
views
How do I consume the REST API in Magento 2, using AJAX with session-based authentication?
I am having issues successfully making an AJAX call to Magento 2 REST API endpoints, using session-based authentication.
When I run the following javascript, I always receive a 401 (Not Authorized) ...
7
votes
3
answers
3k
views
Product image not zooming in properly when hovering on image at product detail page
In my product page detail when i try to hover the product image there's only white box with low opacity overlaying at the top of my image like this :
Usually in Magento 2, when hovering the image it ...
7
votes
1
answer
3k
views
Magento 2: insert products images alt tag programmatically
I need to insert ATL tag for catalog products images programmatically. Is there any way to do it?
7
votes
1
answer
847
views
Generate get parameter in XML layout Admin
I have a custom extension that generate grid using XML, the problem is that I need to add button which will generate link with a get parameter from get request that passed via url, the xml code for ...
7
votes
1
answer
2k
views
How to create admin grid without db collection in Magento - 2
My requirement is to display a grid of data from a web service with search and sort functionalities. Currently what I am doing is, storing all the data from the web service into a db table and ...
7
votes
0
answers
775
views
Magento 2 getting error There is a problem with creating or binding queue
The error says:
report.ERROR: There is a problem with creating or binding queue "inventory_qty_counter_queue" and an exchange "magento". Error: [] []
[2017-01-11 07:28:02] report.ERROR: Sample Data ...
7
votes
1
answer
148
views
Magento2 CMSBlock API contains variables. How to replace?
I Have a magento2 EE with a headless implementation. Hence I am using the rest/V1/cmsBlock/<id> to fetch the content which is added by admin (WYSIWYG).
Problem:
I see the output like :
<...
7
votes
1
answer
2k
views
Why is Magento 2 local developer mode site with nginx and xdebug enabled is super slow?
I am getting a 50 second server response time for a category page.
When processing, the following is shown in top:
4312 www-data 20 0 488280 146704 41816 R 99.7 1.8 1:11.54 php-fpm7.0
I ...
7
votes
1
answer
1k
views
Magento2 - Layered Navigation how to create multiselect functionality using code
Magento2 version is - 2.1.2
I am creating custom module for layered navigation and i want to create multiselect options functionality for layerednavigation.
I have already displayed checkbox over ...
7
votes
2
answers
2k
views
Magento2 admin after login redirect back to admin login?
In my magento2.1 installation when put user name and password and submit, the page redirect back to login page. Cleared cache, re indexed, and deployed the static contents as well. But nothing works. ...
7
votes
1
answer
5k
views
How can we create a form at front-end using UI component Magento 2
I am looking to create a form at storefront using UI component. When I create xml file in Ui component folder It throwing an error
Fatal error: Call to a member function getRequestFieldName() on ...
6
votes
4
answers
3k
views
magento 2 change attribute position
i have a configurable product with 3 choises.
choose meterial (dropdown)
choose chain (dropdown)
add your name here (custom option - text field)
now i want the "add your name here" to be first ...
6
votes
0
answers
1k
views
Magento 2 Rest API get Quote Item Custom Option values
Hi I have tried with the magento 2 rest apis
1) V1/orders/:order-id
2) V1/orders/items with serach filter order id
3) /V1/carts/:quoteid/items
The above apis are not returning the Order item ...
6
votes
2
answers
3k
views
Pop-up modal on clicking 'Add to Cart' button!
In Magento-2.2, when we click 'Add to Cart' button,
we need to show the following message as a pop-up modal:
"Product is added to cart!"
I know how to create modal outside of Magento with css.
...
6
votes
1
answer
474
views
Overriding Magento 2 core js function
I need to override the 'loadArea' and 'loadAreaResponseHandler' magento core js functions in the file module-sales/view/adminhtml/web/order/create/scripts.js.
I tried to use mixin property. Following ...
6
votes
0
answers
982
views
Uncaught Error: Cannot instantiate interface Developer.php
HELP!!!
Tried to upgrade Magento from 2.1.7 to 2.1.8 and now I getting below error, when I load the store.
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\...
6
votes
0
answers
1k
views
Magento 2: Sales rules in custom ui form is empty on editing
I am working on extension in which i have add sales rules conditions in my ui form. I am storing as serialised condition. it saves perfectly. However, i am getting empty field during edit form.
This ...
6
votes
0
answers
608
views
How to apply custom validation in Magento 2 checkout Shipping Address form?
In Magento2 - I want to apply some custom validation on shipping address form of Magento 2 Checkout. Normally I do it with JQuery but don't know how to apply it in Magento 2.
The validation I want to ...
6
votes
0
answers
460
views
Magento 2 : How to set default value in custom option
Magento2 - How to set a default value for a product custom option, so that default value can be visible in product details page as default value.
6
votes
1
answer
134
views
Magento 2 : Sales Representative Collect Items from catalog
I want functionality or extension where Sales representative collect items from catalog. After collecting all the necessary items, Sales representative send link to individual customer for checkout. ...
6
votes
3
answers
4k
views
Programmatically update name of category in specific store
I have a magento 2 multi store setup (e.g. stores with the id 1 - 3) and I want to update the name of the category with the entity_id 3.
I've tried
$cat = $this->_categoryRepository->get(3, 3);...
6
votes
0
answers
363
views
what populates data in cataloginventory_stock_status table and from which table
In magento2 - I would like to understand what populates data in cataloginventory_stock_status table and from which table the data is transferred in this table. I tried searching in ...
6
votes
1
answer
3k
views
Mass action in custom grid block Magento 2 not showing
I've created a product grid block following this tutorial, right now i want to add new massAction item but the mass action field won't show up in the toolbar grid, here's the xml file:
<?xml ...
6
votes
1
answer
2k
views
How to dynamically load phtml file on a button click in Magento 2
I have a phtml file view.php and its block class View.php. I need to show that phtml on a modal on checkout page and to do that I'm pre-loading
phtml file using following code :
<div id="modal-...
6
votes
0
answers
2k
views
Magento 2 Admin- Invalid data provided for linked products
Getting an error
" Invalid data provided for linked products "
when adding related products to a product from the admin panel and saving
Indexer crons, already setup
Magento CLI version is : 2.1....
6
votes
1
answer
232
views
Add new options into sorter
In magento 2 project, it provides 3 options by default.
Position
Product Name
Price
I need to change these options to sort as,
Most Popular
Price high to low
Price low to high
I can add from ...
5
votes
1
answer
119
views
How user friendly & efficient Magento Upgrade?
Magento update their version rapidly fast. we are using magento 1.9.2.3, we are moving our entire version from 1.9.2.3 to 2.1.7, after some months magento closed 2.1 series docs. Magento announce EoQ &...
5
votes
1
answer
1k
views
Add product grid in custom module using ui component
I have followed this solution Magento 2 : How to add a product grid in custom module using ui component? but i am getting this
What i am doing wrong can any one help me on this.
Edit Controller
...
5
votes
3
answers
2k
views
Run Magento 2 inside a Docker Container
Is there a way to run my existing magento 2 project inside a docker container? I have an existing project that is run inside a vagrant but I'm encountering a lot of issue in the vagrant and we decided ...
5
votes
0
answers
37
views
Load default address when logged in on magento2
I want to load magento2.1 default address on my cart page address box when i'm logged in.
mean that, when i'm in one step checkout page and logged in, in my address part, see default address instead ...
5
votes
2
answers
570
views
Magento 2.1 - On reindex start event
I am looking for an observer event that is triggered when any re-index starts.
I want to create an observer that sends out an email whenever an index has been initiated for re-indexing.
5
votes
1
answer
3k
views
how to extend default javascript
I try to extend standard magento javascript configuration but I just get nothing.
I'm following this:
http://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/custom_js.html
and this:
...
5
votes
1
answer
2k
views
cannot get extension attributes value
The value can post
However,I cannot get Extension attributes on my plugin which intercept Checkout success controller code. getExtensionAttributes always return null
<?php
namespace Genning\...
5
votes
1
answer
2k
views
How do you include a custom LESS file inside of a child theme?
I'm starting a new project using Magento 2.1 and I'm a little confused on how LESS compilation works.
I created a child theme using a purchased theme as the parent. Inside my child theme, I added ...
5
votes
1
answer
724
views
Add Layered Navigation in custom module - Magento 2.1
I want to add layered navigation block in custom module page and filter custom product collection.
How can I achieve this functionality?
5
votes
0
answers
2k
views
Magento 2 Separate billing address
If a customer wants to change their billing address they have to untick the option My billing and shipping address are the same, a form then appears for them to fill in.
How can I make this unticked ...
5
votes
0
answers
415
views
How to add new custom option type in Magento 2?
I want to create a new custom option type. When i go to the back-end, select a product, go to the section called "Custom Options" I can add a new option, at which point I can select the type of the ...
5
votes
1
answer
977
views
Magento2 REST auth help needed
I'm hanging on this issues for nearly a week and cannot find any sollution. I'm trying to send a REST request to my new Magento2 store. It worked allready, but then the oauth/token forced ...