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
2 views

Remove Cart Items Automatically Magento 2

I'm having a trouble with my Magento 2 store. I need to clear all items of users carts programmatically. If user don't purchase his cart, it'll be cleaned. Do you have any idea of how can i do that? ...
0
votes
0answers
6 views

Magento 2 set order extension attributes via API

Is it possible to set an order's extension attribute value when creating the order via the API or is there an appropriate API endpoint to update an existing order with this information? For example ...
0
votes
0answers
6 views

Product image not displayed in magento 2

Uncaught SyntaxError: Unexpected token , in JSON
0
votes
1answer
9 views

After Upgrade from Magento 2.1.6 to Magneto 2.3.2 i get below error

After upgade Magento 2.1.6 to 2.3.2 i am try to run php bin/magento setup:upgrade it's give below error SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a ...
0
votes
1answer
12 views

Show product blocks based on product id

I am new to magento . I have some product id's . I have to list this product on my custom page . These products are selected from different categories . So i cant make these products in same ...
0
votes
1answer
9 views

Magento2 show label on product page if price is with or without tax

In the EU, you have go to label if a price is incl. or excl. tax in the shop frontend. If you run different shops where you have got both settings, it could be realized with different custom ...
0
votes
0answers
6 views

Free extension for online payment for SPS Tunisie

I have found this extension for Magento 1 https://github.com/sabrilime/SMT_magento but I want the same for Magento 2 any information about a free extension that adds a plugin to use this card will be ...
0
votes
0answers
8 views

Magento 2 - How to make a dynamic dropdown in custom checkout module

I have a custom module that uses most of the sample form in the Magento 2 docs for a static form - https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_form.html I need to have the select ...
1
vote
1answer
22 views

when i add new blog error occurs in magento 2

It displays below error when I add a new blog. I don't understand why it displays error. Previously add blog is working fine. There has been an error processing your request The file was not ...
0
votes
0answers
17 views

Magento 2.3 Configurable Assiged Simple Product 404

I'm using magento 2.3 version. I have configurable products an normal products. both are works fine but the simple products assigned to configurable products getting 404 errors. The configurable ...
0
votes
1answer
17 views

can't edit product in magento 2. redirect to 504 connection error

In magneto 2, after editing product its shows please wait loader and redirect to 504 connection timeout error.
0
votes
2answers
26 views

Magento 2 : How to get DefaultBillingAddress using knockout?

In core using KO address is get like this in details.html file <!-- ko text: currentBillingAddress().prefix --><!-- /ko --> <!-- ko text: currentBillingAddress().firstname -->&...
0
votes
0answers
18 views

how to keep the position same after back on listing page in magento 2?

If you go down in the product listing and then click a product and click the browser’s back, it jumps to the top of the product listing, instead of remembering the position. See pictures below.
0
votes
0answers
25 views

Best place for code that will be reused in module

I have searched high and low and can't really find a good answer on this. I would like to create a class that contains a method/function that I can easily reuse in controllers, blocks and etc instead ...
1
vote
2answers
17 views

Magento 2.3.X Custom Module JavaScript won't load with require.js

I am building a module, and the HTML loads fine, but the JS isn't. Here is what I have: Vendor Name: NewShop Module Name: HelloWorld File: app/code/NewShop/HelloWorld/view/frontend/requirejs-config....
1
vote
0answers
9 views

Product's Tax Class change to “None” on Reindex. Any ideas?

We've just migrated from Magento 1.9.2.2 to Magento 2.2.8. We noticed in the last couple days some orders are created without billing any tax. When We go check the product We notice the tax class is ...
0
votes
0answers
21 views

Ur Rewrite interesting problem Magento 2

I need to create URL rewrite for /vendor_module/product/test/id/666. In rewrite, I want to change id/666 to productTitle.html. But when I created it I faced an interesting problem: Magento sees "...
0
votes
1answer
23 views

Edit Action column is not showing in admin grid in magento 2

Why the edit option is not displaying in the action column. Kindly help me. My Action.php code: <?php namespace AdminGrid\Grid\Ui\Component\Listing\Grid\Column; use Magento\Framework\View\...
0
votes
0answers
10 views

how to override or normalize css in magento 2 as to mach the theme css class styles?

I have Magento 2 CSS file and theme CSS file normally the theme CSS will override the magento2 CSS file then I have added a bootstrap CSS CDN the problem is bootstrap CSS overriding and adding some ...
0
votes
1answer
14 views

Toggle show more btn is automatically close itself in magento 2 layered navigation

I tried this jqery code and try to put "li" instead of "a"...but sometimes button works with this error in console"Uncaught error jquery is not defined" but most of the times it's not working with no ...
0
votes
1answer
17 views

Magento 2: Problem updating Magneto v2.2.1 to v2.3.2

i want to update my Magento to v2.3.2, when i run composer update, i get this error: Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request ...
0
votes
1answer
20 views

Magento2: Create customers programmatically and associate to multiple websites

I have written a customer import which works just fine. Now the requirement has changed .. the Magento instance runs now multiple stores / websites and i need to change the customer import so that the ...
0
votes
0answers
7 views

Edit Ui Form with two table in Magento 2

Below is code For DataProvider in Edit form. Here it displays main tables data while i choose edit them. Can any one tell how to display data of another table <?php namespace My\Module\Model\...
0
votes
0answers
20 views

Hide Authorization Token from Request Headers in browser for headless magento 2

We are using reactJS as frontend for magento 2 website using magento 2 rest APIs. But the authorization token is visible in the browser dev tools posing security risk. Kindly suggest a way to hide ...
0
votes
0answers
16 views

Magento 2 Extension Manager stuck on “Please Wait”

In Magento 2 the Extension Manager page is stuck on "Please Wait". The following error displays in Console: Failed to load resource: the server responded with a status of 503 (Service ...
0
votes
0answers
13 views

How to show available payment method according to chosen country of shipping M2

I want to restrict visibility o payment method according to chosen country and I want to hide and show and not desactive method of payment according to weight. My problem is that when weight is less ...
1
vote
2answers
28 views

Magento 2.3 How to get Quote Data on product detail page

i want to get this quote data on product page but that not return any data ... only return below array instead of all quote data On other page it working fine issue only on product page. array(4) { ...
1
vote
0answers
19 views

Custom shipping rate logic

I have created a custom shipping method. I need to implement the following logic: Shipping rate = Item weight * Item quantity * Zone rate How to get zone rates in collectRates method?
0
votes
0answers
24 views

Stock level in configurable product dropdown

Can someone helpful think of a way to display the stock level of a configurable product variant in the dropdown list? i.e S... 9 in stock M...3 in stock L...2 in stock Thanks,
-1
votes
0answers
24 views

Undefined - Free Shipping error in Magento 2 [on hold]

I have setup the table rate shipping and I can see error as "undefined - Free Shipping" Can you help me to fix this error?
0
votes
2answers
33 views

SQL error when run command line upgrade Magento 2

When I run the following commmand: php bin/magento s:up; It throws the following error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'admin_magen34.mg7a_sm_products_filter' doesn't ...
0
votes
2answers
47 views

What event should I use for Customer delete observer in Magento 2.3?

I'm very new to Magento 2.3, so I can't find a list of all the events that are related to user accounts. I need to create observers for user deleted, user updated (any information in account) and user ...
1
vote
1answer
36 views

Magento2: How to add dependency in composer for private Gitlab modules?

I'm installing a custom module in M2 using composer from my private Gitlab repo and it is working fine. After I've added the dependency of other modules(using composer require) in my custom module ...
0
votes
0answers
23 views

Magento2: How to restrict zipcodes for particular category?

I want to restrict particular zipcodes for particular category after adding the product to cart in magento2
0
votes
1answer
34 views

Magento 2: How to change video to first position in product page

I'm looking for a solution to move the video to the first position in left gallery in product page WITHOUT changing from admin. I've set the video in 3rd position, but I want the video should in the ...
0
votes
1answer
22 views

FTP file manager Magento 2

And when frontend calls it, doesn't answer. Meaning a "css" or "js" 400 error. Magento works just fine, but it doesn't run commands like di:compile because it can't find them in the directories. And ...
0
votes
0answers
18 views

Bulk update product price and stock

In the Catalog > Products page you can go to Actions > Update Attributes at the top left and then bulk update product stock/quantity/etc. How can I do this using the Magento PHP PDO but in bulk like ...
1
vote
0answers
12 views

Ignore a product for shipping rate calculation

Is there some way to ignore a product price and weight for the shipping rate calculation? I´m working with the FedEx module and I don´t want FedEx to add extra shipping rate when certain products are ...
0
votes
1answer
17 views

stand up independent version of Magento 2

I'm an entry level web designer and my boss just asked me to research if it was possible to "stand up and independent version of Magento 2". I'm very new to CMS and have no clue where to start this ...
0
votes
0answers
16 views

Magento 2 fonts showing 404 for .woff/.woff2 when using the .ttf fonts

I am trying to add custom fonts to the theme and the .lib-font-face() mixin is throwing 404 errors for .woff and .woff2 when trying to use the .ttf fonts only. In _typography.less file, I have the ...
0
votes
0answers
14 views

Magento 2 - Using UI Component as input for widget

So far, in all the documentation and tutorials for UI Components that I've come across (Like the documentation here: https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html, or in ...
0
votes
0answers
15 views

Magento 2 - Website will get in cache loops and redirect to homepage (only at random times)

Our website runs into situations where it is working fine for days, but then customers will occasionally get into a situation where they are say trying to goto checkout, and instead of heading there, ...
0
votes
0answers
17 views

How to disable zoom product image when click in magento 2

How to disable zoom product image when click in Magento 2. I want disable zoom function. I tryed change this code in view.xml but it not working. My code change: <var name="gallery"> &...
0
votes
1answer
14 views

Static files not getting generated magento 2.3

I ran command php bin/magento setup:static-content:deploy -f and i am getting this error https://prnt.sc/ot0gpp Please help what to do, my static files are not getting generated because of which my ...
0
votes
0answers
23 views

Mass update doesnt work in Magento 2.3.2

I am using bulk action feature in admin, on catalog page when am trying to update attribute am getting below error Got error 'PHP message: PHP Fatal error: Uncaught Error: Cannot instantiate ...
0
votes
0answers
15 views

Make the same multiple tab work separately in form Magento 2

$fieldset->addField('media_gallery', 'note', [ 'label' => '', 'title' => __('Media Gallery'), 'name' => 'media_gallery', // '...
0
votes
0answers
12 views

How to serve static files via CDN in production mode for Magento 2.3.2

I have a fresh install of Magento 2.3.2 and I configured my CDN (Cloudfront) on /pub/static while I was in default mode. I have now switched to production mode and invalidated my CDN distributions. ...
0
votes
1answer
29 views

duplicated tab in form Magento 2

$fieldset->addField('media_gallery', 'note', [ 'label' => '', 'title' => __('Media Gallery'), 'name' => 'media_gallery', // '...
1
vote
1answer
29 views

Bulk update stock programmatically [duplicate]

I have 10 products; 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. I want to be able to bulk change 1, 3, 4, 5 and 9 to 0 quantity and out of stock and 2, 6, 7, 8 and 10 to 100 quantity and in stock. How can I do ...
0
votes
3answers
35 views

Magento 2 plugin for sending email when change customer's group

I created a Plugin for sending emails when the owner of the shop changes the customer's group in backend. I still need to add the group (discount) in the email. The problem is that when I access to a ...