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


PHP Vendor::currentVendor方法代码示例

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


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

示例1: hookCustomerAccount

 public function hookCustomerAccount($params)
 {
     require_once dirname(__FILE__) . "/../ordervendor/Vendor.php";
     if (Vendor::currentVendor() != null) {
         return $this->display(__FILE__, 'menuitems.tpl');
     }
 }
开发者ID:redb,项目名称:prestashop,代码行数:7,代码来源:serialnrmanager.php

示例2: dirname

try {
    include dirname(__FILE__) . '/../../debug.php';
    include dirname(__FILE__) . '/../../config/config.inc.php';
    include dirname(__FILE__) . '/../../init.php';
    include dirname(__FILE__) . '/../ordervendor/Vendor.php';
    include dirname(__FILE__) . '/serialnrmanager.php';
    if (intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) {
        $rewrited_url = __PS_BASE_URI__;
    }
    include dirname(__FILE__) . '/../../header.php';
    /* include(dirname(__FILE__).'/../../debug-style.php'); */
    require_once dirname(__FILE__) . "/ProductInstance.php";
    if (!isset($_GET['serial'])) {
        $_GET['serial'] = '';
    }
    $smarty->assign('serial', $_GET['serial']);
    if ($_GET['serial'] != '') {
        $smarty->assign('product_instances', ProductInstance::search($_GET['serial'], $cookie->id_lang));
    }
    $smarty->assign("current_customer", $cookie->id_customer);
    $smarty->assign("current_vendor", Vendor::currentVendor());
    $manager = new SerialNrManager();
    echo $manager->display(dirname(__FILE__) . '/serialnrmanager.php', 'manage.tpl');
    include dirname(__FILE__) . '/../../footer.php';
} catch (Exception $e) {
    echo $e->getMessage();
    echo "<br><bR>";
    foreach ($e->getTrace() as $line) {
        echo "{$line['class']}.{$line['function']} @ {$line['file']}:{$line['line']}<br>";
    }
}
开发者ID:redb,项目名称:prestashop,代码行数:31,代码来源:manage.php

示例3: dirname

try {
    include dirname(__FILE__) . '/../../debug.php';
    include dirname(__FILE__) . '/../../config/config.inc.php';
    include dirname(__FILE__) . '/../../init.php';
    include dirname(__FILE__) . '/../ordervendor/Vendor.php';
    include dirname(__FILE__) . '/serialnrmanager.php';
    if (intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) {
        $rewrited_url = __PS_BASE_URI__;
    }
    include dirname(__FILE__) . '/../../header.php';
    /* include(dirname(__FILE__).'/../../debug-style.php'); */
    require_once dirname(__FILE__) . "/ProductInstance.php";
    $instances = ProductInstance::search($_GET['serial'], $cookie->id_lang);
    $instance = $instances[0];
    if (Vendor::currentVendor() != null || $cookie->id_customer == $instance['id_current_owner']) {
        if (isset($_POST['new_owner_email'])) {
            $new_customer = new Customer();
            $new_customer->getByEmail($_POST['new_owner_email']);
            if ($new_customer->id != 0) {
                $obj = new ProductInstance($instance['id_product_instance']);
                $obj->id_current_owner = $new_customer->id;
                $obj->save();
                Tools::redirect($_SERVER['REQUEST_URI'], '');
            } else {
                $errors[] = Tools::displayError('No customer is registered with that email address.');
            }
        }
    } else {
        $errors[] = Tools::displayError('Please refer to your vendor to change owner.');
    }
开发者ID:redb,项目名称:prestashop,代码行数:30,代码来源:changeowner.php


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