360 view in magento

As much as we love Magento as a great ecommerce platform, one of the basic functions that we would love to see implemented is 360 product photography. We have been watching for years that online stores want the technology, but they are not ready for the headache of the technology. This is a great update to an already great platform… Hint Hint

In the mean time, we have come up with a novel way to showcase your products on your magento product page with only a few lines of code. We have made this change on a few implementations of Magento and it seems to work out nicely.

On App>Design>YourTheme>Template>Catalog>Product>View>Media.phtml we added the following

$vrfilename = $_SERVER{‘DOCUMENT_ROOT’} .’/360view/’.basename($_product->getSKU(), “.jpg”).’.swf’;
if (file_exists($vrfilename)) {
echo “<li><a onclick=\”flash_in_lightbox.embed(‘”.’http://www.xyz.com/360view/’.basename($_product->getSKU(), “.jpg”).’.swf’.”‘);_gaq.push([‘_trackEvent’, ‘360view’, ‘Open’]);\” href=\””.’https://www.photospherix.com/360view_sample.jpg’.”\” rel=\”lightbox\” title=\”360 View\”><img src=\”/360view/360view.jpg\” alt=\”360 product view\”></a></li>”;
} else {
echo “<!– ” .$vrfilename. ” * –>”;

By doing this, It looks in the 360view folder for a file named “THESKU”.swf and if it finds the file, It adds a 360 view icon to the end of the Additional Images folder. All we have to do to add the 360’s to the site, is name them with the sku number and they show up on the site. In the included example, we used a lightbox with flash option to display the 360’s.

Take a look: 360 views in Magento