本文整理汇总了PHP中AgileSellerManager类的典型用法代码示例。如果您正苦于以下问题:PHP AgileSellerManager类的具体用法?PHP AgileSellerManager怎么用?PHP AgileSellerManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AgileSellerManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFooter
public function getFooter()
{
$parent_footer = parent::getFooter();
if (!isset($this->order) or !Validate::isLoadedObject($this->order)) {
return $parent_footer;
}
if (!Module::isInstalled('agilemultipleseller')) {
return $parent_footer;
}
require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
$id_seller = AgileSellerManager::getObjectOwnerID('order', $this->order->id);
$sellerinfo = new SellerInfo(SellerInfo::getIdBSellerId($id_seller), $this->order->id_lang);
$id_lang = intval(Configuration::get('PS_COUNTRY_DEFAULT'));
$this->smarty->assign(array('seller_name' => $sellerinfo->company, 'seller_address' => $sellerinfo->fulladdress($id_lang), 'seller_fax' => $sellerinfo->fax, 'seller_phone' => $sellerinfo->phone, 'sellerinfo' => $sellerinfo));
return $this->smarty->fetch($this->getTemplate('footer'));
}
示例2: postProcess
public function postProcess()
{
${"GLOBALS"}["blpimnned"] = "id_order_seller";
$dbodbxes = "id_order";
${${"GLOBALS"}["qusrvgm"]} = (int) Tools::getValue("id_order");
if (!$this->context->customer->isLogged() && !Tools::getValue("secure_key")) {
Tools::redirect("index.php?controller=authentication&back=my-account");
}
${"GLOBALS"}["tvasln"] = "id_order";
$jpdhpfqcj = "id_order";
if (!(int) Configuration::get("PS_INVOICE")) {
die(Tools::displayError("Invoices are disabled in this shop."));
}
if (isset(${${"GLOBALS"}["qusrvgm"]}) && Validate::isUnsignedId(${$dbodbxes})) {
${${"GLOBALS"}["ymjzko"]} = new Order(${$jpdhpfqcj});
}
if (!isset(${${"GLOBALS"}["ymjzko"]}) || !Validate::isLoadedObject(${${"GLOBALS"}["ymjzko"]})) {
die(Tools::displayError("Invoice not found"));
}
${${"GLOBALS"}["vewtbt"]} = AgileSellerManager::getObjectOwnerID("order", ${${"GLOBALS"}["tvasln"]});
${${"GLOBALS"}["sokafjqdei"]} = AgileSellerManager::getLinkedSellerID($this->context->customer->id);
if (${${"GLOBALS"}["blpimnned"]} != ${${"GLOBALS"}["sokafjqdei"]}) {
die(Tools::displayError("You do not have permission to see this invoice"));
}
if (Tools::isSubmit("secure_key") && $order->secure_key != Tools::getValue("secure_key")) {
die(Tools::displayError("You do not have permission to see this invoice"));
}
if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number) {
die(Tools::displayError("No invoice available"));
}
$this->order = ${${"GLOBALS"}["ymjzko"]};
}
示例3: 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;
}
示例4: 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;
}
示例5: afterUpdate
protected function afterUpdate($object)
{
$res = parent::afterUpdate($object);
if ($res && Module::isInstalled('agilemultipleseller') && Tools::getValue('id_employee') && Tools::getValue('passwd')) {
AgileSellerManager::syncSellerCredentials('b2f', Tools::getValue('id_employee'));
}
return $res;
}
示例6: renderView
public function renderView()
{
global $cookie;
if (Module::isInstalled('agilemultipleseller') && !intval(Tools::getValue('id_product')) and $this->is_seller and AgileSellerManager::limited_by_membership($cookie->id_employee)) {
$this->errors[] = Tools::displayError('You have not purchased membership yet or you have registered products more than limit allowed by your membership.');
return;
}
return parent::renderView();
}
示例7: generateHtaccess
public static function generateHtaccess($path = null, $rewrite_settings = null, $cache_control = null, $specific = '', $disable_multiviews = null, $medias = false, $disable_modsec = null)
{
if (Module::isInstalled('agilemultipleseller')) {
AgileSellerManager::ensure_configuration_record_for_all_shops();
Configuration::loadConfiguration();
return self::generateHtaccess_override($path, $rewrite_settings, $cache_control, $specific, $disable_multiviews, $medias, $disable_modsec, $disable_modsec);
}
return parent::generateHtaccess($path, $rewrite_settings, $cache_control, $specific, $disable_multiviews, $medias, $disable_modsec);
}
示例8: initContent
public function initContent()
{
parent::initContent();
${${"GLOBALS"}["fchupvb"]} = AgileSellerManager::getOrders($this->sellerinfo->id_seller, true, $this->context, true);
$this->pagination(${${"GLOBALS"}["fchupvb"]});
${${"GLOBALS"}["jejxhem"]} = AgileSellerManager::getOrders($this->sellerinfo->id_seller, true, $this->context, false, $this->p, $this->n, $this->orderBy, $this->orderWay);
self::$smarty->assign(array("seller_tab_id" => 4, "orders" => ${${"GLOBALS"}["jejxhem"]}, "invoiceAllowed" => (int) Configuration::get("PS_INVOICE")));
$this->setTemplate("sellerorders.tpl");
}
示例9: delete
public function delete()
{
$ret = parent::delete();
if (Module::isInstalled('agilemultipleseller')) {
AgileSellerManager::disableSellerProducts($this->id);
AgileSellerManager::deleteSellerInfo($this->id);
}
return $ret;
}
示例10: postProcess
public function postProcess()
{
parent::postProcess();
if (Module::isInstalled('agilemultipleseller') && Tools::getValue('passwd')) {
include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
$id_seller = SellerInfo::getSellerIdByCustomerId(Context::getContext()->customer->id);
AgileSellerManager::syncSellerCredentials('f2b', $id_seller);
}
}
示例11: renderGenericForm
public function renderGenericForm($fields_form, $fields_value, $tpl_vars = array())
{
if ($fields_form['form']['form']['id_form'] == 'step_carrier_summary') {
$fields_value['id_seller'] = AgileSellerManager::getObjectOwnerID('carrier', Tools::getValue('id_carrier'));
if ($this->is_seller) {
array_unshift($fields_form['form']['form']['input'], array('type' => 'hidden', 'label' => $this->l('Seller:'), 'name' => 'id_seller', 'required' => false));
} else {
array_unshift($fields_form['form']['form']['input'], array('type' => 'select', 'label' => $this->l('Seller:'), 'name' => 'id_seller', 'required' => false, 'default_value' => $fields_value['id_seller'], 'options' => array('query' => AgileSellerManager::getSellersNV(true, $this->l('Store Shared')), 'id' => 'id_seller', 'name' => 'name'), 'desc' => $this->l('If this is private seller data, please choose the seller. Otherwise please choose Store Shared')));
}
}
return parent::renderGenericForm($fields_form, $fields_value, $tpl_vars);
}
示例12: afterUpdate
protected function afterUpdate($object)
{
$res = parent::afterUpdate($object);
if ($res && Module::isInstalled('agilemultipleseller')) {
if (Tools::getValue('id_customer') && Tools::getValue('passwd')) {
include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
$id_seller = SellerInfo::getSellerIdByCustomerId(Tools::getValue('id_customer'));
AgileSellerManager::syncSellerCredentials('f2b', $id_seller);
}
$this->create_seller_account($object);
}
return $res;
}
示例13: processSave
public function processSave()
{
global $cookie;
$obj = parent::processSave();
if (!Module::isInstalled('agilemultipleseller')) {
return $obj;
}
if ($this->is_seller) {
AgileSellerManager::assignObjectOwner('feature', $obj->id, $cookie->id_employee);
} else {
AgileSellerManager::assignObjectOwner('feature', $obj->id, Tools::getValue('id_seller'));
}
return $obj;
}
示例14: Send
public static function Send($id_lang, $template, $subject, $templateVars, $to, $toName = NULL, $from = NULL, $fromName = NULL, $fileAttachment = NULL, $modeSMTP = NULL, $templatePath = _PS_MAIL_DIR_, $die = false, $id_shop = NULL, $bcc = null)
{
if (Module::isInstalled('agileprepaidcredit') and $template == 'payment_error') {
if (AgilePrepaidCredit::isPaymentErrorCausedByTokens($templateVars) > 0) {
return true;
}
}
$order_info_templates = array('order_conf', 'bankwire', 'cheque', 'new_order');
if (Module::isInstalled('agilesellershipping') and in_array($template, $order_info_templates)) {
AgileSellerManager::adjust_shipping_cost_carriers($templateVars);
}
if (Module::isInstalled('agilepickupcenter') and $template == 'order_conf') {
require_once _PS_ROOT_DIR_ . "/modules/agilepickupcenter/agilepickupcenter.php";
$amodule = new AgilePickupCenter();
$templateVars = $amodule->transform_mail_data($templateVars);
if (isset($templateVars['{carrier_email}']) and Validate::isEmail($templateVars['{carrier_email}'])) {
parent::Send($id_lang, $template, $subject, $templateVars, $templateVars['{carrier_email}'], $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die, $id_shop, $bcc);
}
}
if (in_array($template, $order_info_templates)) {
$shop_email = Configuration::get('PS_SHOP_EMAIL');
if (Module::isInstalled('agilemultipleseller')) {
require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
$templateVars = AgileSellerManager::appendMailTemplateVars($templateVars, $id_lang);
}
if (Module::isInstalled('agileprepaidcredit') and in_array($template, array('bankwire', 'cheque'))) {
require_once _PS_ROOT_DIR_ . "/modules/agileprepaidcredit/agileprepaidcredit.php";
$templateVars = AgilePrepaidCredit::replace_amount2pay($templateVars);
}
parent::Send($id_lang, $template, $subject, $templateVars, $shop_email, $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die, $id_shop, $bcc);
}
if (Module::isInstalled('agilemultipleseller') and $template == 'order_customer_comment') {
$id_order = intval($templateVars['{id_order}']);
$id_seller = AgileSellerManager::getObjectOwnerID('order', $id_order);
$seller = new Employee($id_seller);
parent::Send($id_lang, $template, $subject, $templateVars, $seller->email, $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die, $id_shop, $bcc);
}
if (Module::isInstalled('agilemultipleseller') and $template == 'order_conf') {
require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php";
AgileMultipleSeller::sendNewOrderMail($id_lang, $templateVars, $from, $fromName, $fileAttachment, $modeSMTP, $die, $id_shop, $bcc);
}
return parent::Send($id_lang, $template, $subject, $templateVars, $to, $toName, $from, $fromName, $fileAttachment, $modeSMTP, $templatePath, $die, $id_shop, $bcc);
}
示例15: getCarriers
public static function getCarriers($id_lang, $active = false, $delete = false, $id_zone = false, $ids_group = NULL, $modules_filters = 1)
{
global $cookie, $cart;
$carriers = parent::getCarriers($id_lang, $active, $delete, $id_zone, $ids_group, $modules_filters);
if (!Module::isInstalled('agilemultipleseller')) {
return $carriers;
}
$id_seller_for_filter = AgileSellerManager::get_id_seller_for_filter();
if ((int) $id_seller_for_filter <= 0) {
return $carriers;
}
$retCarriers = array();
foreach ($carriers as $carrier) {
$id_owner = AgileSellerManager::getObjectOwnerID('carrier', $carrier['id_carrier']);
if ($id_seller_for_filter == $id_owner || $id_owner == 0) {
$retCarriers[] = $carrier;
}
}
return $retCarriers;
}