Q: Get product expire date and company address in magento I had a problem few days back to get the product details. Now I have solved the issue and gotten all product information. But I don't know how to get the product company address, product expired date and starting date.
Can anybody tell me what the code will be? I just need four things.


*

*Product Company Name

*Product Company Address

*Product Starting Date

*Product Expired Date


Here is the code for getting the product details:
$obj = Mage::getModel('catalog/product');
 $_product = $obj->load($item_ID); 

 $pname = $_product->getName();
 $psdes = $_product->getShortDescription();
 $pdes = $_product->getDescription();
 $pprice = $_product->getPrice();
 $psprice = $_product->getSpecialPrice();
 $pimage = $_product->getImageUrl();


A: Are you using Magento Enterprise edition with catalog events?  If your product belongs to a category that has an event, then it will have an end date and start date.  If so, this is how you would get the product start date and product end date.
//first you need to get the event associated with the product
$event = $product->getEvent();

//now, let's work with the start date
$startdate = new DateTime($event->getData('date_' . 'start'));

//you now have a DateTime object which you can turn into a String as follows
//note that you can change the formatting according to the rules here 
//http://www.php.net/manual/en/function.date.php

$startdate = date_format($startdate, "d-m-Y H:i" );

//now here is the end date
$enddate = new DateTime($event->getData('date_' . 'end'));
$enddate = date_format($enddate, "d-m-Y H:i" );

