Exemplo n.º 1
0
 /**
  * getViewerTemplate
  *
  * @return string
  */
 protected function getViewerTemplate()
 {
     $result = parent::getViewerTemplate();
     if ('invoice' === \XLite\Core\Request::getInstance()->mode && $this->checkAccess()) {
         $result = 'common/print_invoice.tpl';
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Argument convertion: <LC> --> <DRUPAL>
  *
  * @param string $path Drupal path
  * @param array  $args LC URL arguments OPTIONAL
  *
  * @return array
  */
 public static function getPortalDrupalArgs($path, array $args = array())
 {
     foreach (array('profileId' => 'profile_id', 'orderId' => 'order_id') as $var => $param) {
         ${$var} = empty($args[$param]) ? \XLite\Core\Request::getInstance()->{$param} : $args[$param];
         unset($args[$param]);
     }
     list($path, $args) = parent::getPortalDrupalArgs($path, $args);
     $path = preg_replace('/\\%/', static::getDrupalProfileId($profileId), $path, 1);
     $path = preg_replace('/\\%/', $orderId, $path, 1);
     return array($path, $args);
 }