cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an isolated php page with access to the product data?

SOLVED

How to create an isolated php page with access to the product data?

Hello,

to realise 2 topics (a zip download of all product images and other stuff and to modify a PDF printout) I need to understand how I can access the Magento2 product data on an isolated PHP page which is not embedded into the "normal" Magento2 structure. Files are located into the same root folder - but they don't exist in the backend as a page, block or widget.

 

My idea was to hand over the productId as a get parameter.

 

Is that possible - or is there any better way to realise this?

 

Thanks in advance.

Best regards

Mirko

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to create an isolated php page with access to the product data?

I found a good solution via the Magento webservice API.

That works very well for me.

View solution in original post

2 REPLIES 2

Re: How to create an isolated php page with access to the product data?

I would suggest implementing this via a Magento module rather than a standalone php script. You will very likely want to make sure that only you can access it, etc. 

 

This blog post by Alan Storm is a good introduction on how to create your first Hello World extension. 

Re: How to create an isolated php page with access to the product data?

I found a good solution via the Magento webservice API.

That works very well for me.