当前位置: 首页>>代码示例>>PHP>>正文


PHP Module::isInstalled方法代码示例

本文整理汇总了PHP中Module::isInstalled方法的典型用法代码示例。如果您正苦于以下问题:PHP Module::isInstalled方法的具体用法?PHP Module::isInstalled怎么用?PHP Module::isInstalled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Module的用法示例。


在下文中一共展示了Module::isInstalled方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: postProcess

 public function postProcess()
 {
     if (!Module::isInstalled('aplazame') || !Module::isEnabled('aplazame')) {
         $this->error('Aplazame is not enabled');
     }
     $cartId = $mid = Tools::getValue('checkout_token');
     $secureKey = Tools::getValue('key', false);
     if (!$mid || !$secureKey) {
         $this->error('Missing required fields');
     }
     $cart = new Cart((int) $mid);
     if (!Validate::isLoadedObject($cart)) {
         $this->error('Cart does not exists or does not have an order');
     }
     $response = $this->module->callToRest('POST', '/orders/' . $mid . '/authorize');
     if ($response['is_error']) {
         $message = 'Aplazame Error #' . $response['code'];
         if (isset($response['payload']['error']['message'])) {
             $message .= ' ' . $response['payload']['error']['message'];
         }
         $this->module->validateOrder($cartId, Configuration::get('PS_OS_ERROR'), $cart->getOrderTotal(true), $this->module->displayName, $message, null, null, false, $secureKey);
         $this->error('Authorization error');
     }
     $cartAmount = AplazameSerializers::formatDecimals($cart->getOrderTotal(true));
     if ($response['payload']['amount'] !== $cartAmount) {
         $this->error('Invalid');
     }
     $aplazameAmount = AplazameSerializers::decodeDecimals($response['payload']['amount']);
     if (!$this->module->validateOrder($cartId, Configuration::get('PS_OS_PAYMENT'), $aplazameAmount, $this->module->displayName, null, null, null, false, $secureKey)) {
         $this->error('Cannot validate order');
     }
     exit('success');
 }
开发者ID:aplazame,项目名称:prestashop,代码行数:33,代码来源:confirmation.php

示例2: getImageLink

 public function getImageLink($name, $ids, $type = null)
 {
     $context = Context::getContext();
     // check if WebP support is enabled.
     if ($context->cookie->exists() && $context->cookie->WebPSupport) {
         $extension = '.webp';
     } else {
         $extension = '.jpg';
     }
     $not_default = false;
     // Check if module is installed, enabled, customer is logged in and watermark logged option is on
     if (Configuration::get('WATERMARK_LOGGED') && (Module::isInstalled('watermark') && Module::isEnabled('watermark')) && isset(Context::getContext()->customer->id)) {
         $type .= '-' . Configuration::get('WATERMARK_HASH');
     }
     // legacy mode or default image
     $theme = Shop::isFeatureActive() && file_exists(_PS_PROD_IMG_DIR_ . $ids . ($type ? '-' . $type : '') . '-' . (int) Context::getContext()->shop->id_theme . $extension) ? '-' . Context::getContext()->shop->id_theme : '';
     if (Configuration::get('PS_LEGACY_IMAGES') && file_exists(_PS_PROD_IMG_DIR_ . $ids . ($type ? '-' . $type : '') . $theme . $extension) || ($not_default = strpos($ids, 'default') !== false)) {
         if ($this->allow == 1 && !$not_default) {
             $uri_path = __PS_BASE_URI__ . $ids . ($type ? '-' . $type : '') . $theme . '/' . $name . $extension;
         } else {
             $uri_path = _THEME_PROD_DIR_ . $ids . ($type ? '-' . $type : '') . $theme . $extension;
         }
     } else {
         // if ids if of the form id_product-id_image, we want to extract the id_image part
         $split_ids = explode('-', $ids);
         $id_image = isset($split_ids[1]) ? $split_ids[1] : $split_ids[0];
         $theme = Shop::isFeatureActive() && file_exists(_PS_PROD_IMG_DIR_ . Image::getImgFolderStatic($id_image) . $id_image . ($type ? '-' . $type : '') . '-' . (int) Context::getContext()->shop->id_theme . $extension) ? '-' . Context::getContext()->shop->id_theme : '';
         if ($this->allow == 1) {
             $uri_path = __PS_BASE_URI__ . $id_image . ($type ? '-' . $type : '') . $theme . '/' . $name . $extension;
         } else {
             $uri_path = _THEME_PROD_DIR_ . Image::getImgFolderStatic($id_image) . $id_image . ($type ? '-' . $type : '') . $theme . $extension;
         }
     }
     return $this->protocol_content . Tools::getMediaServer($uri_path) . $uri_path;
 }
开发者ID:N-Wouda,项目名称:ps-webp-support,代码行数:35,代码来源:Link.php

示例3: hookLeftColumn

 public function hookLeftColumn($params)
 {
     if (Module::isInstalled('smartblog') != 1) {
         $this->smarty->assign(array('smartmodname' => $this->name));
         return $this->display(__FILE__, 'views/templates/front/install_required.tpl');
     } else {
         if (!$this->isCached('smartblogrecentposts.tpl', $this->getCacheId())) {
             global $smarty;
             $id_lang = $this->context->language->id;
             $posts = SmartBlogPost::getRecentPosts($id_lang);
             $i = 0;
             foreach ($posts as $post) {
                 if (file_exists(_PS_MODULE_DIR_ . 'smartblog/images/' . $post['id_smart_blog_post'] . '.jpg')) {
                     $image = $post['id_smart_blog_post'];
                     $posts[$i]['post_img'] = $image;
                 } else {
                     $posts[$i]['post_img'] = 'no';
                 }
                 $i++;
             }
             $smarty->assign(array('posts' => $posts));
         }
         return $this->display(__FILE__, 'views/templates/front/smartblogrecentposts.tpl', $this->getCacheId());
     }
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:25,代码来源:smartblogrecentposts.php

示例4: _postProcess

    private function _postProcess()
    {
        // Get var 'action'
        $action = Tools::getValue('action');
        if (Tools::getValue('submitExport') && $action) {
            if ($action == 'customers') {
                $result = $this->_getCustomers();
            } else {
                if (!Module::isInstalled('blocknewsletter')) {
                    $this->_html .= $this->displayError('The module "blocknewsletter" is required for this feature');
                } else {
                    $result = $this->_getBlockNewsletter();
                }
            }
            if ($fd = @fopen(dirname(__FILE__) . '/' . strval(preg_replace('#\\.{2,}#', '.', $action)) . '_' . $this->_file, 'w')) {
                foreach ($result as $tab) {
                    $this->_my_fputcsv($fd, $tab);
                }
                fclose($fd);
                $nb = count($result) > 1 ? count($result) - 1 : 0;
                $this->_html .= $this->displayConfirmation($this->l('The .CSV file has been successfully exported.') . ' (' . $nb . ' ' . $this->l('customers found') . ')<br />
				<a href="../modules/newsletter/' . Tools::safeOutput(strval($action)) . '_' . $this->_file . '"><b>' . $this->l('Download the file') . ' ' . $this->_file . '</b></a>
				<br />
				<ol style="margin-top: 10px;">
					<li style="color: red;">' . $this->l('WARNING: If opening this .csv file with Excel, remember to choose UTF-8 encoding or you may see strange characters.') . '</li>
				</ol>');
            } else {
                $this->_html .= $this->displayError($this->l('Error: cannot write') . ' ' . dirname(__FILE__) . '/' . strval($action) . '_' . $this->_file . ' !');
            }
        }
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:31,代码来源:newsletter.php

示例5: listAllowed

 private function listAllowed()
 {
     global $smarty;
     if (Module::isInstalled('agilemultipleseller')) {
         include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php";
         include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
         $id_owner = AgileSellerManager::getObjectOwnerID('product', Tools::getValue('id_product'));
         $smarty->assign(array('id_seller' => $id_owner));
         if ($id_owner > 0) {
             if (intval(Configuration::get('AGILE_MS_PRODUCT_APPROVAL')) == 1) {
                 $approved = AgileMultipleSeller::is_list_approved(Tools::getValue('id_product'));
                 if ($approved != 1) {
                     return false;
                 }
             }
             if (Module::isInstalled('agilesellerlistoptions')) {
                 include_once _PS_ROOT_DIR_ . "/modules/agilesellerlistoptions/agilesellerlistoptions.php";
                 $listoption = AgileSellerListOptions::get_product_list_option(Tools::getValue('id_product'), AgileSellerListOptions::ASLO_OPTION_LIST);
                 $liststatus = intval($listoption['status']);
                 $aslo_list_prod_id = intval(Configuration::get('ASLO_PROD_FOR_OPTION' . AgileSellerListOptions::ASLO_OPTION_LIST));
                 if ($liststatus != AgileSellerListOptions::ASLO_STATUS_IN_EFFECT && $aslo_list_prod_id != AgileSellerListOptions::ASLO_ALWAYS_FREE) {
                     return false;
                 }
             }
         }
     }
     return true;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:28,代码来源:ProductController.php

示例6: initOptions

 public function initOptions()
 {
     $this->optionTitle = $this->l('Settings');
     $blogCategories = SimpleBlogCategory::getCategories($this->context->language->id);
     $simpleBlogCategories = array();
     $simpleBlogCategories[0] = $this->l('All categories');
     $simpleBlogCategories[9999] = $this->l('Featured only');
     foreach ($blogCategories as $key => $category) {
         $simpleBlogCategories[$category['id']] = $category['name'];
     }
     $recentPosts = array();
     if (Module::isInstalled('ph_recentposts')) {
         $recentPosts = array('recent_posts' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Recent Posts widget settings'), 'image' => '../img/t/AdminOrderPreferences.gif', 'fields' => array('PH_RECENTPOSTS_LAYOUT' => array('title' => $this->l('Recent Posts layout:'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('full' => $this->l('Full width with large images'), 'grid' => $this->l('Grid'))), 'PH_RECENTPOSTS_GRID_COLUMNS' => array('title' => $this->l('Grid columns:'), 'cast' => 'intval', 'desc' => $this->l('Working only with "Recent Posts layout:" setup to "Grid"'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('2' => $this->l('2 columns'), '3' => $this->l('3 columns'), '4' => $this->l('4 columns'))), 'PH_RECENTPOSTS_NB' => array('title' => $this->l('Number of displayed Recent Posts'), 'cast' => 'intval', 'desc' => $this->l('Default: 4'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_RECENTPOSTS_CAT' => array('title' => $this->l('Category:'), 'cast' => 'intval', 'desc' => $this->l('If you not select any category then Recent Posts will displayed posts from all categories'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => $simpleBlogCategories))));
     }
     $relatedPosts = array();
     if (Module::isInstalled('ph_relatedposts')) {
         $relatedPosts = array('related_posts' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Related Posts widget settings'), 'image' => '../img/t/AdminOrderPreferences.gif', 'fields' => array('PH_RELATEDPOSTS_GRID_COLUMNS' => array('title' => $this->l('Grid columns:'), 'cast' => 'intval', 'desc' => $this->l('Working only with "Recent Posts layout:" setup to "Grid"'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('2' => $this->l('2 columns'), '3' => $this->l('3 columns'), '4' => $this->l('4 columns'))))));
     }
     $alert_class = $this->is_16 === true ? 'alert alert-info' : 'info';
     $standard_options = array('general' => array('title' => $this->l('PrestaHome SimpleBlog Settings'), 'image' => '../img/t/AdminOrderPreferences.gif', 'info' => '<a class="button btn btn-default" href="index.php?controller=AdminSimpleBlogSettings&token=' . Tools::getValue('token') . '&regenerateThumbnails=1" class="bold"><i class="process-icon-cogs"></i>' . $this->l('Regenerate thumbnails') . '</a><br /><br />', 'fields' => array('PH_BLOG_POSTS_PER_PAGE' => array('title' => $this->l('Posts per page:'), 'cast' => 'intval', 'desc' => $this->l('Number of blog posts displayed per page. Default is 10.'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_BLOG_SLUG' => array('title' => $this->l('Blog main URL (by default: blog)'), 'validation' => 'isGenericName', 'required' => true, 'type' => 'text', 'size' => 40), 'PH_BLOG_MAIN_TITLE' => array('title' => $this->l('Blog title:'), 'validation' => 'isGenericName', 'type' => 'textLang', 'size' => 40), 'PH_BLOG_DATEFORMAT' => array('title' => $this->l('Blog default date format:'), 'desc' => $this->l('More details: http://php.net/manual/pl/function.date.php'), 'validation' => 'isGenericName', 'type' => 'text', 'size' => 40), 'PH_CATEGORY_SORTBY' => array('title' => $this->l('Sort categories by:'), 'desc' => $this->l('Select which method use to sort categories in SimpleBlog Categories Block'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('position' => $this->l('Position (1-9)'), 'name' => $this->l('Name (A-Z)'), 'id' => $this->l('ID (1-9)'))), 'PH_BLOG_FB_INIT' => array('title' => $this->l('Init Facebook?'), 'validation' => 'isBool', 'cast' => 'intval', 'desc' => $this->l('If you already use some Facebook widgets in your theme please select option to "No". If you select "Yes" then SimpleBlog will add facebook connect script on single post page.'), 'required' => true, 'type' => 'bool')), 'submit' => array('title' => $this->l('Update'), 'class' => 'button')), 'layout' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Appearance Settings - General'), 'image' => '../img/t/AdminOrderPreferences.gif', 'fields' => array('PH_BLOG_LAYOUT' => array('title' => $this->l('Main layout:'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('default' => $this->l('3 columns, enabled left column and right column'), 'left_sidebar' => $this->l('2 columns, enabled left column'), 'right_sidebar' => $this->l('2 columns, enabled right column'), 'full_width' => $this->l('Full width - Left and right column will be removed'))), 'PH_BLOG_DISPLAY_BREADCRUMBS' => array('title' => $this->l('Display breadcrumbs in center-column?'), 'validation' => 'isBool', 'cast' => 'intval', 'desc' => $this->l('Sometimes you want to remove breadcrumbs from center-column'), 'required' => true, 'type' => 'bool'), 'PH_BLOG_LIST_LAYOUT' => array('title' => $this->l('Posts list layout:'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('full' => $this->l('Full width with large images'), 'grid' => $this->l('Grid'))), 'PH_BLOG_GRID_COLUMNS' => array('title' => $this->l('Grid columns:'), 'cast' => 'intval', 'desc' => $this->l('Working only with "Posts list layout" setup to "Grid"'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('2' => $this->l('2 columns'), '3' => $this->l('3 columns'), '4' => $this->l('4 columns'))), 'PH_BLOG_CSS' => array('title' => $this->l('Custom CSS'), 'show' => true, 'required' => false, 'type' => 'textarea', 'cols' => '70', 'rows' => '10'))), 'single_post' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Appearance Settings - Single post'), 'image' => '../img/t/AdminOrderPreferences.gif', 'fields' => array('PH_BLOG_DISPLAY_LIKES' => array('title' => $this->l('Display "likes"?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_FB_COMMENTS' => array('title' => $this->l('Use FB comments on single post page?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_SHARER' => array('title' => $this->l('Use share icons on single post page?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_AUTHOR' => array('title' => $this->l('Display post author?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool', 'desc' => $this->l('This option also applies to the list of posts from the category')), 'PH_BLOG_DISPLAY_DATE' => array('title' => $this->l('Display post creation date?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool', 'desc' => $this->l('This option also applies to the list of posts from the category')), 'PH_BLOG_DISPLAY_FEATURED' => array('title' => $this->l('Display post featured image?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_CATEGORY' => array('title' => $this->l('Display post category?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool', 'desc' => $this->l('This option also applies to the list of posts from the category')), 'PH_BLOG_DISPLAY_TAGS' => array('title' => $this->l('Display post tags?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool', 'desc' => $this->l('This option also applies to the list of posts from the category')))), 'category_page' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Appearance Settings - Post lists'), 'image' => '../img/t/AdminOrderPreferences.gif', 'fields' => array('PH_BLOG_DISPLAY_THUMBNAIL' => array('title' => $this->l('Display post thumbnails?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_DESCRIPTION' => array('title' => $this->l('Display post short description?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_CAT_DESC' => array('title' => $this->l('Display category description on category page?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_BLOG_DISPLAY_CATEGORY_IMAGE' => array('title' => $this->l('Display category image?'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'), 'PH_CATEGORY_IMAGE_X' => array('title' => $this->l('Default category image width (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 535 (For PrestaShop 1.5), 870 (For PrestaShop 1.6)'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_CATEGORY_IMAGE_Y' => array('title' => $this->l('Default category image height (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 150'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'))), 'thumbnails' => array('submit' => array('title' => $this->l('Update'), 'class' => 'button'), 'title' => $this->l('Thumbnails Settings'), 'image' => '../img/t/AdminOrderPreferences.gif', 'info' => '<div class="' . $alert_class . '">' . $this->l('Remember to regenerate thumbnails after doing changes here') . '</div>', 'fields' => array('PH_BLOG_THUMB_METHOD' => array('title' => $this->l('Resize method:'), 'cast' => 'intval', 'desc' => $this->l('Select wich method use to resize thumbnail. Adaptive resize: What it does is resize the image to get as close as possible to the desired dimensions, then crops the image down to the proper size from the center.'), 'show' => true, 'required' => true, 'type' => 'radio', 'choices' => array('1' => $this->l('Adaptive resize (recommended)'), '2' => $this->l('Crop from center'))), 'PH_BLOG_THUMB_X' => array('title' => $this->l('Default thumbnail width (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 255 (For PrestaShop 1.5), 420 (For PrestaShop 1.6)'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_BLOG_THUMB_Y' => array('title' => $this->l('Default thumbnail height (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 200 (For PrestaShop 1.5 and 1.6)'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_BLOG_THUMB_X_WIDE' => array('title' => $this->l('Default thumbnail width (wide version) (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 535 (For PrestaShop 1.5), 870 (For PrestaShop 1.6)'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'), 'PH_BLOG_THUMB_Y_WIDE' => array('title' => $this->l('Default thumbnail height (wide version) (px)'), 'cast' => 'intval', 'desc' => $this->l('Default: 350 (For PrestaShop 1.5 and 1.6)'), 'type' => 'text', 'required' => true, 'validation' => 'isUnsignedId'))));
     $widgets_options = array();
     $widgets_options = array_merge($recentPosts, $relatedPosts);
     //$this->hide_multishop_checkbox = true;
     $this->fields_options = array_merge($standard_options, $widgets_options);
     return parent::renderOptions();
 }
开发者ID:OaSiis,项目名称:LDDP,代码行数:26,代码来源:AdminSimpleBlogSettingsController.php

示例7: getSliders

 public function getSliders()
 {
     if (Module::isInstalled('homesliderpro')) {
         $SlidersEverywhere = new homesliderpro();
         $hooks = $SlidersEverywhere->getConfig('HOMESLIDERPRO_HOOKS', (int) $this->getShopId());
         if (empty($hooks)) {
             $hooks = $SlidersEverywhere->getConfig('HOMESLIDERPRO_HOOKS');
         }
         $cmsPage = Tools::getValue('id_cms');
         $html = '<option value="0">' . $this->l('None') . '</option>';
         if (!empty($hooks)) {
             if ($cmsPage != '') {
                 foreach ($hooks as $hook) {
                     if ($sel = Db::getInstance()->getRow('SELECT * FROM `' . _DB_PREFIX_ . 'cms` WHERE proslider = "' . $hook . '" AND id_cms=' . $cmsPage)) {
                         $selected = 'selected="selected"';
                     } else {
                         $selected = '';
                     }
                     $html .= '<option ' . $selected . ' value="' . $hook . '">' . $hook . '</option>';
                 }
             } else {
                 foreach ($hooks as $hook) {
                     $selected = '';
                     $html .= '<option ' . $selected . ' value="' . $hook . '">' . $hook . '</option>';
                 }
             }
         }
         return $html;
     }
     return false;
 }
开发者ID:ac3gam3r,项目名称:Maxokraft,代码行数:31,代码来源:AdminCmsContent.php

示例8: initToolbar

 public function initToolbar()
 {
     if (Module::isInstalled('agilemultipleseller') and $this->is_seller) {
         return;
     }
     parent::initToolbar();
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:7,代码来源:AdminCartRulesController.php

示例9: getList

 public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
 {
     if (Module::isInstalled('agilemultipleseller')) {
         $this->agilemultipleseller_list_override();
     }
     parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:7,代码来源:AdminCustomerThreadsController.php

示例10: addSqlAssociation

 public static function addSqlAssociation($table, $alias, $inner_join = true, $on = null, $force_not_default = false)
 {
     $sql = parent::addSqlAssociation($table, $alias, $inner_join, $on, $force_not_default);
     if (!Module::isInstalled('agilemultipleshop')) {
         return $sql;
     }
     $eaccess = AgileSellerManager::get_entity_access($table);
     if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_UNKNOWN) {
         return $sql;
     }
     $xr_table = $eaccess['owner_xr_table'];
     $include_shared = '';
     if (!$eaccess['is_exclusive']) {
         $include_shared = ',0';
     }
     if (Shop::$id_shop_owner > 0) {
         $join = $inner_join ? 'INNER JOIN ' : 'LEFT JOIN ';
         if ($table == 'feature') {
             $join = 'LEFT JOIN ';
         }
         if ($eaccess['owner_table_type'] == AgileSellerManager::OWNER_TABLE_DEFINED) {
             $sql .= $join . _DB_PREFIX_ . $table . '_owner ' . $table . '_owner ON (' . $alias . '.id_' . $table . '=' . $table . '_owner.id_' . $table . ' AND IFNULL(' . $table . '_owner.id_owner,0) IN (' . Shop::$id_shop_owner . $include_shared . '))';
         } else {
             $sql .= $join . _DB_PREFIX_ . 'object_owner ' . $table . '_object_owner ON (' . $table . '_object_owner.entity=\'' . $table . '\' AND ' . $alias . '.id_' . $table . '= ' . $table . '_object_owner.id_object AND IFNULL(' . $table . '_object_owner.id_owner,0) IN (' . Shop::$id_shop_owner . $include_shared . '))';
         }
     }
     return $sql;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:28,代码来源:Shop.php

示例11: _postProcess

 private function _postProcess()
 {
     if (isset($_POST['submitExport']) and isset($_POST['action'])) {
         if ($_POST['action'] == 'customers') {
             $result = $this->_getCustomers();
         } else {
             if (!Module::isInstalled('blocknewsletter')) {
                 $this->_html .= $this->displayError('The module "blocknewsletter" is required for this feature');
             } else {
                 $result = $this->_getBlockNewsletter();
             }
         }
         if (!($nb = intval(Db::getInstance()->NumRows()))) {
             $this->_html .= $this->displayError($this->l('No customers were found with these filters !'));
         } elseif ($fd = @fopen(dirname(__FILE__) . '/' . strval(preg_replace('#\\.{2,}#', '.', $_POST['action'])) . '_' . $this->_file, 'w')) {
             foreach ($result as $tab) {
                 $this->_my_fputcsv($fd, $tab);
             }
             fclose($fd);
             $this->_html .= $this->displayConfirmation($this->l('The .CSV file has been successfully exported') . ' (' . $nb . ' ' . $this->l('customers found') . ')<br />> <a href="../modules/newsletter/' . strval($_POST['action']) . '_' . $this->_file . '"><b>' . $this->l('Download the file') . '</b></a>');
         } else {
             $this->_html .= $this->displayError($this->l('Error: cannot write to') . ' ' . dirname(__FILE__) . '/' . strval($_POST['action']) . '_' . $this->_file . ' !');
         }
     }
 }
开发者ID:raulgimenez,项目名称:dreamongraphics_shop,代码行数:25,代码来源:newsletter.php

示例12: displayFormSettings

 public function displayFormSettings()
 {
     $veykuwqwjkus = "currency";
     ${"GLOBALS"}["tthknplj"] = "currencies";
     $lfapjegsknsa = "currency_list";
     $this->context->controller->addCSS($this->_path . "css/agilepaypal.css", "all");
     ${${"GLOBALS"}["teujyh"]} = array();
     array_push(${$lfapjegsknsa}, array("id" => 0, "name" => $this->l('Please choose')));
     $tfcoqgvrd = "helper";
     ${${"GLOBALS"}["sajaoqav"]} = Currency::getCurrencies(false, false);
     foreach (${${"GLOBALS"}["tthknplj"]} as ${$veykuwqwjkus}) {
         $unlqgrxvnkrh = "currency";
         array_push(${${"GLOBALS"}["teujyh"]}, array("id" => ${${"GLOBALS"}["duxtnwtj"]}["id_currency"], "name" => ${$unlqgrxvnkrh}["name"]));
     }
     ${${"GLOBALS"}["ogzmjfmjkidg"]} = array("form" => array("legend" => array("title" => $this->l('Settings'), "image" => $this->_path . "logo.gif"), "input" => array(array("type" => "text", "label" => $this->l('PayPal business e-mail'), "class" => "width10", "name" => "business", "size" => 33), array("type" => "select", "label" => $this->l('Paypal Account Currency'), "name" => "paypal_currency", "options" => array("query" => ${${"GLOBALS"}["teujyh"]}, "id" => "id", "name" => "name"), "desc" => $this->l('Please select the your Paypal Account Currency.')), array("type" => "radio", "label" => $this->l('Sandbox mode (Test)'), "name" => "sandbox", "values" => array(array("id" => "sandbox_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "sandbox_no", "value" => 0, "label" => $this->l('No')))), array("type" => "radio", "label" => $this->l('Mutiple Sellers Mode'), "name" => "support_sellers", "hint" => $this->l('If you have installed the Agile Multiple Seller module'), "form_group_class" => Module::isInstalled("agilemultipleseller") ? "" : "hidden", "values" => array(array("id" => "support_sellers_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "support_sellers_no", "value" => 0, "label" => $this->l('No'))), "desc" => array($this->l('All settings are the same for all sellers, except the Paypal account information which is managed in the Agile Multiple Seller module'))), array("type" => "htmlhr", "name" => "section1", "values" => array()), array("type" => "text", "label" => $this->l('Banner image URL'), "class" => "width10", "name" => "header", "size" => 82, "desc" => $this->l('The image should be hosted on a secured server in order to avoid security warnings. Size should be limited to 750x90px.')), array("type" => "htmlhr", "name" => "section2", "values" => array()), array("type" => "agile_radio_checkbox", "label" => $this->l('Express Checkout Enabled'), "name" => "express_enabled", "values" => array(array("id" => "express_enabled_yes", "value" => 1, "label" => $this->l('Yes'), "onclick" => "showitem('.express_enabled_yes')", "checkbox_list" => array("class" => "express_enabled_yes agile-radio-checkbox", "query" => array(array("id" => "hidecountry", "val" => 1, "name" => $this->l('Hide Countries') . "<font color=red>&nbsp;--&nbsp;" . $this->l('If your store ships to one country only.') . "</font>"), array("id" => "hidecarrier", "val" => 1, "name" => $this->l('Hide Carriers') . "<font color=red>&nbsp;--&nbsp;" . $this->l('If your store has one carrier, or no carrier') . "</font>"), array("id" => "hideterms", "val" => 1, "name" => $this->l('Hide Terms and Conditions') . "&nbsp;&nbsp;" . $this->l('Hide Terms and Conditions') . "&nbsp;--&nbsp;" . $this->l('If your want to hide the "Terms & Conditions" agreement checkbox at the express checkout screen'))), "id" => "id", "name" => "name")), array("id" => "express_enabled_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.express_enabled_yes')"))), array("type" => "htmlhr", "name" => "section3", "values" => array()), array("type" => "radio", "label" => $this->l('Force "Checkout" goes though summary page'), "name" => "force_summary", "values" => array(array("id" => "force_summary_yes", "value" => 1, "label" => $this->l('Yes')), array("id" => "force_summary_no", "value" => 0, "label" => $this->l('No'))), "desc" => $this->l('There are two buttons (Cart and Checkout) in the cart block. The "Checkout" button will bypass the order summary page, so the user will not be able to choose Express Checkout. Selecting "Yes" will force Checkout to go though the order summary page')), array("type" => "htmlhr", "name" => "section4", "values" => array()), array("type" => "agile_radio_checkbox", "label" => $this->l('Enable Recurring Payment'), "name" => "recurringpayment", "hint" => $this->l('Determine whether allow customers to subcribe for automatic, periodic payments, such as membership payments, etc.'), "values" => array(array("id" => "recurringpayment_yes", "value" => 1, "label" => $this->l('Yes'), "p" => $this->l('This will allow customers to subcribe for automatic, periodic payments, such as membership payments, etc.'), "onclick" => "showitem('.recurringpayment_yes')", "checkbox_list" => array("class" => "recurringpayment_yes agile-radio-checkbox", "query" => array(array("id" => "recurringdaily", "val" => 1, "name" => $this->l('Daily')), array("id" => "recurringweekly", "val" => 1, "name" => $this->l('Weekly')), array("id" => "recurringmonthly", "val" => 1, "name" => $this->l('Mobthly')), array("id" => "recurringyearly", "val" => 1, "name" => $this->l('Yearly'))), "id" => "id", "name" => "name")), array("id" => "recurringpayment_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.recurringpayment_yes')"))), array("type" => "htmlhr", "name" => "section5", "values" => array()), array("type" => "agile_text_addon", "label" => $this->l('Paypal Micropayment Account(Optional)'), "class" => "width10", "name" => "business2", "hint" => $this->l('Please leave this field empty if you are not using it'), "size" => 33, "addon_text" => $this->l('Max Amount:'), "addon_name" => "micro_amount", "addon_id" => "micro_amount", "size_addon" => 10, "desc" => array($this->l('What is Paypal Micropayment Account?'), $this->l('PayPal offers support for Micropayments to merchants for US to US, GB to GB, AU to AU, and EU to EU transactions for Business and Premier accounts. This feature is offered at a special rate of 5% + $0.05 per transaction. ') . "<a href=\"https://www.paypalobjects.com/IntegrationCenter/ic_micropayments.html\" target=\"_blank\" style=\"color:Blue\">" . $this->l('See here for detail') . "</a>")), array("type" => "agile_radio_checkbox", "label" => $this->l('Membership Integrattion'), "name" => "am_integrated", "hint" => $this->l(' Integrated with membership module'), "form_group_class" => Module::isInstalled("agilemembership") ? "" : "hidden", "values" => array(array("id" => "am_integrated_yes", "value" => 1, "label" => $this->l('Yes'), "onclick" => "showitem('.am_integrated_yes')", "checkbox_list" => array("class" => "am_integrated_yes agile-radio-checkbox", "query" => array(array("id" => "am_show_choice", "val" => 1, "name" => $this->l('Allow customer to choose repeating times')), array("id" => "am_mix_product", "val" => 1, "name" => $this->l('Prevent Membership and other product mix in the shopping cart')), array("id" => "subscribe_only", "val" => 1, "name" => $this->l('Make this module for membership payment only'))), "id" => "id", "name" => "name")), array("id" => "am_integrated_no", "value" => 0, "label" => $this->l('No'), "onclick" => "hideitem('.am_integrated_yes')")))), "submit" => array("title" => $this->l('Update settings'))));
     $fjxhbnyyanl = "lang";
     ${$tfcoqgvrd} = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->name;
     ${$fjxhbnyyanl} = new Language((int) Configuration::get("PS_LANG_DEFAULT"));
     $helper->default_form_language = $lang->id;
     $helper->module = $this;
     $helper->allow_employee_form_lang = Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG") ? Configuration::get("PS_BO_ALLOW_EMPLOYEE_FORM_LANG") : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = "submitPaypal";
     $helper->currentIndex = $this->context->link->getAdminLink("AdminModules", false) . "&configure=" . $this->name . "&tab_module=" . $this->tab . "&module_name=" . $this->name;
     $helper->token = Tools::getAdminTokenLite("AdminModules");
     $helper->tpl_vars = array("fields_value" => $this->getConfigFieldsValues(), "languages" => $this->context->controller->getLanguages(), "id_language" => $this->context->language->id);
     $this->_html .= $helper->generateForm(array(${${"GLOBALS"}["ogzmjfmjkidg"]}));
     $this->context->controller->addCSS($this->_path . "css/agilepaypal.css", "all");
     $this->context->controller->addJS($this->_path . "js/agilepaypal.js");
 }
开发者ID:evilscripts,项目名称:gy,代码行数:32,代码来源:agilepaypal.php

示例13: viewAccess

 public function viewAccess($disable = false)
 {
     if (Module::isInstalled('agilemultipleshop')) {
         return true;
     }
     return parent::viewAccess($disable);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:7,代码来源:AdminShopUrlController.php

示例14: setRequestUri

 protected function setRequestUri()
 {
     parent::setRequestUri();
     if (Module::isInstalled('yamodule') && strpos($this->request_uri, 'module/yamodule/')) {
         $this->request_uri = iconv('windows-1251', 'UTF-8', $this->request_uri);
     }
 }
开发者ID:V1dun,项目名称:yandex-money-cms-prestashop,代码行数:7,代码来源:Dispatcher.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     if (Module::isInstalled('agilemultipleseller') or Module::isInstalled('agilemultipleshop')) {
         unset($this->fields_options['general']['fields']['PS_MULTISHOP_FEATURE_ACTIVE']);
     }
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:7,代码来源:AdminPreferencesController.php


注:本文中的Module::isInstalled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。