Linked Questions

0 votes
2 answers
106 views

Magento 2.4.7 Bootstrap Script Error PHP Fatal error: Uncaught TypeError: Magento\ApplicationPerformanceMonitor

After upgrading from Magento Open Source 2.4.6 to 2.4.7 custom PHP scripts that Bootstrap Magento 2 are failing to run with the error PHP Fatal error: Uncaught TypeError: Magento\...
paj's user avatar
  • 5,914
0 votes
2 answers
894 views

Force start / add sales_clean_quotes to cron job list in Magento 2

We started to have some issues with our quotes not being cleaned correctly. I checked list of cron jobs and could not find sales_clean_quotes in the list. We are currently running Magento 2.3.3. How ...
Kalvin Klien's user avatar
0 votes
2 answers
24 views

magento2 build image updater service which run through all created products and add missing images to product

I have some products created, but they do not have images when i see them in frontend or backend. I have these missing images in one folder with the format of productSku.png. I want to build image ...
Sanaullah Ahmad's user avatar
1 vote
1 answer
68 views

Type Error occurred when creating object, attempting to use custom model from custom module

Yes I know, another "Type Error occurred when creating object" post... In addition, I'm probably going about this in a way that will make the seasoned M2 dev need a moment before reading ...
joeybab3's user avatar
  • 378
0 votes
1 answer
538 views

Load Magento objectmanager via a class

Having a bit of an issue with this one, I managed to get a working interface to Magento by including the following code, which in turn includes the Magento 2 bootstrap.php use Magento\Framework\App\...
Duncan Wardlaw's user avatar
0 votes
0 answers
39 views

How to update a cart after adding a product to the cart using an observer?

How to update a cart after adding a product to the cart using an observer ?
Robinio's user avatar
  • 771
0 votes
2 answers
2k views

How to call root file directly in magento2- i don't want to create class? [duplicate]

I have upload.php file in magento2 root folder. How can i access directly www.example.com/upload.php directly in magento2?
Rutvee Sojitra's user avatar
1 vote
2 answers
4k views

Magento 2 Database Connection And Getting Info

I am new to Magento 2, it is normal to use the usual way $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = mysqli_connect($servername, $username,...
Compu Scie's user avatar
0 votes
1 answer
522 views

Magento 2 Not able to override \Magento\Directory\Block\Data Class

I am trying to override Block \Magento\Directory\Block\Data with following method getCountryHtmlSelect() with following script, but it's not executing. di.xml <?xml version="1.0"?> <...
Ramesh's user avatar
  • 986
1 vote
0 answers
383 views

Magento 2: Add To Cart functionality from external site

I have my products in Magento db but I am borrowing the cart module from external site through an API. So basically when a customer clicks on "ADD TO CART" button, the product details are sent to the ...
rhldonly1's user avatar
0 votes
1 answer
650 views

Add Category tree, if not exists programmatically

Ive been through several answers before succumbing to ask a question. I will list what i tried and why i think this is a bit of a special case, and not a duplicate. Am reading a .csv file from my ...
hahaha's user avatar
  • 136
2 votes
4 answers
475 views

Create Dirty Playground In Magento 2.1.6

The method outlined here to create a dirty playground doesn't work in magento 2.1.6: https://magento.stackexchange.com/a/40848/55108 It generates the error: Uncaught TypeError: Argument 2 passed ...
Guerrilla's user avatar
  • 187
1 vote
1 answer
238 views

How to input and return data from bootstrap Magento 2 test.php script?

I need to pull product data out of Magento 2 via an external PHP command line script. I am using the example here: How can I bootstrap Magento 2 in a test.php script? In the run method, I extract my ...
paj's user avatar
  • 5,914
1 vote
2 answers
1k views

Get value from "core_config_data"

I'm trying to get value from the core_config_data table but when I follow various guides on the internet or previous topics here, it doesn't work.. Disclaimer: I'm new to PHP and Magento in general ...
troyan's user avatar
  • 23
0 votes
1 answer
2k views

How to create an independent script run on Magento 2? [duplicate]

I'd like to create a file in the root folder (e.g. test.php) that I'll be able to do functions programmatically like update product attributes or something like that. Can you show me some sample? ...
Rafael Corrêa Gomes's user avatar

15 30 50 per page