本文整理汇总了PHP中fn_get_company_name函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_get_company_name函数的具体用法?PHP fn_get_company_name怎么用?PHP fn_get_company_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_get_company_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content_55ccecb48c3e32_52503072
function content_55ccecb48c3e32_52503072($_smarty_tpl)
{
if (!$_smarty_tpl->tpl_vars['runtime']->value['simple_ultimate'] && $_smarty_tpl->tpl_vars['object']->value['company_id']) {
?>
<?php
if (!$_smarty_tpl->tpl_vars['object']->value['company_name']) {
?>
<?php
$_smarty_tpl->tpl_vars['_company_name'] = new Smarty_variable(fn_get_company_name($_smarty_tpl->tpl_vars['object']->value['company_id']), null, 0);
?>
<?php
}
?>
<?php
if ($_smarty_tpl->tpl_vars['simple']->value) {
?>
<small class="muted"><?php
echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['object']->value['company_name']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['_company_name']->value : $tmp, ENT_QUOTES, 'UTF-8');
?>
</small>
<?php
} else {
?>
<p class="muted"><small><?php
echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['object']->value['company_name']) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['_company_name']->value : $tmp, ENT_QUOTES, 'UTF-8');
?>
</small></p>
<?php
}
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:33,代码来源:8623d8149e4b53f920fcbad1a37f5df788089beb.tygh.company_name.tpl.php
示例2: content_55db8f5836e306_87643168
function content_55db8f5836e306_87643168($_smarty_tpl)
{
fn_preload_lang_vars(array('search_by_vendor', 'search_by_owner', 'all_vendors'));
$_smarty_tpl->tpl_vars["id"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['id']->value) === null || $tmp === '' ? "company_id" : $tmp, null, 0);
$_smarty_tpl->tpl_vars["name"] = new Smarty_variable(($tmp = @$_smarty_tpl->tpl_vars['name']->value) === null || $tmp === '' ? "company_id" : $tmp, null, 0);
?>
<?php
if (fn_allowed_for("MULTIVENDOR")) {
?>
<?php
$_smarty_tpl->tpl_vars["lang_search_by_vendor"] = new Smarty_variable($_smarty_tpl->__("search_by_vendor"), null, 0);
} elseif (fn_allowed_for("ULTIMATE")) {
?>
<?php
$_smarty_tpl->tpl_vars["lang_search_by_vendor"] = new Smarty_variable($_smarty_tpl->__("search_by_owner"), null, 0);
}
?>
<?php
if (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && !$_smarty_tpl->tpl_vars['runtime']->value['simple_ultimate']) {
?>
<div class="<?php
echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['class']->value) === null || $tmp === '' ? "control-group" : $tmp, ENT_QUOTES, 'UTF-8');
?>
">
<input type="hidden" name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['name']->value, ENT_QUOTES, 'UTF-8');
?>
" id="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');
?>
" value="<?php
echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['search']->value['company_id']) === null || $tmp === '' ? '' : $tmp, ENT_QUOTES, 'UTF-8');
?>
" />
<label class="control-label"><?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['lang_search_by_vendor']->value, ENT_QUOTES, 'UTF-8');
?>
</label>
<div class="controls">
<?php
echo $_smarty_tpl->getSubTemplate("common/ajax_select_object.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('data_url' => "companies.get_companies_list?show_all=Y&search=Y", 'text' => ($tmp = @fn_get_company_name($_smarty_tpl->tpl_vars['search']->value['company_id'])) === null || $tmp === '' ? $_smarty_tpl->__("all_vendors") : $tmp, 'result_elm' => $_smarty_tpl->tpl_vars['id']->value, 'id' => (string) $_smarty_tpl->tpl_vars['id']->value . "_selector"), 0);
?>
</div>
</div>
<?php
}
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:52,代码来源:b6cd1b5e5c7698887ff763c23cb4ba37cc9fcaf9.tygh.select_vendor.tpl.php
示例3: fn_yml_export_import_settings
function fn_yml_export_import_settings()
{
db_query("INSERT INTO ?:exim_layouts (name, cols, pattern_id, active) VALUES ('general', 'Option ID,Option name,Product ID,Product name,YML option,YML option param', 'product_yml_options', 'Y')");
$companies_ids = fn_get_available_company_ids();
foreach ($companies_ids as $company_id) {
$offers_params = array('vendorCode' => array('type' => 'product', 'value' => 'product_code'), 'description' => array('type' => 'product', 'value' => 'full_description'), 'model' => array('type' => 'product', 'value' => 'yml2_model'), 'typePrefix' => array('type' => 'product', 'value' => 'yml2_type_prefix'), 'vendor' => array('type' => 'product', 'value' => 'yml2_brand'));
$brand_id = db_get_field("SELECT feature_id FROM ?:product_features WHERE status = 'A' AND feature_type = 'E' AND company_id = ?i", $company_id);
if (!empty($brand_id)) {
$offers_params['vendor'] = array('type' => 'feature', 'value' => $brand_id);
}
$data = array('param_type' => 'offer', 'param_key' => 'common', 'param_data' => serialize($offers_params), 'company_id' => $company_id);
db_query("INSERT INTO ?:yml_param ?e ON DUPLICATE KEY UPDATE ?u", $data, $data);
$shop_name = fn_yml_get_setting_value('shop_name', $company_id);
if (empty($shop_name)) {
$shop_name = fn_get_company_name($company_id);
}
$key = fn_yml_rand_code();
$price_params = array('enable_authorization' => fn_yml_get_setting_value('enable_authorization', $company_id), 'company_id' => $company_id, 'access_key' => $key, 'name_price_list' => 'Яндекс.Маркет', 'shop_name' => $shop_name, 'export_encoding' => fn_yml_get_setting_value('export_encoding', $company_id), 'detailed_generation' => 'Y', 'utm_link' => '', 'export_stock' => fn_yml_get_setting_value('export_stock', $company_id), 'export_null_price' => fn_yml_get_setting_value('export_null_price', $company_id), 'market_category' => fn_yml_get_setting_value('market_category', $company_id), 'weight' => 'N', 'dimensions' => 'N', 'image_type' => fn_yml_get_setting_value('image_type', $company_id), 'thumbnail_width' => fn_yml_get_setting_value('thumbnail_width', $company_id), 'thumbnail_height' => fn_yml_get_setting_value('thumbnail_height', $company_id), 'store' => 'N', 'pickup' => 'N', 'delivery' => 'Y', 'delivery_options' => array(), 'export_hidden_categories' => 'N', 'exclude_categories_not_logging' => 'Y', 'exclude_categories' => '');
fn_yml_get_categories_data($price_params);
$data = array('param_type' => 'price_list', 'param_key' => $key, 'param_data' => serialize($price_params), 'company_id' => $company_id);
db_query("INSERT INTO ?:yml_param ?e ON DUPLICATE KEY UPDATE ?u", $data, $data);
}
}
示例4: fn_get_shared_companies
function fn_get_shared_companies($mailing_lists)
{
if (!empty($mailing_lists)) {
foreach ($mailing_lists as $list_id => $list_data) {
$shared_for_companies = db_get_fields("SELECT share_company_id FROM ?:ult_objects_sharing WHERE share_object_type = 'mailing_lists' AND share_object_id = ?i", $list_id);
$mailing_lists[$list_id]['shared_for_companies'] = array(0 => __('ult_shared_with'));
if (!empty($shared_for_companies)) {
foreach ($shared_for_companies as $company_id) {
$mailing_lists[$list_id]['shared_for_companies'][] = fn_get_company_name($company_id);
}
}
}
}
return $mailing_lists;
}
示例5: content_55d5c758c30951_62619282
//.........这里部分代码省略.........
<?php
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
$_smarty_tpl->append($_capture_append, ob_get_contents());
}
Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
} else {
$_smarty_tpl->capture_error();
}
$_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null);
ob_start();
?>
<?php
echo $_smarty_tpl->__("order");
?>
#<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['order_info']->value['order_id'], ENT_QUOTES, 'UTF-8');
?>
<span class="f-middle"><?php
echo $_smarty_tpl->__("total");
?>
: <span><?php
echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['order_info']->value['total']), 0);
?>
</span><?php
if ($_smarty_tpl->tpl_vars['order_info']->value['company_id']) {
?>
/ <?php
echo htmlspecialchars(fn_get_company_name($_smarty_tpl->tpl_vars['order_info']->value['company_id']), ENT_QUOTES, 'UTF-8');
}
?>
</span>
<span class="f-small">
<?php
if ($_smarty_tpl->tpl_vars['status_settings']->value['appearance_type'] == "I" && $_smarty_tpl->tpl_vars['order_info']->value['doc_ids'][$_smarty_tpl->tpl_vars['status_settings']->value['appearance_type']]) {
?>
(<?php
echo $_smarty_tpl->__("invoice");
?>
#<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['order_info']->value['doc_ids'][$_smarty_tpl->tpl_vars['status_settings']->value['appearance_type']], ENT_QUOTES, 'UTF-8');
?>
)
<?php
} elseif ($_smarty_tpl->tpl_vars['status_settings']->value['appearance_type'] == "C" && $_smarty_tpl->tpl_vars['order_info']->value['doc_ids'][$_smarty_tpl->tpl_vars['status_settings']->value['appearance_type']]) {
?>
(<?php
echo $_smarty_tpl->__("credit_memo");
?>
#<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['order_info']->value['doc_ids'][$_smarty_tpl->tpl_vars['status_settings']->value['appearance_type']], ENT_QUOTES, 'UTF-8');
?>
)
<?php
}
?>
<?php
$_smarty_tpl->tpl_vars["timestamp"] = new Smarty_variable(rawurlencode(smarty_modifier_date_format($_smarty_tpl->tpl_vars['order_info']->value['timestamp'], (string) $_smarty_tpl->tpl_vars['settings']->value['Appearance']['date_format'])), null, 0);
?>
/ <?php
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:67,代码来源:4a3008b0b06522f603fae31e5539ed2689082fb3.tygh.details.tpl.php
示例6: getShopName
protected function getShopName()
{
$shop_name = $this->options['shop_name'];
if (empty($shop_name)) {
if (fn_allowed_for('ULTIMATE')) {
$shop_name = fn_get_company_name($this->company_id);
} else {
$shop_name = Registry::get('settings.Company.company_name');
}
}
return strip_tags($shop_name);
}
示例7: die
* *
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($mode == 'complete') {
$orders_info = array();
$order_info = Registry::get('view')->getTemplateVars('order_info');
if (!fn_allowed_for('MULTIVENDOR') || fn_allowed_for('MULTIVENDOR') && $order_info['is_parent_order'] == 'N') {
$orders_info[0] = $order_info;
$orders_info[0]['ga_company_name'] = fn_get_company_name($order_info['company_id']);
} else {
$order_ids = explode(',', $order_info['child_ids']);
foreach ($order_ids as $k => $order_id) {
$_order_info = fn_get_order_info($order_id);
$orders_info[$k] = $_order_info;
$orders_info[$k]['ga_company_name'] = fn_get_company_name($_order_info['company_id']);
}
}
Registry::get('view')->assign('orders_info', $orders_info);
}
示例8: fn_twg_api_get_cart_products
function fn_twg_api_get_cart_products($cart_items, $lang_code = CART_LANGUAGE)
{
if (empty($cart_items)) {
return array();
}
$api_products = array();
$image_params = TwigmoSettings::get('images.cart');
foreach ($cart_items as $k => $item) {
$product = array('product' => db_get_field("SELECT product\n FROM ?:product_descriptions\n WHERE product_id = ?i AND lang_code = ?s", $item['product_id'], $lang_code), 'product_id' => $item['product_id'], 'cart_id' => $k, 'price' => $item['display_price'], 'exclude_from_calculate' => !empty($item['extra']['exclude_from_calculate']) ? $item['extra']['exclude_from_calculate'] : null, 'amount' => $item['amount'], 'company_id' => $item['company_id'], 'company_name' => fn_get_company_name($item['company_id']), 'extra' => !empty($item['extra']) ? $item['extra'] : array());
$qty_data = db_get_row('SELECT min_qty, max_qty, qty_step FROM ?:products WHERE product_id = ?i', $item['product_id']);
$product = array_merge($product, $qty_data);
$main_pair = !empty($item['main_pair']) ? $item['main_pair'] : fn_get_image_pairs($item['product_id'], 'product', 'M', true, true, $lang_code);
if (!empty($main_pair)) {
$product['icon'] = Api::getAsApiObject('images', TwigmoImage::getApiImageData($main_pair, 'product', 'icon', $image_params));
}
if (!empty($item['product_options'])) {
$advanced_options = fn_get_selected_product_options_info($item['product_options']);
$api_options = Api::getAsList('cart_product_options', $advanced_options);
if (!empty($api_options['option'])) {
$product['product_options'] = $api_options['option'];
}
}
$api_products[] = $product;
}
return $api_products;
}
示例9: fn_get_sb_providers_meta_data
function fn_get_sb_providers_meta_data($params)
{
$addon_settings = Settings::instance()->getValues('social_buttons', 'ADDON');
$providers_meta_data = array();
if (fn_allowed_for('ULTIMATE')) {
$company_id = Registry::ifGet('runtime.company_id', fn_get_default_company_id());
$site_name = fn_get_company_name($company_id);
}
if ($params['object'] == 'products') {
$product = Tygh::$app['view']->getTemplateVars('product');
$providers_meta_data['all'] = array('title' => fn_sb_format_page_title(), 'url' => fn_url('products.view?product_id=' . $params['object_id']), 'image' => !empty($product['main_pair']['detailed']['http_image_path']) ? $product['main_pair']['detailed']['http_image_path'] : '', 'image:width' => !empty($product['main_pair']['detailed']['image_x']) ? $product['main_pair']['detailed']['image_x'] : '', 'image:height' => !empty($product['main_pair']['detailed']['image_y']) ? $product['main_pair']['detailed']['image_y'] : '', 'site_name' => !empty($site_name) ? $site_name : Registry::get('settings.Company.company_name'));
} elseif ($params['object'] == 'pages') {
$page = Tygh::$app['view']->getTemplateVars('page');
$logos = fn_get_logos();
if (fn_allowed_for('ULTIMATE')) {
$logos = fn_get_logos($company_id);
}
$providers_meta_data['all'] = array('title' => $page['page'], 'url' => !empty($page['link']) ? $page['link'] : fn_url('pages.view?product_id=' . $params['object_id']), 'image' => !empty($logos['theme']['image']['http_image_path']) ? $logos['theme']['image']['http_image_path'] : '', 'image:width' => !empty($logos['theme']['image']['image_x']) ? $logos['theme']['image']['image_x'] : '', 'image:height' => !empty($logos['theme']['image']['image_y']) ? $logos['theme']['image']['image_y'] : '', 'site_name' => !empty($site_name) ? $site_name : Registry::get('settings.Company.company_name'));
}
if (!empty($addon_settings)) {
foreach ($addon_settings as $provider_name => $provider_data) {
$func_name = 'fn_' . $provider_name . '_prepare_meta_data';
if (is_callable($func_name)) {
$providers_meta_data[$provider_name] = call_user_func($func_name, $provider_data, $params);
}
}
}
return $providers_meta_data;
}
示例10: content_55d2ed05346cd0_99774659
function content_55d2ed05346cd0_99774659($_smarty_tpl)
{
if (!is_callable('smarty_function_math')) {
include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
}
fn_preload_lang_vars(array('remove', 'edit'));
if (intval($_smarty_tpl->tpl_vars['company_id']->value)) {
?>
<?php
$_smarty_tpl->tpl_vars['company'] = new Smarty_variable(fn_get_company_name($_smarty_tpl->tpl_vars['company_id']->value), null, 0);
} else {
?>
<?php
$_smarty_tpl->tpl_vars['company'] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['ldelim']->value . "company" . (string) $_smarty_tpl->tpl_vars['rdelim']->value, null, 0);
}
if ($_smarty_tpl->tpl_vars['multiple']->value) {
?>
<tr <?php
if (!$_smarty_tpl->tpl_vars['clone']->value) {
?>
id="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['holder']->value, ENT_QUOTES, 'UTF-8');
?>
_<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['company_id']->value, ENT_QUOTES, 'UTF-8');
?>
" <?php
}
?>
class="cm-js-item <?php
if ($_smarty_tpl->tpl_vars['clone']->value) {
?>
cm-clone hidden<?php
}
?>
">
<?php
if ($_smarty_tpl->tpl_vars['position_field']->value) {
?>
<td><input type="text" name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['input_name']->value, ENT_QUOTES, 'UTF-8');
?>
[<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['company_id']->value, ENT_QUOTES, 'UTF-8');
?>
]" value="<?php
echo smarty_function_math(array('equation' => "a*b", 'a' => $_smarty_tpl->tpl_vars['position']->value, 'b' => 10), $_smarty_tpl);
?>
" size="3" class="input-text-short"<?php
if ($_smarty_tpl->tpl_vars['clone']->value) {
?>
disabled="disabled"<?php
}
?>
/></td><?php
}
?>
<td><?php
if ($_smarty_tpl->tpl_vars['hidden_field']->value) {
?>
<input type="hidden" name="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['input_name']->value, ENT_QUOTES, 'UTF-8');
?>
[]" value="<?php
echo htmlspecialchars($_smarty_tpl->tpl_vars['company_id']->value, ENT_QUOTES, 'UTF-8');
?>
" size="3" class="input-text-short"<?php
if ($_smarty_tpl->tpl_vars['clone']->value) {
?>
disabled="disabled"<?php
}
?>
/><?php
}
if (!$_smarty_tpl->tpl_vars['view_only']->value) {
?>
<a href="<?php
echo htmlspecialchars(fn_url("companies.update?company_id=" . (string) $_smarty_tpl->tpl_vars['company_id']->value), ENT_QUOTES, 'UTF-8');
?>
"><?php
}
echo htmlspecialchars($_smarty_tpl->tpl_vars['company']->value, ENT_QUOTES, 'UTF-8');
if (!$_smarty_tpl->tpl_vars['view_only']->value) {
?>
</a><?php
}
?>
</td>
<td class="nowrap">
<?php
if (!$_smarty_tpl->tpl_vars['hide_delete_button']->value && !$_smarty_tpl->tpl_vars['view_only']->value) {
?>
<?php
$_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null);
ob_start();
?>
<li><?php
smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("remove"), 'onclick' => "Tygh." . "\$" . ".cePicker('delete_js_item', '" . (string) $_smarty_tpl->tpl_vars['holder']->value . "', '" . (string) $_smarty_tpl->tpl_vars['company_id']->value . "', 'm'); return false;"));
?>
</li>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:bbfb1cec7cb2a708f04284c2773e288dd8288836.tygh.js.tpl.php
示例11: fn_exim_get_product_options
function fn_exim_get_product_options($product_id, $lang_code = '', $features_delimiter = '///')
{
$pair_delimiter = ':';
$set_delimiter = '; ';
$vars_delimiter = ',';
$export_fields = fn_exim_get_option_attrs();
$result = array();
$options = fn_get_product_options($product_id, $lang_code);
if (!empty($options)) {
foreach ($options as $o) {
$glob_opt = db_get_field("SELECT option_id FROM ?:product_global_option_links WHERE option_id = ?i AND product_id = ?i", $o['option_id'], $product_id);
$prefix = '';
if (!empty($o['company_id'])) {
$company_name = fn_get_company_name($o['company_id']);
$prefix = '(' . $company_name . ') ';
}
$str = $prefix . "{$o['option_name']}{$pair_delimiter} {$o['option_type']}" . (empty($glob_opt) ? '' : 'G');
$variants = array();
if (!empty($o['variants'])) {
foreach ($o['variants'] as $v) {
$variant = $v['variant_name'];
if (floatval($v['modifier']) != 0) {
$variant .= $features_delimiter . 'modifier=' . $v['modifier'];
$variant .= $features_delimiter . 'modifier_type=' . $v['modifier_type'];
}
if (floatval($v['weight_modifier']) != 0) {
$variant .= $features_delimiter . 'weight_modifier=' . $v['weight_modifier'];
$variant .= $features_delimiter . 'weight_modifier_type=' . $v['weight_modifier_type'];
}
if (!empty($v['image_pair']['image_id'])) {
$variant .= $features_delimiter . 'image=' . fn_export_image($v['image_pair']['image_id'], 'variant_image', '', false);
}
fn_set_hook('exim_product_variant', $v, $variant);
$variants[] = $variant;
}
$str .= '[' . implode($vars_delimiter, str_replace($vars_delimiter, '\\\\' . $vars_delimiter, $variants)) . ']';
fn_set_hook('exim_product_option', $o, $str);
}
foreach ($export_fields as $field) {
if (!empty($o[$field])) {
$str .= $features_delimiter . $field . '=' . str_replace(array('[', ']'), array('', ''), $o[$field]);
}
}
$result[] = $str;
}
}
return !empty($result) ? implode($set_delimiter, $result) : '';
}
示例12: fn_rus_unisender_place_order
function fn_rus_unisender_place_order($order_id, $action, $order_status, $cart, $auth)
{
if (Registry::get('addons.rus_unisender.send_sms_admin') == 'Y') {
$admin_phone = Registry::get('addons.rus_unisender.admin_phone');
if (!empty($admin_phone)) {
$storefront = fn_get_company_name(fn_get_company_id('orders', 'order_id', $order_id));
$text = Registry::get('addons.rus_unisender.send_sms_admin_text');
$text = str_replace('[order_id]', $order_id, $text);
$text = str_replace('[storefront]', $storefront, $text);
$post = array('api_key' => Registry::get('addons.rus_unisender.api_key'), 'phone' => $admin_phone, 'sender' => fn_substr(Registry::get('addons.rus_unisender.admin_sender'), 0, 11), 'text' => $text);
if (!fn_unisender_api('sendSms', $post, $response)) {
$email = Registry::get('settings.Company.company_site_administrator');
Mailer::sendMail(array('to' => $email, 'from' => 'company_site_administrator', 'data' => array('phone' => $admin_phone, 'error' => $response), 'tpl' => 'addons/rus_unisender/unisender.tpl', 'company_id' => fn_get_company_id('orders', 'order_id', $order_id)), 'C', CART_LANGUAGE);
}
}
}
}
示例13: fn_ult_check_store_permission
//.........这里部分代码省略.........
$object_name = '#' . $key_id;
$object_type = __('order');
}
break;
case 'shippings':
if (!empty($params['shipping_id'])) {
$key = 'shipping_id';
$key_id = $params[$key];
$table = 'shippings';
$object_name = fn_get_shipping_name($key_id, DESCR_SL);
$object_type = __('shipping');
}
break;
case 'promotions':
if (!empty($params['promotion_id'])) {
$key = 'promotion_id';
$key_id = $params[$key];
$table = 'promotions';
$object_name = fn_get_promotion_name($key_id, DESCR_SL);
$object_type = __('promotion');
}
break;
case 'pages':
if (!empty($params['page_id'])) {
$key = 'page_id';
$key_id = $params[$key];
$table = 'pages';
$object_name = fn_get_page_name($key_id, DESCR_SL);
$object_type = __('content');
}
break;
case 'profiles':
if (!empty($params['user_id'])) {
$key = 'user_id';
$key_id = $params[$key];
$table = 'users';
$object_name = fn_get_user_name($key_id, DESCR_SL);
$object_type = __('user');
$check_store_permission = array('func' => 'fn_ult_check_store_permission_profiles', 'args' => array('$params', '$table', '$key', '$key_id'));
}
break;
case 'settings':
if (!empty($params['section_id'])) {
$object_name = $params['section_id'];
$object_type = __('section');
$table = 'settings';
$check_store_permission = array('func' => 'fn_ult_check_store_permission_settings', 'args' => array('$object_name'));
}
break;
case 'shipments':
if (!empty($params['shipment_id'])) {
$key = 'shipment_id';
$key_id = $params[$key];
$table = 'shipments';
$object_name = '#' . $key_id;
$object_type = __('shipment');
$check_store_permission = array('func' => 'fn_ult_check_store_permission_shipments', 'args' => array('$key_id'));
}
break;
case 'static_data':
if (!empty($params['menu_id'])) {
$key = 'menu_id';
$key_id = $params[$key];
$table = 'menus';
$object_name = fn_get_menu_name($key_id);
$object_type = __('menu');
$redirect_controller = 'menus';
}
break;
case 'companies':
if (!empty($params['company_id'])) {
$key = 'company_id';
$key_id = $params[$key];
$table = 'companies';
$object_name = fn_get_company_name($key_id);
$object_type = __('company');
}
break;
}
fn_set_hook('ult_check_store_permission', $params, $object_type, $object_name, $table, $key, $key_id);
if (!empty($object_name)) {
if (!empty($check_store_permission)) {
$args = array();
foreach ($check_store_permission['args'] as $arg) {
if ($arg[0] == '$') {
$arg = ltrim($arg, "\$");
$args[] = ${$arg};
}
}
$result = call_user_func_array($check_store_permission['func'], $args);
} else {
$result = fn_check_company_id($table, $key, $key_id) || fn_check_shared_company_id($table, $key_id);
}
}
fn_set_hook('ult_check_store_permission_post', $params, $object_type, $object_name, $result);
if ($result == false) {
fn_set_notification('W', __('warning'), __('store_object_denied', array('[object_type]' => $object_type, '[object_name]' => fn_truncate_chars($object_name, 20))), '', 'store_object_denied');
}
return $result;
}
示例14: exportProducts
/**
* @param array $product_ids
*/
protected static function exportProducts(array $product_ids)
{
static::$count_success = 0;
static::$count_fail = 0;
static::$count_skip = 0;
static::$errors = array();
static::$error_counter = array();
$product_ids = array_filter($product_ids);
$templates = $groups = array();
fn_set_progress('parts', count($product_ids) * 2);
foreach ($product_ids as $product_id) {
$product = new Product($product_id);
if (empty($product->id)) {
fn_set_progress('echo', '.');
static::$count_skip++;
continue;
}
if (empty($product->template_id)) {
$template = Template::getDefaultByCompanyId($product->company_id);
if ($template) {
$product->setTemplateId($template->id);
$product->saveTemplateId();
} else {
$company_name = fn_get_company_name($product->company_id);
fn_set_notification('E', __('error'), __('ebay_default_template_not_found', array('[company_name]' => $company_name)));
}
}
if (!empty($product->external_id)) {
$api = Client::instance($product->getTemplate());
static::uploadProductImages($product);
fn_set_progress('echo', __('ebay_export_product', array('[product]' => htmlspecialchars($product->original_title))), false);
$combinations = $product->getCombinations();
$external_combinations = $product->getExternalCombinations();
if (!empty($combinations) && empty($external_combinations)) {
$result = $api->getItem($product);
if ($result && $result->isSuccess()) {
$product->setExternalCombinations($result->getProductVariations());
}
}
$result = $api->reviseItem($product);
if ($result) {
if ($result->isSuccess()) {
$product->setStatusActive();
$product->saveExternalData();
} elseif ($result->issetErrorAuctionEnded()) {
$result = $api->relistItem($product);
if ($result && $result->isSuccess()) {
Product::deleteExternalData($product->external_id);
$product->external_id = $result->getExternalId();
$product->saveExternalData();
$product->setStatusActive();
}
}
}
if ($result) {
if ($result->isSuccess()) {
static::$count_success++;
ProductLogger::info(ProductLogger::ACTION_UPDATE_PRODUCT, $product, __('ebay_success_exported_product_notice'));
} else {
static::$count_fail++;
}
static::checkResponse($product, $result, ProductLogger::ACTION_UPDATE_PRODUCT);
} else {
static::checkInternalErrors($product, $api, ProductLogger::ACTION_UPDATE_PRODUCT);
}
fn_set_progress('echo', '.');
} else {
$groups[$product->template_id][] = $product;
$templates[$product->template_id] = $product->getTemplate();
if (count($groups[$product->template_id]) >= static::MAX_COUNT_EXPORT_NEW_PRODUCTS) {
static::exportGroupProducts($product->getTemplate(), $groups[$product->template_id]);
unset($groups[$product->template_id]);
}
}
}
if (!empty($groups)) {
foreach ($groups as $template_id => $products) {
static::exportGroupProducts($templates[$template_id], $products);
}
}
/** @var \Smarty $smarty */
$smarty = Tygh::$app['view'];
$smarty->assign('export_result', array('count_success' => static::$count_success, 'count_fail' => static::$count_fail, 'count_skip' => static::$count_skip, 'errors' => static::$errors, 'error_counter' => static::$error_counter, 'count_external_error' => static::$count_external_error));
fn_set_notification('I', static::$count_fail == 0 ? __('ebay_export_success') : __('ebay_export_failed'), $smarty->fetch('addons/ebay/views/ebay/components/export_summary.tpl'));
}
示例15: content_55ccec9f0b62b2_41072375
function content_55ccec9f0b62b2_41072375($_smarty_tpl)
{
if (!is_callable('smarty_function_set_id')) {
include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
}
fn_preload_lang_vars(array('vendor', 'vendor'));
if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
$_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
ob_start();
if (fn_allowed_for("MULTIVENDOR") && ($_smarty_tpl->tpl_vars['company_name']->value || $_smarty_tpl->tpl_vars['company_id']->value) && $_smarty_tpl->tpl_vars['settings']->value['Vendors']['display_vendor'] == "Y") {
?>
<div class="ty-control-group<?php
if (!$_smarty_tpl->tpl_vars['capture_options_vs_qty']->value) {
?>
product-list-field<?php
}
?>
">
<label class="ty-control-group__label"><?php
echo $_smarty_tpl->__("vendor");
?>
:</label>
<span class="ty-control-group__item"><a href="<?php
echo htmlspecialchars(fn_url("companies.view?company_id=" . (string) $_smarty_tpl->tpl_vars['company_id']->value), ENT_QUOTES, 'UTF-8');
?>
"><?php
if ($_smarty_tpl->tpl_vars['company_name']->value) {
echo htmlspecialchars($_smarty_tpl->tpl_vars['company_name']->value, ENT_QUOTES, 'UTF-8');
} else {
echo htmlspecialchars(fn_get_company_name($_smarty_tpl->tpl_vars['company_id']->value), ENT_QUOTES, 'UTF-8');
}
?>
</a></span>
</div>
<?php
}
list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
if (isset($_capture_assign)) {
$_smarty_tpl->assign($_capture_assign, ob_get_contents());
}
if (isset($_capture_append)) {
$_smarty_tpl->append($_capture_append, ob_get_contents());
}
Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean();
} else {
$_smarty_tpl->capture_error();
}
if (trim(Smarty::$_smarty_vars['capture']['template_content'])) {
if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") {
?>
<span class="cm-template-box template-box" data-ca-te-template="views/companies/components/product_company_data.tpl" id="<?php
echo smarty_function_set_id(array('name' => "views/companies/components/product_company_data.tpl"), $_smarty_tpl);
?>
"><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php
echo Smarty::$_smarty_vars['capture']['template_content'];
?>
<!--[/tpl_id]--></span><?php
} else {
echo Smarty::$_smarty_vars['capture']['template_content'];
}
}
} else {
if (fn_allowed_for("MULTIVENDOR") && ($_smarty_tpl->tpl_vars['company_name']->value || $_smarty_tpl->tpl_vars['company_id']->value) && $_smarty_tpl->tpl_vars['settings']->value['Vendors']['display_vendor'] == "Y") {
?>
<div class="ty-control-group<?php
if (!$_smarty_tpl->tpl_vars['capture_options_vs_qty']->value) {
?>
product-list-field<?php
}
?>
">
<label class="ty-control-group__label"><?php
echo $_smarty_tpl->__("vendor");
?>
:</label>
<span class="ty-control-group__item"><a href="<?php
echo htmlspecialchars(fn_url("companies.view?company_id=" . (string) $_smarty_tpl->tpl_vars['company_id']->value), ENT_QUOTES, 'UTF-8');
?>
"><?php
if ($_smarty_tpl->tpl_vars['company_name']->value) {
echo htmlspecialchars($_smarty_tpl->tpl_vars['company_name']->value, ENT_QUOTES, 'UTF-8');
} else {
echo htmlspecialchars(fn_get_company_name($_smarty_tpl->tpl_vars['company_id']->value), ENT_QUOTES, 'UTF-8');
}
?>
</a></span>
</div>
<?php
}
}
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:92,代码来源:61434cd3e39a77d65631ad38f5c23e6786d8b234.tygh.product_company_data.tpl.php