Linked Questions

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,924
1 vote
1 answer
148 views

How can 'dirty playground' use for Order Shippment - Magento 2

I am using 'Dirty Playground' for external retrieve/update Magento products & order information. It's working fine. Now, I am trying to update shipment from the same concept, but not able to ...
Dev's user avatar
  • 369
1 vote
1 answer
961 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
1 vote
1 answer
5k views

Magento2 Getting cart content programatically outside of magento itself [duplicate]

I'm working on several cart displays and to do this i usually (in magento 1) make a small script outside of Magento load up the magento app and fetch a collection with the data. In magento2 this ...
Kay Int Veen's user avatar
  • 1,503
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
0 votes
1 answer
542 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
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
653 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
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
0 votes
1 answer
510 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
1 vote
0 answers
384 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
1 vote
0 answers
547 views

Magento 2 - mage.php equivalent [duplicate]

I am trying to figure out what the equivalent of the following piece of Magento 1 code would be in Magento 2. I am trying to include magento 2 into a external file as follows: Magento 1 Code: $...
Jiyaad.D's user avatar
  • 448
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
0 answers
315 views

Magento 2: cron not executing properly

I have created a custom module which will read order edi files and import orders in magento. To run this in scheduled basis, I have written cron for this job. <job name="import_order_edi" instance=...
Abhimanyu Singh's user avatar
0 votes
0 answers
184 views

how to create or call block programmatically in magento2 [duplicate]

i need to call top menu or header out ide the magento project in that case how to call it in magento2 in magento1.x we use <?php require_once(dirname(__FILE__).'/store/app/Mage.php'); $app = ...
Pradeep Kumar's user avatar

15 30 50 per page