Questions tagged [magento-2.1]

Denotes questions related to Magento CE and EE 2.1.x

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

Magento 2 create widget container to display in admin end while selcting widget position

I have a requirement in Magento 2 to create a new custom container , so that while adding a new widget from admin end , under the select container section it should come as an option. Mainly my ...
1
vote
1answer
173 views

Extensions in Magento 2 in Plesk 12 via APS Package

after a while of trying to run magento2 on plesk 12 manually I decided to try the APS package and installed Magento 2 as an application on my domain. Everything seems to work almost fine, but I cannot ...
11
votes
2answers
4k views

create date and time attribute for product in magento 2

I tried to create an attribute for product which has to be display date and time calender and that should be stored in database as date and time formate only.I struggled it for a lot but no luck.Can ...
8
votes
7answers
10k views

Magento 2 - Why do SKU not change dynamically in configurable product view page

When you change an attribute in a configurable product the product image changes dynamically but the SKU doesn't change. Also, if you add a configured product to your basket it gives you the image of ...
3
votes
0answers
213 views

Add upload field from code at new product form - Magento 2.1

I'm developing an extension that adds an additional upload field to the product edit form. In Magento 2.0.x I could just simple add an input and the file would be added to the post. Now, with Magento ...
3
votes
1answer
3k views

Remove header sign in link from magento 2 one page checkout

I have been playing around with removing elements on magento 2's one page checkout. Not sure how to remove the sole sign in link provided during checkout in the header. The code below does not work in ...
11
votes
7answers
40k views

Magento2 - Get category URL by ID

I'm trying to get the URL key of any given category with the ID. I have this; $categoryId = 3; $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $object_manager = $_objectManager-...
1
vote
2answers
236 views

Is it possible to have Magento ver. 1.9.1.0 and 2.1.0 on the same VPS server?

I have one production Magento store right now - it runs on ver. 1.9.1.0. I just tried to install a brand new Magento store on another domain (separate account within the same VPS re-seller hosting ...
1
vote
1answer
643 views

ACL for Front End Module

I have a front end module that I have developed, which I want to restrict to logged in users only. Stressing this is front end users, not admin users we are talking about. I assume this can be done ...
5
votes
2answers
3k views

Create multiselect with source model in UI component

Since Magento 2.1 you have to define a UI component for custom category attributes (See Magento 2.1: how to create category attrbute programmatically?) I have one multiselect attribute with a custom ...
0
votes
1answer
3k views

Add category attribute to custom attribute group

I try to create a category attribute in a Magento 2 install script (or how do we call these now?) In Magento 1, I could specify anything as group and the group would be created. In Magento 2 this ...
1
vote
0answers
83 views

Magento 2.1 : Pager Issue using Controller for frontend

I use below code in block, so pager is working perfect. protected function _prepareLayout() { parent::_prepareLayout(); if ($this->modelFactory->create()) { // ...
4
votes
1answer
4k views

Magento 2.1 - Custom Category Image attribute is not saved

I have created a custom category thumbnail attribute according to the post (Magento 2 create category attribute thumbnail and upload image using File Uploader Component). The image gets saved in the "...
1
vote
0answers
57 views

How to update entity_type_id in table?

I have the situation that I want to migrate a Magento 1.6.2.0 database to Magento 2.1 using the data-migration-tool. The tool is mapping some fields by the entity_type_id. My problem is that the ...
5
votes
3answers
8k views

Magento 2 create category attribute thumbnail and upload image using File Uploader Component

I've created a custom module to display category thumbnail image. I've read magento dev doc It is displayed in my category section using category_form.xml <?xml version="1.0" encoding="UTF-8"?&...
1
vote
3answers
1k views

Cannot create category in magento2

I am trying magento 2 for first time and it's driving me crazy. I have successfully installed magento 2 on my cloud shared hosting and everything looks ok except these: Cannot create category: there ...
1
vote
1answer
433 views

Magento 2.1 - Get a collection including out of stock products

In a basic block I'm getting the featured products, however I only get the products that are in stock: public function getProducts() { $collection = $this->_productCollectionFactory->create(...
1
vote
1answer
28 views

Any link redirect to one same product, only /checkout/cart don't - Magento 2.1

I was using the site normally and suddenly it started to redirect all categories and products to one same item, if I copy and paste the URI for products that are active it shows 404. Any idea how I ...
6
votes
1answer
5k views

How to retrieve which layered navigation filters are applied in product list page in Magento 2?

I'm going to write a block to put in products list page. My question is how can I get to know which layered navigation filters are currently applied in the current list page ? Any help will be ...
0
votes
2answers
2k views

“Call to a member function getIsInStock() on null” with getExtensionAttributes()->getStockItem()

I try to access stock data for a product, using $product->getExtensionAttributes()->getStockItem()->getIsInStock() and receive the following error on this line PHP Fatal error: Call to ...
1
vote
1answer
242 views

Design configuration multistore magento 2.1

We set up a multistore site and it works. Now I wanted to change the logo and with 2.1. it moved to content -> design -> configuration, but I can't switch website view and only one of the shops (own ...
2
votes
2answers
163 views

Add same plugin to all public methods of a type

Is there any chance to add a plugin to all public methods of a type without writing a separate method for all of them? I would like to use that to log method calls. The original method is always ...
4
votes
1answer
2k views

Magento 2.1.0 Checkout page is blank

After upgrading to 2.1.0 my checkout page looks like this In console there is an error TypeError: window.checkout is undefined I tryed what was suggested here Magento 2 (CE) not displaying the ...
2
votes
0answers
308 views

Magento 2: implement your own captcha type

Out of curiosity, I was going through the captcha module of M2 and I noticed this interesting code in Magento/Captcha/Helper/Data.php public function getCaptcha($formId) { if (!array_key_exists($...
0
votes
1answer
64 views

How to remove parent theme image sizes in Magento 2.1

A purchased theme contains many different image sizes, most of which we will not use. To speed up image processing, is there a way to remove these definitions from within the child theme without ...
3
votes
1answer
877 views

How to switch off cache in referenceBlock [duplicate]

I'm trying to switch off caching in referenceBlock. I tried: <referenceBlock name="block.name"> <arguments> <argument name="cacheable" xsi:type="boolean">false</...
1
vote
1answer
53 views

Magento2 model is not getting overriden?

I want to override the model class vendor/magento/module-grouped-product/Model/Product/Type/Grouped.php via a custom module. My Test/Kit/etc/di.xml is as follows <?xml version="1.0"?> <...
27
votes
10answers
10k views

Magento 2: Fails to upload a transactional email logo from admin

I'm trying to change transactional email logo from. Admin > Content > Design > Configuration > Edit any record -> Transactional Emails It's on Magento 2.1 but logo showing broken image after ...
1
vote
0answers
164 views

Braintree form error: ncaught TypeError: FormNapper requires an HTMLFormElement element or the id string of one - Magento 2.1

We have Magento 2.1 installed and we are completing the integration with Braintree, everything seems to be working fine, however, on latest version of Chrome shows this error: braintree-2.17.6.min.js:...
4
votes
1answer
6k views

Magento 2.1 Update Product Stock in Cron Job

I need to be able to programmatically update product stock in my Cron job. I have an array that contains both the SKU of the product needing updating and the Stock value of that product. How can I ...
0
votes
1answer
318 views

Magento 2.1 PHP version suggestion

I recently got a project in Magento 2.1 CE (from scratch). Although the officially recommended of PHP is 5.6, I am more inclined to go with PHP7. I was looking for a Pros and Cons list of going with ...
0
votes
2answers
3k views

Magento 2 - Move Product description out of Tab above the add to cart button

How can I move Product description out of Tab, above the add to cart button in magento 2 in luma theme Why there is no view.phtml file as in magento 1.x
2
votes
1answer
2k views

Magento 2.1 Minicart Knockout TypeError

I'm working on a Magento 2.1 project with the Navas theme. I can add products to the cart, but the minicart doesn't show any products.. I can only visit the cartpage by going directly to the page, a ...
1
vote
1answer
3k views

magento 2.1 create category attribute thumbnail

create category attribute thumbnail. i create require file as per new magento 2.1 This is my category_form.xml <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/...
3
votes
2answers
1k views

How to use Customer Account menu on custom page

I am rebuilding an old 1.x module for Magento 2, adding a "customer invoices" page to the Customer Account section of the site, which brings in PDF invoices from a proprietary external source. I have ...
2
votes
1answer
375 views

How to install magento2 sample module?

How can I install sample-module-payment-gateway (https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway) using composer? I'm getting error "Your requirements could not ...
2
votes
3answers
4k views

Magento 2.1 Uncaught TypeError: Cannot read property 'replace' of null

Hi whenever I try to create a new product I get the following error in the console: Uncaught TypeError: Cannot read property 'replace' of null This is the only time I get this, I can create pages, ...
12
votes
4answers
28k views

How to show success message in session Magento2

In magento 1 i can do it like this $session = Mage::getSingleton('core/session'); $session->addSuccess($this->__('Your Request has been received. One of our sales representatives ...
0
votes
2answers
335 views

How to get all attributes of a given product?

I want to get all the attributes which are not empty for a given product. Tried various suggestions in the web, but didn't work, Any suggestion will be appreciated.
2
votes
1answer
600 views

Add new Product type in Magento 2?

I am trying to add new product type in magento 2 but when i click on product type say Demo Product from the Add Product Select box than it will throw below error. The requested component ("...
28
votes
1answer
4k views

Magento 2.1: using the entity manager

From 2.1 Magento has introduced Magento/Framework/Model/EntityManager I may be wrong here but from my understanding it is to replace Magento/Framework/Model/AbstractModel which was implementing the ...
0
votes
1answer
163 views

override default css in new theme in magento 2.1

I did create custom.css in app/design/frontend/hsc/hsc-theme/web/css. But it didn't work how to do it? How to override default css in new theme in magento 2.1?
20
votes
7answers
92k views

Magento 2 did not sign in correctly or your account is temporarily disabled

When trying to login to admin account in my local test setup it says : Account is temporarily disabled even i used correct user and password.
1
vote
2answers
1k views

Redirect after place order got issue in CE 2.1.0

I developed a Magento CE 2.0 payment module.It's procedures are: Select the payment method and choose the bank. Place order. After place order successful, customer will redirect to payment gateway ...
0
votes
1answer
404 views

Theme developement in magento 2.1 and fall back is not working

I am creating a new theme. My theme has no css, js files. I have just added theme.xml and registration.php files. I have set parent theme magento/blank (in theme.xml). But my theme is not inheriting ...
1
vote
0answers
237 views

magento 2.1.0 - currency conversion only on configurable products?

I have i question about currency conversion. Background: We have a fresh install of Magento 2.1.0 CE and have stared to add content (products). In the config we have 4 website, each with its own ...
2
votes
0answers
815 views

Braintree credit card fields disabled in Latest version of Chrome - Magento 2.1

I have Magento 2.1 enabled with the native checkout, I noticed that the credit card fields stay disabled in the latest version of Chrome, in all other browsers it works fine. Anyone had the same ...
11
votes
3answers
4k views

Right way to implement getExtensionAttributes()

I was wondering, what's the right way to implement an extensible EAV model. I see that in Magento\Catalog\Model\Product, the method getExtensionAttributes() is implemented like this: public function ...
16
votes
1answer
2k views

Magento 2.1 adding new component type problem

I added a new form element type called Company\Module\Data\Form\Element\PdfButton, when it is version EE 2.0.7 and used this element in a custom tab(added by overriding Magento\Catalog\Block\Adminhtml\...
0
votes
2answers
8k views

Magento 2 Admin ERR_TOO_MANY_REDIRECTS

This problem looks like the case of using http://localhost as domain as found the issue: magento 2 Error ERR_TOO_MANY_REDIRECTS But in my case the base-url is: http://m2test_bd.mac0004.isaac.local/ ...