2

I have a Magento site up and running and a client that would like to embed some of my products, or a whole product category, on his own site.

Ideally he is looking to add some sort of iframe to his site that displays the products and allows users to check out at the end...

Is this possible or are there any extensions for it?

  • I am assuming the site would not be on the same server? – brentwpeterson Jul 29 '14 at 13:26
1

The answer will vary depending on many factors between your Magento site and "Site B".

Magento provides API support so that Site B can use whatever architecture it needs to access the data. To enable this, you set up access under SYSTEM >>> WEB SERVICES in the admin area.

The solution itself would probably be up to your client and their developers. Send them the above link to the API and they should be able to figure it out.

0

It is possible to do it. Check this guide to start. Example:

<?php

require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

// Now you can run ANY Magento code you want

// Change 12 to the ID of the product you want to load
$_product = Mage::getModel('catalog/product')->load(12);

echo $_product->getName();
  • While this works for doing stuff when you can trust the code, I would not suggest doing this for a client's website. – pspahn Jul 29 '14 at 14:02
  • Do I have to do anything for the Mage.php to be 'enabled'? Using the example code above I just get a blank page so I seem to be hitting a valid file/url but nothing happens... – Leo Dee Jul 29 '14 at 15:04
  • No, you should use the correct path to the app/Mage.php file. Set PHP to show all errors and you will have more info. – mbalparda Jul 29 '14 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.