本文整理汇总了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');
}
}
示例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>";
}
}
示例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.');
}