Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

16
votes
0answers
6k views

Magento 2: Uncaught TypeError: Cannot read property '*' of undefined in (section-config.js:33)

It's duplicate question but I am facing the same issue while adding the product & removing items from the cart page. I have spent almost a day to resolve but no luck hope someone could help me ...
8
votes
0answers
714 views

Magento2: Conditionally replace block template and class the right way

This rather trivial requirement turns out be quite a pain for us in recent days, as we couldn't find a satisfying existing solution, yet. The Task We are trying to replace certain blocks with a ...
7
votes
0answers
696 views

Magento 2 - Update quantity and totals of cart page without page reload?

We need to update the 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 not updated ...
6
votes
0answers
277 views

Magento 2 : What is the Best Way to Implement Favorite Products List for Regular Customer?

The majority of our customers not very tech savvy and have trouble with basic website functions and they need to order same or similar items every week or quickly. What is best way for me to assign ...
6
votes
0answers
676 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 ...
5
votes
0answers
486 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'...
5
votes
0answers
156 views

Alternative to Authorize.net Direct Post?

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 integrate with Authorize.net ...
5
votes
0answers
660 views

Uncaught Error: Cannot instantiate interface Developer.php

HELP!!! Tried to upgrade Magento from 2.1.7 to 2.1.8 and now I get the error below when I load the store. Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\...
5
votes
0answers
458 views

How to apply custom validation in Magento 2 checkout Shipping Address form?

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 implement are ...
5
votes
0answers
328 views

Magento 2 : How to set default value in custom option

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 in magento 2.
5
votes
0answers
478 views

Magento 2 fotorama slider show more than 1 image at a time

I want to show 3 product images at a time on Product detail page. Here is the example image: But fotorama image only show 1 image at a time on slider. It doesn't have slides or items options to set ...
5
votes
0answers
149 views

Magento 2.1 : Calendar Frontend

I have some data on front-end , which I want to show on specific days in the calendar. I got this code to show the calendar on the front end . <?php $a = 'some text'; $b = 'some ...
5
votes
0answers
71 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 added by admin (WYSIWYG). Problem: I see the output like : <response>...
5
votes
0answers
668 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 preloading that phtml file using following command <div id="...
5
votes
0answers
384 views

Multiple dependency system config in magento 2

Example: field_1 values 1,2,3 field_2 values a,b,c field_2 depends on field_1 value 2 Now I want to make dependency on field_3 field_3 shows only when if field_1 value is 2 or 3 or if field_2 ...
5
votes
0answers
1k 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
0answers
368 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 backend, 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 ...
4
votes
0answers
64 views
+50

Header and footer in an external file

I'm using an index.php file under /pub/custom folder, which is used to create custom designs. This file is completely written in html and javascript. Is there any way to include current header and ...
4
votes
0answers
22 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 ...
4
votes
0answers
575 views

Magento 2 : settings.$elementF.fotorama is not a function

I installed Magento 2.2.2 and getting issue with image gallery js. Product page images are not loading sometimes with below error settings.$elementF.fotorama is not a function
4
votes
0answers
741 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. ...
4
votes
0answers
458 views

magento 2 wishlist remove items

I need to make the code snippet work.In file magento\app\design\frontend\Webkul\agorae\Magento_Wishlist\templates\catalog\product\view\addto\wishlist.phtml Code snippet Code taken from path ...
4
votes
0answers
178 views

what populates data in cataloginventory_stock_status table and from which table

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 cataloginventory_stock_item but ...
4
votes
0answers
1k 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 ...
4
votes
0answers
71 views

Get ID of created product in middle of database transaction

I am doing a webapi for Magento 2.1 and i need to create configurable product and simple products and then linking it all up. A psuedo-code normal transaction will look something like this. //...
4
votes
0answers
650 views

uicomponent form add new button for modal

I have build a custom form using uicomponent I want to add a button and on click want to open a modal with product grid. How can I achieve this using uicomponent form ?
4
votes
0answers
636 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....
3
votes
0answers
9 views

Magento2.1 add pagination to my wishlist

Want to add pagination and toolbar to my wishlist page on customer panel. Mean that i want to do something like list.phtml on wishlist page in customer account - customer panel.
3
votes
0answers
17 views

Magento2.1 payment method and shipping method on my orders of buyer panel

I want to show shipping method and payment method of my orders in my orders on customer panel. i'm using magento 2.1
3
votes
0answers
248 views

Display custom drop down in registration page using Magento2.1

I tried this code but it's not working app\code\Customer\Attribute\Setup\Installdata.php $customerSetup->addAttribute(Customer::ENTITY, 'customer_type', [ 'type' => '...
3
votes
0answers
44 views

login to magento 2 admin using API token

I have a react dashboard that gets data from Magento 2 via Rest API using token based authentication. I want a button somewhere in my reach dashboard to auto-login to Magento 2 admin backend. How to ...
3
votes
0answers
51 views

No results on layered navigation when filter applied

We have a Multi-Store site with product category pages, with some attributes enabled in layered navigation. The fact is that in certain stores, filters counts shows the items per filter correctly but ...
3
votes
0answers
365 views

Paypal express checkout magento 2 - Shipping address is invalid when place order using Russian country and address

I am using magento 2.1.13 and facing issue with paypal express checkout. When I place and order using China, Japan, and Us. it's working but when I place an order using Russian country with their ...
3
votes
0answers
105 views

How to call KO js functions outside the template

Is it possible to access variable addressConverter from custom js file. Filename: Magento_Checkout/js/action/create-shipping-address.js /** * Copyright © 2013-2017 Magento, Inc. All rights ...
3
votes
0answers
323 views

M2.1.x REST API - Invalid type for value array. Expected type: string

Having some conflicts with a REST API I created. Trying to pass an array of strings; for example, "skus", but I get this error: Invalid type for value: array. Expected type: string. {vendor}/{module}...
3
votes
0answers
240 views

Random integrity constraint errors saving orders in Magento 2.1 after payment

I have a system that generates quotes, then submits the quotes, which processes a payment. The system is pretty standard: nothing really complicated is going on. The quotes have a single product in ...
3
votes
0answers
151 views

Need to configure more than three redis server for session Magento2

I have three radis server with load balancing. the radis session is shared by global for all instance. i configure the radis cache for magento2 EE session in env.php for single radis url. I need to ...
3
votes
0answers
53 views

Placing Multiple Orders in Magento 2.1 using REST API

How to post multiple cart items through one request on server using magento2.1 REST API?
3
votes
0answers
359 views

Magento 2 Optimize memory leak perfomance

I have a problem with the import data process. First: I have used the factory creator to create a Model set data and save but the problem when I have 400k Item to save. --- Constructor \Magento\...
3
votes
0answers
296 views

Magento 2 make purchase order number optional

Is there a way to make the purchase order number in the checkout optional? Currently it's a required field in 2.1.7 and I can't find a configuration setting to change it. I'm aware that I could ...
3
votes
0answers
270 views

Is there a way to search by sku with hyphen without extensions?

I have some skus that have a very short string before the hyphen, like LC-100-PI, so the search brings up around 400 results that include "100" in them but the one I am looking for is not found until ...
3
votes
0answers
107 views

How to add extra price on configurable product and it's child (Simple Product) magento 2x

How to add extra price on configurable product and it's child (Simple Product) magento 2x like this : ($1.95 for configurable and $1.25 for it's child) I want to add this price on frontend. After ...
3
votes
0answers
135 views

Set title tag on Product thumb images Magento2.1

As suggested by our SEO guys, they wanted to show title tag on product detail page's thumb images. I am able to manage other image's title tags on the same page but not able to set title tag here. ...
3
votes
0answers
111 views

Magento 2 FPC with Varnish

We have Magento ver. 2.1.7 where I have installed varnish and enabled it from backend after exporting varnish 4 .vcl file. It seems to be working fine and pages which are once loaded do load quickly ...
3
votes
0answers
250 views

Magento 2.1: Adding Custom Css to Admin Ui Component Form

I invested a couple of hours to get a solution to figure out , that how can we customize the M2 admin form - for the sake of clarity please see the below screenshot: The default admin form fieldsets ...
3
votes
0answers
317 views

Magento 2 customer session setAfterAuthUrl() failed to set redirect URL

I have created custom module for custom blog wishlist. So I have set authentication while trying to save blog into wishlist as below Controller >> save.php public function execute() { $data = []; ...
3
votes
0answers
242 views

Magento 2 : How to Return the Collection from afterload

I have implemented this jquerytokenizer in Ui Component form shown in the below image. It works well , the data is saved accurately- but when I go to edit a saved record this field is empty ...
3
votes
0answers
364 views

Magento 2.1 Rest API - Adding to Extension Attributes for VI/Orders/?searchcriteria

I have some custom data that I gather on checkout. Using etc/extension_attributes.xml, I was able to add this data to the extension_attributes output on VI/Order/#id, but when I use VI/Order?...
3
votes
0answers
632 views

Magento 2 remove options from item cart

I am trying to remove the customs options from the item car with this code. public function beforeupdateItems(\Magento\Checkout\Model\Cart $subject,$data){ foreach ($data as $itemId => $...
3
votes
0answers
590 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 ...