/**
  * Prepare additional options/information for order item which will be
  * created from this product
  *
  * @param Mage_Catalog_Model_Product $product
  * @return array
  */
 public function getOrderOptions($product = null)
 {
     $options = parent::getOrderOptions($product);
     if ($linkIds = $this->getProduct($product)->getCustomOption('downloadable_link_ids')) {
         $linkOptions = array();
         $links = $this->getLinks($product);
         foreach (explode(',', $linkIds->getValue()) as $linkId) {
             if (isset($links[$linkId])) {
                 $linkOptions[] = $linkId;
             }
         }
         $options = array_merge($options, array('links' => $linkOptions));
         if (count($linkOptions) == 0) {
             // Gorilla Custom log: ticket#2014062010000282
             Mage::log(__METHOD__ . ':' . __LINE__ . ": No links in order options for " . $product->getId() . ". Product links: " . implode(', ', array_keys($links)), null, 'downloadable_missing_links.log');
         }
     } else {
         // Gorilla Custom log: ticket#2014062010000282
         Mage::log(__METHOD__ . ':' . __LINE__ . ": No link id for downloadable_link_ids found for " . $product->getId(), null, 'downloadable_missing_links.log');
     }
     $options = array_merge($options, array('is_downloadable' => true, 'real_product_type' => self::TYPE_DOWNLOADABLE));
     return $options;
 }