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
0answers
13 views

Ajax based cart update Magento 2

I have implemented the ajax cart update following this. But the issue is when I enter the max qty for a product it does not shows any error. (which is Magento default behavior, should show a popup)....
0
votes
0answers
10 views

Filter products based on location

I have a Magento2 Store where I have multiple location. for (eg. Jaipur, Delhi, Mumbai etc). I want to show products based on location. (Product A is available for one location only, Product B ...
0
votes
2answers
30 views

How to get date of tomorrow in magento2

How can I get date of tomorrow in Magento2? I can use below code to get current date but I couldn't fetch the date of tomorrow. // $this->datetime \Magento\Framework\Stdlib\DateTime\DateTime $...
0
votes
0answers
6 views

Sort products with most quantity first on product list page in Magento 2

I want to sort products with quantity in a way items with most quantity should be shown first and items with smaller quantity should be shown later. here is a similar solution but it is for Magento 1. ...
0
votes
0answers
20 views

How can i pass an object with it's value using DI?

I'm still new at Magento and im trying to work on something where I need to pass the product SKU from a file that has a function that retrieves the product SKU to another file with no such function, ...
0
votes
1answer
13 views

How to Implement Rest API Magento 2 for Mobile App

I read online tutorials for mobile app development.My question is this how I can implement those API in mobile which I will share with app developer.Does I need to add API in module and share module ...
0
votes
0answers
4 views

How do I add a custom customer attribute to Order REST API?

I have a custom customer attribute which needs to be shown upon requesting the order via the REST API. How do I do this?
0
votes
0answers
8 views

Magento Checkout Page Performance

I was going through perfomance improvement in magento 2 checkout page and I found in view source country Id with huge country list irrespective of your admin configuration Allowed country list the ...
0
votes
0answers
39 views

How to Add to cart all product in magento 2

I added a button ("Add all product") on the header. How can I add all products to the cart by clicking on. Someone can help me to solve this problem. Thank you
0
votes
1answer
17 views

How to set search page as home page

I would like to set search page /catalogsearch/result/AVMP as the home page. Anyone have any idea?
0
votes
0answers
22 views

The block is not displaying after loading the page

Please help solve this puzzle. I'm created after plugin, after load category widget. The collection of items must be used in the js. The idea is to simply intercept the collection in the plugin, load ...
0
votes
0answers
17 views

what is the correct way to modify 3rd party module?

I have a 3rd party module installed in my magento. I want to do some modification. I should modify the module directly or write another module to override it? Please advise
0
votes
1answer
14 views

How can I know from which file the table error is coming for?

I updated some modules and went up this "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_prod.amazon_nding_authorization' doesn't exist, query was: DESCRIBE ...
0
votes
0answers
12 views

how to pass multiple values to fieldtofilter

I am passing attribute color value in URL as rest/V1/filterattribute/81?color=32,5. By using getparams $bodyParams = $this->request->getParams(); foreach($bodyParams as $key=>$value) { $this->...
0
votes
1answer
14 views

Magento 2 Pass array data to Custom Email template

I'm a beginner in magento and I have a custom email template as follows wishlist_email_template.html {{template config_path="design/email/header_template"}} <table cellspacing="0&...
0
votes
1answer
22 views

How do I get the language code in the product price amount template file?

How can I get the current language code in Magento_Catalog::product/price/amount/default.phtml?
0
votes
0answers
7 views

How to create sitemap exclude in magento 2?

I need to create a custom module that allows excluding/skipping the Products, Categories and CMS Pages URLs from generating in sitemap.xml. How could I do it in Magento 2?
0
votes
0answers
15 views

How do I change the totals (price, tax, shipping) in an order email?

I want to remove the unnecessary totals in my emails such as "Grand total excl. Tax", "Tax" etc. Where can I find the file where I can change this? Thanks in advance. This is what ...
1
vote
0answers
8 views

Steps to install magento 2 on vagrant box

Steps to install magento 2 on vagrant box How to setup magento 2 on vagrant box ? what are the minimum requirements to make it run at better then basic pace ?
0
votes
1answer
16 views

How to Recieve array in request in Custom REST API in Magento 2

I am working on a custom API in which user will pass the request like below in JSON. { "cartItem": [ { "sku": "11223344", "qty": 1 }, { "sku": "...
0
votes
0answers
8 views

i want to show alert if not select any of two options in magento 2 under specfic shipping mathod

i want to show alert if not select any of two options in magento 2
0
votes
1answer
15 views

Magento 2 - Delete/update all products attribute values by attribute_code

In Magento 2, How to do a mass deletion of all products attribute values, by attribute_code. For exemple I want to delete all values for attribute_code = "my_code". EDIT I also want to ...
0
votes
1answer
13 views

Ajax tabs for configurable product with description of child products

I need to create custom tab in configurable product that will check is there a description in child product that is selected now and load description of child product. So for example in configurable ...
0
votes
1answer
18 views

How to add a custom block in the sales_order_shipment_view page in backend M2?

How to add a custom block in the sales_order_shipment_view page in backend M2? I have to override the sales_order_shipment_view.xml file in my module then I have added the below code for the override ...
0
votes
0answers
4 views

Elasticsearch error - Undefined index | Trying to access array offset on value of type null

So when im trying to reindex my products im getting these errors. Undefined index: prices_0 in../app/code/Wyomind/ElasticsearchCore/Model/Indexer/Product.php on line 938 Trying to access array offset ...
0
votes
1answer
16 views

How to get associated product Id's from grouped product Id?

I try many solutions but i can't get the result please help me for getting associated products from grouped productId like for configurable product we use $parent_pro = $objectManager->create('...
0
votes
0answers
30 views

custom product tab not displayed in Magento 2 enterprise edition

I have created a custom tab in product detail page used the following code in layout file Vendor/Module/view/frontend/layout/catalog_product_view.xml <referenceBlock name="product.info.details&...
0
votes
0answers
7 views

getting error of 400 on creating shipment for an order magento 2.3.1p

showing error while sending this request [URL=https://.in/rest/V1 /order/330/ship, METHOD=POST, HEADERS={Authorization=Bearer *******************, Host=.in, Accept=application/json, Content-Type=...
0
votes
0answers
4 views

Magento 2 PWA Venia No definition MAGENTO_BACKEND_URL error

I install venia store and upward and all then start yarn build and all things looks good but when i try access website i get {"error":"No definition for env.MAGENTO_BACKEND_URL"}, ...
0
votes
0answers
10 views

How To Remove Select From Select Language from google translate in magento 2?

i used google translate for change the web site language in that how can remove the select text from select language full text
0
votes
0answers
6 views

Magento2 : Create custom REST POST api with raw data as application/xml

I need to create a custom REST POST API which will accept XML as like below XML, and we need to read those XML tags. <?xml version="1.0"?> <testparams>TEST</testparams>
1
vote
0answers
22 views

Magento:success page order details issue in magento 2?

When i go through cash on delivery process then success page get all order details on success page But when i go through paytm or other payment getway through its show error Is there any solution for ...
0
votes
0answers
6 views

Magento 2: Create REST POST webapi to read uploaded xml

I need quick help related to creating a POST web API which will accept XML(Multipart/form-data) and read the uploaded XML.
0
votes
0answers
10 views

Set exiting Coupon code In magento 2

I am using magento 2.3.4, i am trying to set exiting coupon code programatically by event/observer. $quotecoupon = $quote->setCouponCode($couponCode); Coupon code set successfully but now not able ...
0
votes
0answers
7 views

X-Frame-Options SAMEORIGIN not working after upgrade to 2.4.1

I just upgraded from 2.3.4 to 2.4.1 , before there is no issue when load content using iframe, but now there is always an error message: Refused to display 'http://test.m2.local/test/index/test/' in ...
0
votes
0answers
16 views

Magento 2 Ajax form key invalid request

I'm trying to send a form from a modal and also an image from that form. the form_data works fine with only serialize(), but I need to attach the image to data, so I did this: click: function (data)...
0
votes
0answers
5 views

I can't find the option to give X% off shipping costs in Magento 2

any way to give x% off shipping costs in Magento 2. its work fine in magento , but i cant find way to set this type of promo rule in Magento 2.
0
votes
0answers
5 views

Create fabric product which has meter as unit with default length

Want to create a fabric type of product which has Meter/Centi meter as selling unit in Magento 2. I'm following this Question Can you sell product (fabric) by the metre in Magento?, we can use decimal ...
0
votes
0answers
5 views

Customer Now Online show all customer even their last login was 6 months ago

Why my 'Customers Now Online' page show all customer even their last session was on 6 month ago? Please suggest.
0
votes
0answers
7 views

Magento 2 error: lock wait timeout exceeded. query was: update session set session expired =?

Some of my customers get this error randomly. And there are sleep query commands in mysql with no info. How can I solve this?
0
votes
2answers
21 views

Run Magento 2 On low end system resources,

I saw a system with below configuration :- dual core processor 8 gb ddr3 Ram 240 gb SSD windows 10 I've tried to run Magento 2 in it using Bitnami stack, but its very slow. Is their any other way or ...
0
votes
0answers
11 views

Magento 2: Issue with elastic search layered navigation

I use custom template SM Market. It's about a search engine. Works fine on Luma. But in my custom theme, Instant Search is not working. The module does not seem to know to use the search engine from ...
0
votes
1answer
22 views

How to override module-catalog/Block/Widget/Link.php in magento 2

I need to change functionality of getHref() method. So I Created several below files in my code folder. 1.<vendor>\Catalog\Block\Widget\Link\Link.php <?php namespace Tea\Catalog\Block\Widget; ...
0
votes
1answer
31 views

How to display total qty product in list.pthml

Under product name, I need to display total stock quantity of product. I have used below code: <?php $_productNameStripped = $block->stripTags($_product->...
0
votes
0answers
8 views

How to update the “Total Items Quantity” count in the checkout sidebar when updating the mini cart from checkout page in Magento 2?

I am using Magento version 2.3.5. Here, you can see that my minicart contains qty 3 but my checkout cart summary shows the wrong quantity as 2. This is what happens when I update the qty via minicart ...
0
votes
1answer
14 views

How to remove the cancel button from the billing address edit form?

As per the title, how do I remove the cancel button from the billing address edit form ? The button is highlighted on the screenshot attached bellow.
0
votes
0answers
20 views

Three is not defined in Magento 2

new THREE.WEBGLRENDER Three is not defined when i'm using it in Magento 2 with requirejs . THREERENDERER = new THREE.WebGLRenderer({ context: spec.GL, canvas: spec.canvasElement });</quo you can ...
0
votes
0answers
16 views

Translate line tool some words I can't translate

I'm using the translate line tool it's working fine but there are some words that I can't translate. Where the translate line tool save the words? most words I can't translate are javascript/jquery ...
0
votes
0answers
9 views

Cannot save shipment Magento 2 Error

I have multiple website and multiple store Magento 2.3 based website but recently i can't save shipment if i try i get error like this "Cannot save shipment" can u please any one help me ?
0
votes
0answers
18 views

Elastic Search (v7) changing Magento default product sort position in categories

We have installed Elastic Search 7 on a server running a Magento 2.3.5-p1 store and we can test it is successful (both in Magento 2 backend and on CLI) but when it is enabled, it changes the default ...

1
2 3 4 5
843