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.

20,184 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
6k views

Magento 2 How to do export products csv & xml from admin end?

I would like to implement export catalog products functionality from admin end from custom module. I have followed below steps for displaying export button at admin end catalog > products but unable ...
5
votes
0answers
263 views

How to get Current Currency SIGN in UI component field

I have created a Custom Module using the UI Component on Admin Side. Now i Need to show a Current Currency Sign in this field. SS:
5
votes
0answers
408 views

Best Redis maxmemory configuration for Magento 2

Right now i'm using Redis as my Magento 2 full page cache and session cache, but sometime this cause my website to get out of memory error, i've fixed the memory_limit for the php and i found out my ...
5
votes
1answer
2k views

My Search result not showing relevance products properly Magento 2

When I search for any string, the relevant search results not working properly. Can you guys please look into the attached image? I have enabled name and SKU for the search. To reproduce this issue I ...
5
votes
0answers
359 views

Magento2 API Product Repository API "saveOptions": true

In magento2 - I am not able to find anything on the internet that explains what magento2 api "saveOptions": true is good for.
5
votes
1answer
365 views

magento2 add credit memo for invoice with items

I am trying to add partial credit memo programatically but it is consuming whole quantity in first credit memo, How can I pass specific items to credit memo? public function createCreditMemo ($...
5
votes
1answer
236 views

How to Add customized error message in magento 2 admin form

<item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">My Custom Filed</item> <item name="dataType" xsi:type="string">text</item&...
5
votes
1answer
1k views

Injecting and calling custom knockout component in another component

I am using 2 components for multi-select and select input fields. Multiselect component - define([ 'underscore', 'uiRegistry', 'Magento_Ui/js/form/element/multiselect', 'Magento_Ui/...
5
votes
0answers
88 views

StoreRepository get($code) which does not exists

Till today all the code was okay, but after code review, I got that we use the method load() on the store itself so I replaced it with storeRepository->get($code) Code what I'm talking about ...
5
votes
1answer
544 views

How can i change order position of swatch in ascending Magento2

I want to change the sort order of size swatches. I have already put it in sort order from admin but I could not see any result in the front side. Actual Result Expected Result How can I sort it as ...
5
votes
0answers
135 views

Magento 2 icon font position problem (navigation menu)

Magento2 - I am trying to put some icons in my navigation menu, I want them to be on top of the subcategory name but this is what I have until now: This is my code for the first item, I have it in >...
5
votes
0answers
730 views

Undefined index: websites in ..module-config/App/Config/Type/System.php

After trying to update from 2.2.5 to 2.2.6 I ran into an error message that it could not write to one of my files and thus needing to do a rollback on some of my backups. For some reason, I cannot ...
5
votes
1answer
171 views

Problem with CLI

Hello i have an error of every command i press in CLI. Following this Error Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /var/...
5
votes
1answer
836 views

Magento 2, Unable to save products (Catalog rule indexing failed. See details in exception log.)

I receive the error "Catalog rule indexing failed. See details in exception log." when I try to save a product, and get the error below in the exception log. [2018-08-26 05:09:05] main.CRITICAL: ...
5
votes
0answers
444 views

Magento 2 : Display Loader While Ajax call on Column row action?

Grid xml column: <column name="actions" class="My\Test\Ui\Component\Listing\Columns\Feeds\AdvancedActions> <argument name="data" xsi:type="array> ...
5
votes
0answers
149 views

How to configure MFTF in Jenkins

In magento2 - Is it possible to configure continuous integration like Jenkins with Magento Functional Test Framework ? We are using bitbucket for our private repositories and Allure for reporting. ...
5
votes
0answers
410 views

Please specify product option(s) when selected this bundled product from admin panel

Why this error occurs in Magento 2 " Please specify product option(s). " I selected this bundled product from admin panel already anybody can help me out thank you
5
votes
0answers
353 views

Magento 2 Content Staging Dashboard

I am using Magento 2.2.3. As you know we can see the promotion rules status at Content -> Dashboard. But when I delete some promotion rules it is still showing in the dashboard. I have cleared the ...
5
votes
0answers
1k views

How can I pass a URL parameter to admin grid data provider?

I have a custom admin grid, which lists only the orders that contain the product given as a URL parameter. My URL is of form https://www.example.com/admin/mymodule/orders/index/product_id/123/ I ...
5
votes
1answer
315 views

Magento2 : How to set filter for an insert listing component while loading edit view form

I want to display all contacts of a supplier on the supplier edit page. For this, I use an insert listing component and I include the contact grid in a field set. How can I use the supplier_id to ...
5
votes
3answers
3k views

$block->getViewModel() returning NULL

I am overriding the layout and adding ViewModel in that layout but when I try to fetch the ViewModel getting below error PHP Fatal error: Uncaught Error: Call to a member function getCodes() on ...
5
votes
0answers
1k views

How to create admin user for specific store in magento2?

I have a multi-store website which runs over different domains. I have also a multi-admin user. Now I need to set them for specific stores. Basically I need admin user who can access data of only of ...
5
votes
0answers
640 views

Magento2 - Sale order grid column "Grand Total (Base)","Grand Total (Purchased)" display default website currency not store or website currency

I have a multi website store. Each website i have added a base currency and set display currency(both are same). But in the backend sales order grid view for all the orders "Grand total(base)" and "...
5
votes
1answer
907 views

Load Page Without Cache, Without Flushing The Cache in Magento 2

I am just curious to know if we can execute the page without cache, without flushing the actual cache like other framework do eg : in Symfony if we add /app_dev.php in URL, it load the respective ...
5
votes
0answers
705 views

Multi-shipping depending on specific product attribute

I have been struggling hard from a few days to find out a way for multi shipping of products depending on product type (type is not magento's type where as it is custom attribute i.e type can be ...
5
votes
1answer
1k views

Magento 2 : How to Set custom Discount from controller?

I am developing module which set discount to total , Whenever customer will press Get Discount. I can able to reduce Subtotal and GrandTotal in customer quote, Also my quote table is getting updated. ...
5
votes
0answers
273 views

How to migrate WooCommerce to Magento 2?

I would like to migrate all data as possible to my Magento 2, I wish a module, code snippet or step-by-step tutorial. It will be very useful, thank you!
5
votes
1answer
3k views

Magento 2 - Unable to resolve the source file for image

I have created an image and have uploaded this to my theme/web/images folder. I have then ran the following: php bin/magento setup:static-content:deploy However I cannot get the image to show on ...
5
votes
0answers
1k views

Magento 2 -Override tax functionality to calculate tax on cost instead of price

I have checked below mentioned files to override tax functionality: \vendor\magento\module-tax\Model\Sales\Total\Quote\Tax.php \vendor\magento\module-tax\Model\Sales\Total\Quote\CommonTaxCollector....
5
votes
1answer
196 views

In Magento 2, what is the best practice for loading some CSS for a custom widget, so that the stylesheet only loads when the widget is present?

I have created a Magento 2 widget that displays a list of categories, similar to the one shown in this guide. The widget outputs the correct HTML, so now I need to add some styling to it to make it ...
5
votes
0answers
2k views

Magento 2.2 sidebar and additional sidebar issue

My Magento installation behaves weird. Sidebar main and sidebar additional do not display on the same level as column main as it should but Magento layout engine moves them under the column main. I ...
5
votes
1answer
1k views

Pass data to child template in cart-items of checkout page

My site is a market place site where vendors(sellers can sell their product). Now i want to customize the to group items in cart by each vendor like this: http://prntscr.com/hmsam6 ...
5
votes
1answer
1k views

how to display different description for each virtual product which was create with configurable products?

In Magento 2 , when we create configurable product its child product also created, we can provide different description for child products too. > 1. How to access description of each child product ...
5
votes
2answers
3k views

Magento 2 Ajax pagination for grid on front end

On custom tab of product detail page on front end i have added a table and used Pager for pagination. Magento\Theme\Block\Html\Pager But this reloads the entire page when pagination is used. I don'...
5
votes
0answers
534 views

Magento 2 - Product options drop-down empty on front-end

We are doing a mass product integration. For configurable products we are getting an issue where options are not appearing within the drop-down like so: I've narrowed it down to the following method: ...
5
votes
2answers
2k views

Magento 2 Catalog Search with Hyphen

All my skus have the following format: XY-NAME-NUMBER, e.g BC-FLUID-0003. Now when I try to search that sku via catalog search in the frontend, I get all kinds of results, much more than I'd like to ...
5
votes
0answers
596 views

Magento 2: How to override cacheable="false" in layout in your own theme

We use a third party extension wich lets us add bundles with specific discounts to product pages. The problem is that they added a default.xml with the following code: <block class="Magedelight\...
5
votes
1answer
3k views

Magento 2.2.0 - Upgrade / Migrate from Magento 2.1.9 to Magento 2.2.0 with Sample Data

Followed below commands to upgrade Magento 2.1.9 to 2.2.0 using terminal 1. composer require magento/product-community-edition 2.2.0 --no-update 2. composer require \ magento/module-bundle-...
5
votes
0answers
1k views

How to show a category to a specific customer group magento 2?

Hi my question is how to show particular category products to particular customer group or Business customers. Actually I want to show additional products to only business customer when he gets logged ...
5
votes
1answer
512 views

Flat rate still showing after disabled

Magento 2.1.4 : Disabled flat rate via store > configuration > sales > shipping method like this: I have already deleted the cache, upgrade, static content deploy but it keeps showing the flat rate ...
5
votes
5answers
5k views

How to save custom data in quote item and sales order item table?

I have created custom field i.e details field in quote_item and sales_order_item table. Now I want to store custom field data in details field. How to do that?
5
votes
0answers
224 views

How to get custom table values into front-end checkout address section in Magento 2

For custom requirement, we are saving few values in our custom table with customer id and address id. We are trying to display those values in the checkout page address section based customer,address ...
5
votes
2answers
2k views

Magento2: How to add separate css file on each cms page?

Is it possible to add individual CSS file on each cms page? Upon researching, I can do it by adding code on Layout update XML. Unfortunately, it isn't working. Here's my code: <head> <...
5
votes
0answers
830 views

Magento 2 : How can I add discount to a custom option

I have a product with custom options and a catalog price rule (that applies to a certain customer group). When your in this customer group (group X), you get a discount of 15%. This works for the ...
5
votes
0answers
2k views

Magento2: Adding custom fields on checkout are not associated with the form

I'm trying to add some custom fields on the checkout. I looked around the internet and always I found an example adding some information on shipping address. But what I want is a fieldset independent ...
5
votes
0answers
178 views

Add product stock information to product repository

When working with the ProductRepository in Magento 2 and the results of the getList method what is the "best" way to add extra information to the results? For example in the default 2.1.7 setup you ...
5
votes
2answers
3k views

Programmatically update name of category in specific store

I have a magento 2 multi store setup (e.g. stores with the id 1 - 3) and I want to update the name of the category with the entity_id 3. I've tried $cat = $this->_categoryRepository->get(3, 3);...
5
votes
3answers
6k views

How to get item id from quote item collection in Magento 2?

I am trying to get all item ids currently added in cart. Here is what I have done so far. public function __construct( \Magento\Checkout\Model\Cart $cart ) { $this->_cart = $cart; } ...
5
votes
0answers
319 views

what populates data in cataloginventory_stock_status table and from which table

In magento2 - 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 ...
5
votes
2answers
1k views

Cron error extension - Magento2

I have an error while trying to install Magento extension. The Error: Error from Setup Application Cron Script: Cron job has not been configured yet Other checks will fail as a result (PHP ...