Stack Exchange Network

Stack Exchange network consists of 174 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

10
votes
0answers
5k views

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

Its 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 on ...
6
votes
0answers
659 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 ...
6
votes
0answers
657 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
619 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 ...
5
votes
0answers
445 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
145 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
623 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
456 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
320 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
530 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.
5
votes
0answers
455 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
458 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?
5
votes
0answers
140 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
242 views

Magento 2 : Best Way to Implement Favorite Products List for Regular Customer

The majority of our customers not very tech savy 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 ...
5
votes
0answers
70 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
644 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
352 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
356 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
662 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
408 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
166 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
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
564 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
575 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
193 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
46 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
297 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
464 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
3
votes
0answers
93 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
279 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
196 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
140 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
160 views

Magento2, add to cart modal

On a successful trigger of Add to Cart button. How we can get a modal like this picture? Appreciate all your attention!
3
votes
0answers
52 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
325 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
264 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
240 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
94 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
111 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
102 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
212 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
293 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
209 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
341 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
565 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
569 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 ...
3
votes
0answers
29 views

How to insert create customer account form layout to a block as a widget

I want to insert customer_account_create.xml content which containing the create customer account form into one of my block that I created from backend > content > blocks > add new block Is there ...
3
votes
0answers
63 views

Check if block is called in phtml file

Is it possible to check in default.phtml file (app\design\frontend\MyNAMESpace\MY_THEME\Magento_Catalog\templates\product\price\amount\default.phtml) that catalog.product.related (block ) is loaded or ...
3
votes
0answers
977 views

OTP login for customers in magento 2

I want to implement customer login using OTP (one time password functionality). Customer should receive sms with code on phone whenever they login, which they fill on magento to login. Some ...