Guest User

Untitled

a guest
Jan 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. /**
  2.  * Create extension at Zuora
  3.  *
  4.  * @param AppStore_Extension_Model_Product $product
  5.  * @throws Exception
  6.  * @return string|null Product identifier
  7.  */
  8. public function createExtensionProduct($product)
  9. {
  10.     /** @var $customer Mage_Customer_Model_Customer */
  11.     $customer = Mage::getModel('customer/customer')->load($product->getDeveloperId());
  12.  
  13.     if (!$product->getEditions()) {
  14.         return;
  15.     }
  16.  
  17.     foreach ($product->getEditions() as $edition) {
  18.         if ($someHelper->isGoEdition($edition, $product)) {
  19.  
  20.             $product->setZuoraName($this->getZuoraName($product, $edition));
  21.             $this->createExtensionProduct($product);
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment