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
7
votes
2answers
9k views

How to add Qty in add to cart form on Product Listings Page in Magento 2

How can you add a Qty filed to the the add to cart form on the category listings page. With the Luma theme the user only has the option to add one product to cart at a time from the product listings ...
6
votes
1answer
5k views

Extension attributes to add product attribute to the order summary on checkout?

I am trying to display a custom product attribute under the order summary list of items on checkout. I think it is fed by the TotalsItemExtensionInterface. I have the following trying to add the ...
6
votes
3answers
15k views

Magento 2.2 How to show out of stock in configurable product

this may be a simple question for some - but we havent used stock extensions before. Question: how can we easily, simply, add the ability to - instead of hiding out of stock simple products (as part ...
6
votes
3answers
23k views

Magento 2 - Send form data to Controller using AJAX and return Result to PHTML

I am working on a simple custom module, where user can input height and the weight/BMI will be shown as output on form submit. The page where user enters input is Calculation Page while output is ...
5
votes
8answers
17k views

How to check that customer is logged in on frontend in Magento 2.1?

How to check that customer is logged in? In authentication-popup.js I found following code: define([..., 'Magento_Customer/js/customer-data',...], function(..., customerData, ...) { ...
5
votes
1answer
11k views

Magento 2 - Emails -> if statement

I'm currently configuring my transactional emails for Magento 2 and since I am in germany and want to ship some parts to a partner inside the EU i can place those orders without calculating taxes for ...
5
votes
4answers
5k views

Magento 2.3 problems on local server

I'm trying to install a Magento 2.3 instance to my localhost(WAMP server) but after installation process(I use a command line to install) not Admin part or storefront part works correctly. It shows a ...
4
votes
2answers
9k views

Share cart in magento 2 multistore

I have a magento 2 website where we want to have 3 different stores on 3 different domains. We want to share cart and customer session on the different websites. Each website/store will have different ...
3
votes
2answers
3k views

How to perform auto-login in Magento2 admin?

For M1 i had a php file which took care of logging into admin, now i need the same for M2 but i can't get it to work. This is my external file: use Magento\Framework\App\Bootstrap; require __DIR__ . ...
18
votes
4answers
14k views

How to increase the quality of product photos JPG (Magento 2)

The JPG compression on Magento 2 is very strong, so that the quality of product images get really bad in Catalog and Product view. How can I change the Image compression for JPG's in Magento 2?
16
votes
5answers
8k views

What is the proper way of positioning/ordering CSS files in Magento 2?

In the Magento 2 DevDoc it says To include a CSS file, add the <css src="<path>/<file>" media="print|<option>"/> block in <head> section in a layout file. However it ...
5
votes
8answers
15k views

Magento 2.2.4 - Breadcrumbs do not show on product pages when default navigation is not present

I have a Megamenu extension installed replacing the default navigation menu. This however when added breaks breadcrumbs on product pages. I have debugged by also removing both navigation and this ...
5
votes
3answers
10k views

How to update cart qty using ajax Magento 2

How to update cart qty using ajax magento 2 I want to change qty on cart page. I don't want to use the update button. It should be update automatically without reloading the page.
5
votes
10answers
24k views

Magento 2 shows 404 error and front end css crashed

I have installed Magento 2 successfully. When i am trying to open front end that looks like this picture and backend shows 404 error. how to solve this?
11
votes
2answers
12k views

How to pass variable to external js in magento 2

In magento 1 we can call this prototype function in phtml for example function ABC(){ var a = '<?php echo $a;?>' alert(a); } but in magento 2 we can not add this type of function in ...
8
votes
1answer
4k views

Magento2 - How can I display a product attribute value in Order Summary block?

I am trying to display a product attribute value instead of the product name. I have found the tempplate where it is displayed: vendor/magento/module-checkout/view/frontend/web/template/summary/item/...
7
votes
2answers
24k views

Magento 2 - How do I change the locale of admin backend?

I checked ALL the settings under stores->configuration. Is there a view mode or something else?
6
votes
1answer
5k views

How to override adminhtml phtml in magento 2?

Does anyone know how to override the below template? vendor\magento\module-backend\view\adminhtml\templates\media\uploader.phtml.
6
votes
2answers
6k views

How to install module magento 2 don't need run command line bin/magento setup:upgrade

I need to install module pf magento 2 in hosting. I'm trying to connect host with port 21 using putty but not success. I need one other way, please help me.
4
votes
2answers
5k views

Magento 2 How to check if Admin Logged on frontend

I'm trying to check if admin is logged in on frontend in Magento 2 but I didn't find the way. Some help?
3
votes
1answer
1k views

Sign Up With Avatar REST API Validation Error : Magento 2

I have this code for image attribute (avatar). app/code/Ibnab/CustomerPut/Setup/InstallData.php : <?php namespace Ibnab\CustomerPut\Setup; use Magento\Framework\Module\Setup\Migration; use ...
3
votes
2answers
11k views

Adding JS to the checkout

How to add custom JS to just the checkout page? I found this tutorial, but as far as I can tell it will add JS to the entire site.
3
votes
1answer
19k views

magento 2 create categories programmatically [duplicate]

I would like to create categories programmatically in magento 2. Please suggest me proper code for it. I have try this code Link but not working properly . I have to create number of categories on ...
16
votes
2answers
17k views

Magento 2 error: We're sorry, an error has occurred while generating this email

I am getting below error in magento 2 local system. We're sorry, an error has occurred while generating this email.
7
votes
1answer
656 views

magento 2 : Add multiple product to cart

I have array of checkbox selected products(entity_id) in my controller how to add those product to cart directly
5
votes
7answers
11k views

How to hide price in magento2

I don't want to use any commercial module for hiding price.and i don't want hide by using templates. is there any way to hide price from entire site using plug-ins or rewrites?
4
votes
4answers
27k views

After successful installation, admin URL is returning a 404?

I successfully installed Magento 2 using MAMP and OS X, front end is working great but when I clicked the "Launch Magento Admin" button upon installation it returned a 404 on the front end, and when ...
2
votes
6answers
8k views

Magento 2 - Create New Theme based on the blank theme

I'm new to Magento I try to create a new theme based on the Magento blank theme and I follow the Frontend developer guide in Magento web site but I could not inherit from Magento/blank and when I open ...
2
votes
2answers
2k views

magento2 - catalogsearch override template not working

etc/frontend/routes: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <...
0
votes
3answers
873 views

Magento 2.2.6 disk space utilization - /var/lib/mysql/ folder is taking 43 gb

Due to some reason my magento 2 website (Magento ver. 2.2.6) taking too much space from the server . Yesterday there is 1.2 gb available now only 240mb available . Please help on this . Please see ...
0
votes
2answers
10k views

Changing the display of custom product price to show 4 decimal places

My company is using an extension to create a custom product which is unique in that the pricing goes out 4 decimal places. There was a whole lot that went into this prior to me getting involved, but ...
39
votes
1answer
28k views

How do you override LESS in a custom theme?

I've spent the better part of this week trying to find a clear guide on how to properly create a custom theme and extend exist LESS/CSS without having to copy the entire magento-blank theme. The ...
28
votes
6answers
15k views

Certified Professional Developer Exam reading material

Recently Magento announced Certified Professional Developer exam for Magento2. After reading in this page https://u.Magento.com/magento-2-certified-professional-developer I have some questions ...
26
votes
3answers
9k views

How to fix warnings / errors raised by the Magento Marketplace technical review report?

With the new Magento Marketplace, a submitted extension goes through several validation states in order to be approved and available via the Marketplace. One of them is the technical review, from ...
19
votes
14answers
23k views

Magento2 : Change order of Tabs on Product Page

I'm trying to change the order of the tabs on the product page in Magento 2. Default is Details|More Information|Reviews. I tried: Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml <...
26
votes
4answers
5k views

Which compilation commands are needed in developer mode and when?

Can somebody give me instructions when to run which compilation commands in Magento 2 developer mode? I'm not sure if I understand it right yet. In the devdocs, developer mode is described as follows:...
18
votes
1answer
21k views

How to use extension_attributes in Magento2

Is there anyone that can give me an example on how to use extension_attributes in Magento2?
24
votes
11answers
29k views

Merged JS and CSS do not work when Production mode

I was in developer mode, everything was great, when I changed to Production mode, the Merged options of CSS and JS seem to be ignored, it was back listing all css and js. Also the product page only ...
13
votes
2answers
17k views

Magento 2 : Bestseller and most viewed product on homepage

How to get bestseller and most viewed product in homepage Magento 2? We have to display bestseller and most viewed product list in homepage slider in magento 2.
17
votes
6answers
59k views

Magento 2 - How to get attribute of product?

How to get attribute of product?
10
votes
7answers
12k views

Prevent Spam Account Registration

How to prevent spam account registration, aside from enabling CAPTCHA on forms (which I've already tried)? We're dealing with a steady flood of them. The first name field is always Russian characters,...
15
votes
6answers
14k views

Pop up minicart when I add a product to the cart magento 2

I'm using magento 2.0.7, and what I'm trying to do is to popup the cart(the top right cart ajax minicart) when I add a product to it, Basically trigger it. I have tried to add the "showcart" class to ...
15
votes
6answers
14k views

Magento 2 : How I can change the default font Icon in menu admin for custom module?

I need to add font icon in the admin menu. Like all the core magento 2 menus, by default it shows the hexagonal icon for custom module menu, how can I change it?
9
votes
2answers
14k views

Magento 2 - How to affect street address in checkout forms with layout xml/ui arguments

I'm trying to set a placeholder on street address fields on shipping address form in checkout. Followed this example: http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_form.html I've ...
13
votes
7answers
10k views

Magento 2 - discount depend on Payment Method does not work

I go to Magento 2 Admin > Marketing > Promotions > Cart Price Rules and create a new Rule: Bank Transfer Payment: Tab Rule Information: Rule Name: Bank Transfer Payment Status: Active Websites: Main ...
13
votes
8answers
11k views

Cannot process definition to array for type tinytext in Magento 2.3.0

I'm getting following error "Cannot process definition to array for type tinytext" on Magento 2.3.0 when executing php bin/magento setup:upgrade command. Thanks
12
votes
2answers
36k views

Magento 2: How to send data using Ajax form in custom form?

Can anyone explain me how I can create a simple form on Magento-2 page to send data using Ajax? I already have a form and controller action, that send data without using ajax.
9
votes
4answers
8k views

Disabling a UI component field upon condition in Magento 2

I have a UI component defining some fields. How do I disable the field upon a certain condition? In other words, use <item name="disabled" xsi:type="boolean">true</item> only when a ...
31
votes
10answers
57k views

How to delete and regenerate URL rewrites in Magento 2?

I have recently created 2 additional store view on magento 2 store. Now the url of category and Products are not for those stores is not proper Eg: http://example.com/catalog/category/view/s/pouches/...
28
votes
18answers
47k views

Magento 2 admin this webpage has a redirect loop

Magento 2 just released last night and I can't wait to work on it. I tried installing it with all prerequisites. Frontend works fine but when I tried to open backend it says "this webpage has a ...

1
3 4
5
6 7
96