Linked Questions

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
1 vote
2 answers
3k views

Magento 2 not able to save order data in custom table using observer.php with sales_order_place_after

I am trying to save order details in a custom table with sales_order_place_after observer, but its not working. public function execute(\Magento\Framework\Event\Observer $observer) { ...
Ramesh's user avatar
  • 986
1 vote
2 answers
3k views

How to safly upgrade Magento version 1.7 to Magento 2.0

We are planning to upgrade Magento version 1.7 to 2.0, As we have a very custom build Magento 1.7 version. We have developed many custom scripts and many plugins for our store. We have a large ...
Rahul's user avatar
  • 199
0 votes
2 answers
2k views

How Magento 2 converts the namespace path to actual file path?

I know in Magento 2.x versions the namespace is converted to actual file path to load classes runtime. For example, \Magento\Catalog\Model\Product is converted to path\to\webroot\magentorootdir\...
Vicky Dev's user avatar
  • 1,992
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
1 vote
1 answer
960 views

How to create image using Base64EncodedData in magento 2

I want to create images using Base64EncodedData in Magento 2.
Pavan U's user avatar
  • 51
0 votes
2 answers
875 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
1 vote
2 answers
1k views

Magento 2: Calling Custom File on Root Gives RuntimeException

I'm calling Magento 2 Outside Magento using below ones How can I bootstrap Magento 2 in a test.php script? My URL abc.com/test.php in 'test.php` it contains code. It gives below error Fatal error: ...
Jackson's user avatar
  • 9,929
2 votes
1 answer
847 views

Use Magento 2 Web API to pull product data

I'd like to be able to recreate sections of my magento site outside of the magento root folder. I have a Wordpress based site, and I'd like to have template files in the Wordpress theme be able to ...
mike-source's user avatar
0 votes
1 answer
509 views

how can I create my “dirty playground” file for admin area in Magento 2

with the help of How can I bootstrap Magento 2 in a test.php script? i created files its working fine, but when i try to access admin code it through error "Area code is not Set" <?php require ...
Pradeep Kumar'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
0 votes
1 answer
646 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
474 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
0 votes
1 answer
531 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
1 vote
1 answer
354 views

follow-up question to "dirty playground" file in Magento 2

Based on this answer to a very similar question: How can I bootstrap Magento 2 in a test.php script?, specifically https://magento.stackexchange.com/a/76382, when I run php abstract.php, I get the ...
user36618's user avatar

15 30 50 per page