Questions tagged [magento2]

General questions about Magento 2, not specific to a minor version. Use this tag to distinguish from Magento 1. If you have issues with a specific version, please use the appropriate 'Magento-2.x' tag instead. Functionalities between Magento 2 minor versions might differ.

Filter by
Sorted by
Tagged with
0
votes
1answer
451 views

Cannot add fields before name widget - magento 2

I'm trying to add a field in the "new customer" form, so i would like to put something into customer_account_create.xml layout, precisely in the block <block class="Magento\Customer\Block\Form\...
0
votes
1answer
657 views

Can not update configurable products, price of simples suddenly become 0,00

Preconditions Magento 2.1 Nginx PHP 7.0.9 Memcached Redis Server Steps to reproduce Add a new configurable product Create the simple products while creating the configurable product Save the ...
0
votes
1answer
189 views

Pictures enlarged on front end of Magento 2 store

Hi I am using Magento version 2.0.6 I have a live version of the site and a local version running on my pc which i use for testing. as i make changes to the local version i deploy it to the live site....
0
votes
1answer
119 views

Magento 2 Wamp installation CSS/JS files return 404 error - multi store

I have the Wamp installation of Magento 2 with 2 websites (Sportswear.com and Furniture.com). I have not changed the sportswear website domain and it works perfectly. I navigate to this using ...
0
votes
0answers
244 views

Magento2: Overwriting block file showing ReferenceError: opConfig is not defined

I want to overwrite this block file Magento\Catalog\Block\Product\View\Options\Type\Select.php But I am getting ReferenceError: opConfig is not defined error while changing or selecting the custom ...
0
votes
2answers
336 views

magento2.1 paypal checkout fail when items having custom option

I found paypal failed with message "We can't place the order". This message shows after login your paypal account and redirect back to the order review page (even thought I disable it). I'm ...
0
votes
1answer
36 views

Magento 2. How can I have some categories show products in Grid View, while others show it in List view?

I have a website where I need to show some products in Grid view while others are in List view. How is this possible in Magento 2? Does anyone know about an extension for this? Or can it be set up in ...
0
votes
3answers
95 views

css is not working in magento2

This is my default_head_blocks.xml file code <css src="css/source/_style-l.css" /> <css src="css/source/styles-m.css" /> <css src="css/source/styles-...
0
votes
1answer
394 views

How to add KnockoutJS Plugin to Magento2?

Goal: Add pager.js. pager.js is a JavaScript library based on KnockoutJS and jQuery that provides the possibility of creating single page applications in a declarative fashion - nesting subpages ...
0
votes
1answer
731 views

Submenus NOT working in Magento 2 Admin>Configuration Panels

Anyone know how to fix a brand new fresh install of Magento 2.1 when instantly upon installing NONE of the panels are expanding in Admin System Configuration?? Kinda hard to setup a store when a fresh ...
0
votes
2answers
661 views

How do I extend Magento_Checkout/js/checkout-data.js?

How do I extend Magento_Checkout/js/checkout-data.js in a custom theme?
0
votes
1answer
94 views

Magento 2: create object of other class as Psr or session in Plugins

I have created a Plugin to add custom buttons in grid, based on admin user login. If super admin logins all buttons will be displayed else for other admin users button will be removed, so that they ...
0
votes
1answer
21 views

migrate previous magento into new magento

Hi i want to know how to migrate previous magento customers details with purchases into new magento 2.1 store. I have tried to look into the database, but was not able to find the required details. ...
0
votes
1answer
1k views

Correct way of creating custom SOAP API magento2

Please correct the below for creating custom SOAP API. \Vendor\Module\etc\di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
74 views

creating a plugin to disable the save and continue button in customer but its not working…want to know am i using right approach?

namespace User\Role\Plugin; use Magento\Backend\Block\Widget\Button\ButtonList; use Magento\Backend\Block\Widget\Button\Toolbar as ToolbarContext; use Magento\Framework\View\Element\AbstractBlock; ...
0
votes
1answer
622 views

Magento 2 How to check Price Type?

File location <magento dir>\vendor\magento\module-directory\Model\Currency.php In Magento we have "finalPrice" & "oldPrice" Can anybody tell me how to check Price Type? Can we use $...
0
votes
1answer
868 views

PHP 7.0.9/NGINX 1.11.3/Magento 2.0 Setup gives blank page

This is my first time posting here and I am hoping someone can help me out, I am a little stumped. We have a Linux CentOS 7 server with PHP 7.0.9 and NGINX 1.11.3 installed. We are trying to install ...
0
votes
2answers
1k views

pub/static loading only via http

I've set a Magento2 installation up with an SSL. I have this working fine in the backend of the website however all css/other calls in pub/static aren't being pulled through via HTTPS but HTTP. I've ...
0
votes
1answer
760 views

Get product collection based on entity_id in magento2

How to Create product collection with filter based on entity_id in Magento 2? I tried below: $model = $this->_objectManager->create('Vendor\MOdule\Model\Queue'); $ProductId = $this->...
0
votes
0answers
31 views

Magento 2 Installation Bug

Hello I have moved magento2 on live server that centos6 server, And my root directory is /var/www/html/magento source code. But my problem is my backend side working but frontend side just loaded. ...
0
votes
2answers
901 views

Import Problem in magento 2.0.8

While I import a product using csv file, magento2 throw this error Data validation is failed. Please fix errors and re-upload the file.. Following Error(s) has been occurred during importing process: ...
0
votes
1answer
148 views

Magento 2 Minicart template not changing on front end

I want to style the minicart in my Magento 2 store. When I edit /Magento_Checkout/web/template/minicart/item/default.html none of the changes show up in the cart. Is that a caching issue? or am I ...
0
votes
1answer
1k views

SQLSTATE[HY000] [2006] MySQL server has gone away only for magento 2

The MySQL is regularly going away for Magento 2 only. While working, if I refresh cache, then it shows gone. I can login to the MySQL and do all the queries. It is working. Also, the local Magento 1 ...
0
votes
0answers
59 views

Update behaviour in csv not working as expected

I have a custom table with columns : And My product csv file has SKUs SKU (product_id from backend) OUTIPCAM11 (98) OUTIPCAM12 (99) OUTIPCAM13 (100) OUTIPCAM14 (101) OUTIPCAM15 (102)...
0
votes
1answer
427 views

magento2 database changes details in each update

Is there a place we can keep track of magento2 database table each time it's updated. I found this would be helpful for people who already start using magento2. Simplest scenario, user can backup the ...
0
votes
1answer
1k views

Magento 2 How to add onKeyUp to a text field in customer checkout address form?

I want to add a auto complete function to the customer checkout address form, but I found that the address fields are rendered by knockout js, I can't add the "onKeyUp" attribute directly. How can I ...
0
votes
1answer
132 views

Magento Block classes and docs

I've been using Magento 2 to do some theme development and I'm wracking my brain trying to find documentation for block classes. I've been digging through Block folders and stuff. I'm wondering if ...
0
votes
2answers
316 views

CMS media url problem %7D%22

I'm having some troubles with images in one cms page. Using <img src="{{media url='wysiwyg/someimage.png'}}" alt="" /> The result on the frontend is <img src="http://www.someurl.com/pub/...
0
votes
1answer
87 views

How to create a user with access to given web shop in Magento 2 multi-store

How to make a user in Magento 2 multi-store configuration with giving access him to only 1 sub web shop?
0
votes
1answer
621 views

Magento 2 - Set Category page layout dynamically

I tried set dynamically category page layout base on admin configuration. But I can't set it use ifconfig. Can you please help me set the layout dynamically. Thanks in advanced.
0
votes
0answers
439 views

Magento 2 How to get currency code on basis of GeoIP Country

Programatically how to get currency code on basis of GeoIP Country? Example: Singapore - SGD
0
votes
0answers
250 views

magento2 insert error during csv import

I want to insert the entity_id of my modified products while csv import into my custom table. My custom table "tgs_queue" columns : (id, product_id) //id-primary key In CatalogImportExport ...
0
votes
1answer
788 views

How to make related/up sell products display full width of screen?

In product page, product details tab appear below the images gallery along the full width of screen. Related products appear below the details tabs. If details are moved to the right column (below ...
0
votes
1answer
434 views

how to add parent filter in Magento2 product collection?

How to load new product collection in Magento 2 something like $collection->addAttributeToFilter('parent_id', null); I want all simple product which is not associate with configurable which mean ...
0
votes
1answer
62 views

Magento 2 Price Different version 2.0.7

Got a strange issue in Magento 2 on a Configurable Product: All size 4,5 and 6’s should be £289.00 and have no VAT attached All size 7’s should be 249.167 and have VAT attached So I’ve se the config ...
0
votes
1answer
1k views

Images are blurry, loading “smaller” then needed

We are having issues with the Upselling Slider. This is the code I use to get the product thumbnails: <?php $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); ?> <?php $...
0
votes
1answer
521 views

From price for configurables in Magento 2

Trying to find a simple and elegant way to display a from price for configurables prior to an attribute bring set, eg size. So on product page the price renderer would initially say From X and then ...
0
votes
2answers
3k views

Magento 2 - Can't Change Page Layout Columns With An Override Layout File

I am able to change the layout columns if I extend a page's layout file, but it won't work if I use an override layout file. What do you have to do to change a page's layout columns with an override? ...
0
votes
0answers
20 views

Give the option in admin to change custom module route on frontend [duplicate]

Say on frontend your main module page is www.website/test/ etc/frontend/routes.xml: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
1answer
187 views

Store data not set after load grid ui

I have created my own custom module. Entity like Block and Page of module cms. Everything ok. My form can save data to db. In my form i have field to set which store to belong. It like cms blog store ...
0
votes
1answer
394 views

How to set up a user instead of using root Magento 2

I'm using root user to do everything which is throwing up problems. I know this is not the right way to do things. How do I set up a new user and set permissions?
0
votes
1answer
699 views

Magento 2 - Add a message to a ko template that is created through a LayoutProcessorPlugin

I need to add message "Need it by today? Anything is possible, it's just a phone call away" in a KO template. However, this template is created through the afterProcess method LayoutProcessPlugin.php ...
0
votes
1answer
555 views

Magento 2 - Module Block Causes 404 Error

I have cobbled together a module for Magento 2 that is eventually going to insert a block in to the product page that pulls in other products with a similar attribute (in this case, "range"). When ...
0
votes
1answer
415 views

How to get customer increment_id as extension_attribute in REST order search?

I'm trying to get the customer increment_id to be included as customer_increment_id as an extension_attribute in orders when I search orders through rest/V1/ordes?searchCriteria... I added following ...
0
votes
1answer
189 views

Check whether customer is loggedin in Magento 2 model class

I have to write code in Magento 2 model class's method with a condition that if (the customer is loggedin){ //fetch customer detail }else{ // else do something else } I followed many posts ...
0
votes
1answer
146 views

Find all products in Magento 2 with more than 1 product image

Looking for some SQL which would list all SKU's with more than 1 product image attached to it. Ideally I would also like to delete all images which are not used as base/small/thumbnail, but happy to ...
0
votes
1answer
2k views

Magento 2 - Custom block won't show in layout

I made a custom module to display store information like phone, address, etc. I'm overriding the blank theme's default.xml layout with my theme in \app\design\frontend\MyVendor\MyTheme\Magento_Theme\...
0
votes
1answer
893 views

Magento2 Check value of attribute for IF statement

I am trying to check if an attribute is set to yes then show this block. <?php if($_item->getAttributeText('free_shipping_toggle')=='1'): ?> <?php echo $this->getLayout()->...
0
votes
2answers
1k views

How to reset the category ID's count # for Magento 2.x?

I'm using a 3rd party plugin to setup our production website in a test/dev environment. It allows export/import of the categories, excluding the Category ID's (which are automatically generated). As ...
0
votes
0answers
25 views

/web/template-files cannot be copied to own theme in order to modify them

If you try to translate the strings in /vendor/magento/module-checkout/view/frontend/web/template/... you need to modify them in the core directly. I do not want that. Copying them is not a solution, ...