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
3 votes
1 answer
103 views

base table view not found

: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.users' doesn't exist in C:\xampp\htdocs\training\DB\loginn.php:19 Stack trace: #0 C:\xampp\htdocs\...
  • 410
1 vote
4 answers
340 views

Magento 2. Uncaught SyntaxError: Expected property name or '}' in JSON at position 1

I need help. In Chrome console I receive Error. I don't know where to look for the error and how to fix it. Uncaught SyntaxError: Expected property name or '}' in JSON at position 1 at JSON.parse (<...
  • 57
1 vote
1 answer
12 views

Admin site is not accessible from subsites

I have a magento multi site. We disable the default site and move the site and domain to another installation. Now the problem is that i cannot access admin from a sub site. What can be possible done ...
0 votes
0 answers
20 views

How to show product information in a costume module page like Magento product page built?

I would like to show a product with its details in my module view page. There is summery of my code, it maybe boring but I have exhibit my issue clearly. 1)File name, path and code: MyVendor/MyModule/...
-1 votes
1 answer
20 views

getting blank page after creating custom layout

I have created custom layout as below created 3-columns-double-footer.xml file inside Magento_Theme/page_layout folder <?xml version="1.0"?> <layout xmlns:xsi="http://www....
0 votes
0 answers
13 views

Edit title and meta title from any page in magento 2

I'm trying to edit the h1 title and the meta title from any page in Magento 2.4.4. But it's only working for the title because the head block is not found by my layout. Here is what I do <event ...
  • 1,024
0 votes
2 answers
30 views

Magento 2 - Products in category page not showing

My problem is that : all products in category page not showing. And when i displayed the query of $_productColection in Magento_Catalog/templates/product/list.phtml : /** * Product list template * *...
0 votes
3 answers
34 views

Magento 2.4.3-p3 Insert Image in CMS page - Media structure tree doesn't load

We have a strange issue with adding an image to a CMS page. When we click 'insert image' in the content of the CMS page, the 'Insert File' flyout doesn't load the Media Folders Structure. We just see ...
  • 33
0 votes
1 answer
54 views

Home Page content not showing in Magento 2.4.3-p1

I am using codazon theme for my Magento store. The home page content is not displaying. Previously it was working fine. Please suggest.
1 vote
6 answers
63 views

Revert admin user password

I am using Magento 2.4 community edition. Client has changed the admin user password and they forgot the new password so now they want to add the old password which was used earlier so how can i set?
  • 2,034
0 votes
1 answer
17 views

Price values are saving as zero in sales_order_item table in magento 2

In sales_order_item table price, original_price values are saving as zero, other values are saving correct only.what could be the reason for saving those values as zero. Thanks.
  • 131
0 votes
1 answer
29 views

How to give white space between currency and currency symbol Magento 2.4.3

Below Image does not have any space between currency and currency symbol. After did that step it look like my currency symbol changed in English word instead of Arabic
0 votes
0 answers
47 views

Magento 2 Mysql message queue not consuming the request

I am using Magento 2.4 cloud. I've created a mysql asynchronous queue for order processing by following the link below. https://erfanimani.com/using-magento-2-mysql-queue-for-order-post-processing ...
3 votes
2 answers
153 views

MAGENTO 2: PHP Parse error: syntax error, unexpected 'MageSuite' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) ... on line 7

I installed the module and after command bin/magento setup:di:compile I receive error: PHP Parse error: syntax error, unexpected 'MageSuite' (T_STRING), expecting function (T_FUNCTION) or const (...
  • 57
0 votes
1 answer
34 views

Remove trailing slashes from store URL's - Magento 2.4

We set the "Add Store Code to URLs" option to Yes, so now our store URL's looks like: https://www.example.com/en/ https://www.example.com/de/ https://www.example.com/fr/ And by default ...
  • 1,436
0 votes
3 answers
37 views

How to update Magento core which support different PHP versions and third party modules

Our website is on Magento 2.4.2 and it runs on PHP 7.4. We also have different third party modules running with older versions. Anyone please help how to update to Magento 2.4.5 p1 which supports PHP ...
  • 1
0 votes
1 answer
43 views

How to change the search engine via CLI to use OpenSearch?

I'm trying to install a store but I have an error related to the setup made with MySQL as the search engine, which isn't supported anymore. Your current search engine, 'MySQL', is not supported. You ...
0 votes
2 answers
25 views

How to show images in a horisontal scroll-bar

Can anyone point me in the right direction. How can I make the category image row on this page show the images as overflow-x: scroll show all images in the same size dev url: https://xxx.dev/lege/...
0 votes
1 answer
21 views

Magento2 product_options field into the sales_order_itmes table

Does anyone know why, sometimes, into the table sales_order_itmes, I see rows that has product_options fields like this: { "info_buyRequest": { "uenc": "...
  • 103
0 votes
1 answer
87 views

Declaration of Laminas\Stdlib\ArrayObject::offsetExists(Laminas\Stdlib\mixed $key) error after updating to 2.4.5-p1

After updating from Magento 2.4.4 running on PHP 7.4 to Magento 2.4.5-p1 running on PHP 8.1 I am getting this error: Declaration of Laminas\Stdlib\ArrayObject::offsetExists(Laminas\Stdlib\mixed $key) ...
0 votes
1 answer
21 views

Jquery files not getting loaded on frontend after upgrade

I have upgraded my site from 2.2.6 to 2.3.2. After the upgrade when i load the frontend, and open Network tab in inspect element, i see that only jquery.js file is being called, no other js files like ...
0 votes
2 answers
45 views

Magento 2.4.5 How to move additional information under short description

I am using Luma as base for custom template. I like to know how i can move additional information attribute from tabs to under short description of product page. I have created path for custom luma ...
  • 41
0 votes
1 answer
31 views

How to sort products according to category on the catalog page, and also show Category name?

So, I have 4 categories in magento store. Each category have two sub-categories, (Essential products, Additional products). I want to sort products according to those sub-categories, "Essential ...
  • 1
0 votes
1 answer
19 views

How or where do I change the decimal seperator in de admin html area?

Easy question: How or where do I change the decimal separator in de admin html area? Is it even possible? It is set to a dot. I want to change it to a comma so the below error message disappears. In ...
  • 1,392
0 votes
2 answers
34 views

Custom theme not getting generated after upgrade to magento 2.3.2

I have upgraded my site from 2.2.6 to 2.3.2 version. After upgrading through the composer command I run static-content:deploy command. I see that in pub/static my custom theme is not getting generated....
0 votes
2 answers
21 views

ScandiPWA + Session Issue with Safari

I have problem with customer session with ScandiPWA on Safari Browser (Desktop + iPhone) After log into account in Safari Browser i get redirect to My Account. I get a immediately exception that The ...
0 votes
1 answer
48 views

Smile Elasticsuite error after upgrade to magento 2.3.2

I have upgraded my site from 2.2.6 to 2.3.2. After upgrade when i access admin panel i am getting error 1 exception(s): Exception #0 (OutOfRangeException): Specified invalid parent id (...
0 votes
1 answer
18 views

Magento 2 : How To Get Configurable Product's Child Product Id Using Text-Swatch-option?

I want to get the product id on selecting the text-swatch option. for that, I have used the code given below. I am getting the error of "Cannot read properties of undefined (reading 'options')&...
0 votes
0 answers
21 views

How to fix a database timeout when deleting a source item through the REST API?

I have Magento 2.4.1 with MariaDB and a catalogue of 370,000 products. I’m trying to delete source items through the REST API. It used to work well in the past, but today I can’t get it to work. Even ...
  • 123
0 votes
0 answers
19 views

Custom indexer for modified product in magento 2

I am try to create custom indexer in Magento 2.4. Which we will execute when any product is modified like catalog_product_category. Because i want to update the product attribute at that time. indexer....
  • 2,034
0 votes
1 answer
24 views

How to generate admin token after enabling 2FA?

Since I enabled 2FactorAuthentication my admin token API isn't working anymore. My request is: POST: {{magento_url}}V1/integration/admin/token Body: { "username":"{{admin_user}}&...
0 votes
1 answer
12 views

The store that was requested wasn't found during a clean setup

During my store setup, I received this error message below. The store that was requested wasn't found. Verify the store and try again. Why is it happening since the database is empty?
0 votes
1 answer
47 views

Adding an Extension Attribute to Sales Order Items - Magento 2

I have created some custom attributes for products and using these attributes in order view in customer account orders section. I have deleted few products. When I view the customer orders, it gives ...
0 votes
0 answers
28 views

Magento2 Item order refund programmatically

I'm using Magento 2.4.4 and I would like to understand if this code is correct about the automatic online item refund. private function createCreditMemoByRma($rma, $order) { $totalQty = 0; $...
  • 103
1 vote
2 answers
50 views

Magento 2 : Run Dependency using Contoller and helper

Helper :- <?php namespace Mageplaza\HelloWorld\Helper; use \Magento\Framework\App\Helper\AbstractHelper; class Data extends AbstractHelper { public function getStoreConfig() { ...
  • 11
0 votes
1 answer
22 views

How to get the locale of the order's store?

I have an order model. How can I get the locale from the store view where the order was created in? Edit On some tutorials I found something like /** @var \Magento\Sales\Model\Order $order */ $order-&...
  • 127
0 votes
1 answer
30 views

Magento 2 - Request sample for carts/mine (GET)

I try to call the carts/mine GET route of the Magento 2 REST API, but it does not show a request sample in the documentation. It says "Returns information for the cart for a specified customer.&...
  • 2,903
0 votes
1 answer
24 views

Google enhanced conversions

is there a way without setting up a Magento 2 extension, Google enhanced conversions and Google Tag Manager. Google Tag Manager, got set up but I don't know exactly how to set it up in magento!
0 votes
0 answers
14 views

Magento 2 add to cart a product with customisable option and calcualted value using REST

When i am working on Magento 2.3 REST api for add to cart a product with customizable options of checkbox and its value is x% of product price. Below is the images for website admin and front-end that ...
0 votes
0 answers
15 views

order_items table contains simple item without prices

I noticed a strange behaviour and I'm not able to understand if this is correct or not. First of all I would like to specify that I'm not a Magento expert. I started with Magento just now. On a ...
  • 103
0 votes
0 answers
18 views

Products are not displaying

I'm not sure what is going on. I can add a product on a fresh install and the product page is empty. Now if I do a search the product will display and you can place it in the cart. In the product page ...
0 votes
0 answers
9 views

Adding TinyMce EDitor in Magento 2 through Phtmls

<script type="text/javascript"> require([ 'jquery', 'mage/adminhtml/events', 'mage/adminhtml/wysiwyg/tiny_mce/setup' ], function (...
  • 3
0 votes
0 answers
12 views

Quick search can't receive products by attribute options name. Magento 2

this is a config attribute, i added yes in search of usage, also i do indexing and clearing the cache, but search can't return product by attribute option name, who can can say what the problem ? ...
0 votes
0 answers
66 views

Magento 2. Patch, How to revert the schema when we Uninstall the module?

I have created a patch in the "Vendor/Module/Setup/Patch/Schema" path We have to use two things : 1st is to update the existing table schema from apply function And 2nd schema once the ...
0 votes
0 answers
26 views

Not adding separately Magento 2 : Adding multiple configurable product variations in cart

I'm trying to add multiple variations of a configurable product to the cart at once, like if a product has 3 colors red, white, and black then the customer can add each size variation qty and click a ...
0 votes
1 answer
14 views

How to fix no product found error by wrong index command in Magento 2?

I was trying to update index via ubuntu command line, instead of php bin/magento indexer:reindex i have typed /usr/bin/php7.3 php bin/magento indexer:reindex After that none of the products visible in ...
  • 11
0 votes
0 answers
10 views

Display subcategories in left sidebar of a category?

Magento 2.4 I am trying to display the subcategories of a given category. I tried with https://github.com/groomershop/magento2-category-sidebar, but it just shown nothing. Is it not possible to do ...
0 votes
0 answers
63 views

Could not validate a connection to Elasticsearch in magento 2

I am using Magento 2.4.5 and migrate to ubuntu 20.0.4 server. Installed elastic search but whenever run the command "php bin/magento setup:upgrade" getting following error Could not validate ...
  • 75
0 votes
0 answers
20 views

Save an Order custom attribute to Invoice, Shipment, and Credit Memo tables

I have a custom attribute saved to the sales_order table, and need them mapped to each of the Invoice/Shipment/CreditMemo tables, and also exposing them to the Rest API. I have this working for Sales ...
0 votes
0 answers
11 views

how to send instant newsletter queue in magento 2?

I using magento 2.4 I try to create Newsletter Templates -> New Template -> Action-> Queue Newsletter

1
3 4
5
6 7
942