Esempio n. 1
0
 /**
  * Attach a domain to a hosting product and add itself within the cart
  * 
  * @param CartItem $item
  * @param string $domain
  * @param integer $tld_id
  * @param string $action [registerDomain, transferDomain]
  */
 public function attachDomain(CartItem $item, $domain, $tld_id, $action = "registerDomain", $authcode = null)
 {
     if (!empty($item) && !empty($domain)) {
         // Set the domain attaching it within the hosting plan selected
         $item->setDomain($domain);
         $item->addOption('domain', array('name' => $domain, 'tld' => $tld_id, 'action' => $action, 'authcode' => $authcode));
         self::addDomain($domain, $tld_id, $action);
     }
 }