Exemplo n.º 1
0
 /**
  * Return template object
  *
  * @param $id
  * @return Template
  */
 public static function getById($id)
 {
     $id = (int) $id;
     if (!isset(static::$templates[$id])) {
         Registry::set('runtime.skip_sharing_selection', true);
         $result = fn_get_ebay_template($id);
         Registry::set('runtime.skip_sharing_selection', false);
         static::$templates[$id] = new Template($result);
     }
     return static::$templates[$id];
 }
Exemplo n.º 2
0
        $features = fn_get_ebay_category_features($_REQUEST['category_id']);
    }
    if (!empty($_REQUEST['template_id'])) {
        $template_data = fn_get_ebay_template($_REQUEST['template_id']);
    }
    Tygh::$app['view']->assign('template_data', $template_data);
    Tygh::$app['view']->assign('category_features', $features);
    Tygh::$app['view']->assign('data_id', $_REQUEST['data_id']);
    if (defined('AJAX_REQUEST')) {
        Tygh::$app['view']->display('addons/ebay/views/ebay/components/category_features.tpl');
        exit;
    } else {
        fn_print_die($features, $_REQUEST);
    }
} elseif ($mode == 'get_shippings') {
    $template_data = fn_get_ebay_template($_REQUEST['template_id']);
    Tygh::$app['view']->assign('shipping_type', $_REQUEST['shipping_type']);
    Tygh::$app['view']->assign('template_data', $template_data);
    if (defined('AJAX_REQUEST')) {
        Tygh::$app['view']->display('addons/ebay/views/ebay/update.tpl');
        exit;
    }
} elseif ($mode == 'get_orders') {
    fn_define('ORDER_MANAGEMENT', true);
    if (fn_allowed_for('ULTIMATE')) {
        if (Registry::get('runtime.company_id')) {
            list($success_orders, $failed_orders) = fn_get_ebay_orders($cart, $customer_auth);
            if (!empty($success_orders)) {
                fn_set_notification('N', __('successful'), __('ebay_success_orders_notice', array('[SUCCESS_IDS]' => implode(', ', $success_orders))));
            } elseif (!empty($failed_orders)) {
                fn_set_notification('W', __('warning'), __('ebay_failed_orders_notice', array('[FAILED_EBAY_IDS]' => implode(', ', $failed_orders))));