• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AgileSellerManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了AgileSellerManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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'));
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:16,代码来源:HTMLTemplate.php


示例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"]};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:32,代码来源:sellerpdfinvoice.php


示例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;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:28,代码来源:Shop.php


示例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;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:28,代码来源:ProductController.php


示例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;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:8,代码来源:AdminEmployeesController.php


示例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();
 }
开发者ID:evilscripts,项目名称:gy,代码行数:9,代码来源:AdminOrdersController.php


示例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);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:9,代码来源:Tools.php


示例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");
 }
开发者ID:evilscripts,项目名称:gy,代码行数:9,代码来源:sellerorders.php


示例9: delete

 public function delete()
 {
     $ret = parent::delete();
     if (Module::isInstalled('agilemultipleseller')) {
         AgileSellerManager::disableSellerProducts($this->id);
         AgileSellerManager::deleteSellerInfo($this->id);
     }
     return $ret;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:9,代码来源:Employee.php


示例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);
     }
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:9,代码来源:IdentityController.php


示例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);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:12,代码来源:AdminCarrierWizardController.php


示例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;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:13,代码来源:AdminCustomersController.php


示例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;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:14,代码来源:AdminFeaturesController.php


示例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);
 }
开发者ID:evilscripts,项目名称:gy,代码行数:43,代码来源:Mail.php


示例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;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:20,代码来源:Carrier.php


示例16: getCustomerOrders

 public static function getCustomerOrders($id_customer, $showHiddenStatus = false, Context $context = null)
 {
     $res = parent::getCustomerOrders($id_customer, $showHiddenStatus, $context);
     if (!Module::isInstalled('agilemultipleseller')) {
         return $res;
     }
     if ($context == null) {
         $context = Context::getContext();
     }
     if ($context->cookie->id_employee == 0 || $context->cookie->profile != (int) Configuration::get('AGILE_MS_PROFILE_ID')) {
         return $res;
     }
     $ret = array();
     foreach ($res as $data) {
         $id_owner = AgileSellerManager::getObjectOwnerID('order', $data['id_order']);
         if ($id_owner != $context->cookie->id_employee) {
             continue;
         }
         $ret[] = $data;
     }
     return $ret;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:22,代码来源:Order.php


示例17: renderForm

 public function renderForm()
 {
     global $cookie;
     ${"GLOBALS"}["uwnclc"] = "sellerinfo";
     $bmgitbrqeuu = "modules";
     ${"GLOBALS"}["wgdkpcgommt"] = "modules";
     if (!(${${"GLOBALS"}["xeglymvvpvoh"]} = $this->loadObject(true))) {
         return;
     }
     ${"GLOBALS"}["cmwmre"] = "labels";
     $mobaqoqkpbc = "modules";
     $lkpwvshwx = "modules";
     ${"GLOBALS"}["owcninq"] = "modules";
     ${$mobaqoqkpbc} = array();
     ${$bmgitbrqeuu}[] = array("name" => "", "desc" => "--");
     ${${"GLOBALS"}["gqijjcqhgij"]}[] = array("name" => "agilepaypal", "desc" => "Agile Paypal or Agile Paypal Adative");
     if (Module::isInstalled("agilebankwire")) {
         ${${"GLOBALS"}["owcninq"]}[] = array("name" => "bankwire", "desc" => "Aigle Bank Wire");
     }
     if (Module::isInstalled("agilegooglecheckout")) {
         ${${"GLOBALS"}["gqijjcqhgij"]}[] = array("name" => "googlecheckout", "desc" => "Agile Google Checkout");
     }
     ${"GLOBALS"}["eoyekwrdgm"] = "tokenSellerinfo";
     if (Module::isInstalled("agilepaybycheque")) {
         ${${"GLOBALS"}["wgdkpcgommt"]}[] = array("name" => "agilepaybycheque", "desc" => "Agile Pay by check");
     }
     if (Module::isInstalled("agilecashondelivery")) {
         ${${"GLOBALS"}["gqijjcqhgij"]}[] = array("name" => "agilecashondelivery", "desc" => "Aigle Cash On Delivery");
     }
     ${${"GLOBALS"}["cmwmre"]} = "\n\t\t\tvar labels = {\n\t\t\t\tagilepaypal: {info1:\"" . $this->l('Paypal Address:') . "\",info2:\"N/A\",info3:\"N/A\",info4:\"N/A\",info5:\"N/A\" } \n\t\t\t\t,bankwire: {info1:\"" . $this->l('Account Owner:') . "\",info2:\"" . $this->l('Details:') . "\",info3:\"" . $this->l('Bank address:') . "\",info4:\"N/A\",info5:\"N/A\"}\n\t\t\t\t,googlecheckout: {info1:\"" . $this->l('Merchant ID:') . "\",info2:\"" . $this->l('Merchant Key:') . "\",info3:\"N/A\",info4:\"N/A\",info5:\"N/A\"}\n\t\t\t\t,agilepaybycheque: {info1:\"" . $this->l('To the order of:') . "\",info2:\"" . $this->l('Address:') . "\",info3:\"N/A\",info4:\"N/A\",info5:\"N/A\"}\n\t\t\t\t,agilecashondelivery: {info1:\"" . $this->l('Notes at order:') . "\",info2:\"N/A\",info3:\"N/A\",info4:\"N/A\",info5:\"N/A\"} \n\t\t\t };\t\t\n\t\t";
     $this->fields_form = array("legend" => array("title" => $this->l('Seller Payment Info'), "image" => "../img/admin/tab-customers.gif"), "input" => array(array("type" => "text_sellerinfo", "label" => $this->l('Seller:'), "name" => "id_sellerinfo", "size" => 33, "required" => false), array("type" => "select", "label" => $this->l('Payment Module:'), "name" => "module_name", "options" => array("query" => ${$lkpwvshwx}, "id" => "name", "name" => "desc"), "required" => false), array("type" => "checkbox", "name" => "in_use", "values" => array("query" => array(array("id" => "on", "name" => $this->l('In Use'), "val" => "1")), "id" => "id", "name" => "name"), "required" => false), array("type" => "textarea", "label" => $this->l('Field 1:'), "name" => "info1", "rows" => 3, "cols" => 100, "required" => false), array("type" => "textarea", "label" => $this->l('Field 2:'), "name" => "info2", "rows" => 3, "cols" => 100, "required" => false), array("type" => "textarea", "label" => $this->l('Field 3:'), "name" => "info3", "rows" => 3, "cols" => 100, "required" => false), array("type" => "textarea", "label" => $this->l('Field 4:'), "name" => "info4", "size" => 33, "required" => false), array("type" => "textarea", "label" => $this->l('Field 5:'), "name" => "info5", "rows" => 3, "cols" => 100, "required" => false)));
     $this->fields_form["submit"] = array("title" => $this->l('Save'), "class" => "btn btn-default pull-right");
     ${${"GLOBALS"}["mdpjsyd"]} = new SellerInfo(SellerInfo::getIdBSellerId($this->object->id_seller));
     ${${"GLOBALS"}["eoyekwrdgm"]} = Tools::getAdminToken("AdminSellerinfos" . (int) Tab::getIdFromClassName("AdminSellerinfos") . (int) $this->context->employee->id);
     $this->tpl_form_vars = array("agilemultipleseller_views" => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/views/", "base_dir" => _PS_BASE_URL_ . __PS_BASE_URI__, "base_dir_ssl" => _PS_BASE_URL_SSL_ . __PS_BASE_URI__, "sellerinfo" => ${${"GLOBALS"}["uwnclc"]}, "tokenSellerinfo" => ${${"GLOBALS"}["fwqgvgb"]}, "sellers" => AgileSellerManager::getSellersNV(true, "--"), "is_seller" => $cookie->profile == (int) Configuration::get("AGILE_MS_PROFILE_ID"), "labels" => ${${"GLOBALS"}["krpmgdw"]});
     $this->fields_value = array("in_use_on" => $this->getFieldValue(${${"GLOBALS"}["xeglymvvpvoh"]}, "in_use"));
     return parent::renderForm();
 }
开发者ID:evilscripts,项目名称:gy,代码行数:38,代码来源:AdminSellerPaymentinfos.php


示例18: getAttachments

    public static function getAttachments($id_lang, $id_product, $include = true)
    {
        if (Module::isInstalled('agilemultipleseller')) {
            $id_seller_for_filter = AgileSellerManager::get_id_seller_for_filter4att();
            if ((int) $id_seller_for_filter <= 0) {
                return parent::getAttachments($id_lang, $id_product, $include);
            }
            return Db::getInstance()->executeS('
			SELECT *
			FROM ' . _DB_PREFIX_ . 'attachment a
			LEFT JOIN ' . _DB_PREFIX_ . 'object_owner oo 
			ON oo.entity = \'attachment\' AND a.id_attachment = oo.id_object
			LEFT JOIN ' . _DB_PREFIX_ . 'attachment_lang al
				ON (a.id_attachment = al.id_attachment AND al.id_lang = ' . (int) $id_lang . ')
			WHERE (oo.id_owner = ' . $id_seller_for_filter . ' OR oo.id_owner = 0) AND a.id_attachment ' . ($include ? 'IN' : 'NOT IN') . ' (
				SELECT pa.id_attachment
				FROM ' . _DB_PREFIX_ . 'product_attachment pa
				WHERE id_product = ' . (int) $id_product . '
			)');
        } else {
            return parent::getAttachments($id_lang, $id_product, $include);
        }
    }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:23,代码来源:Attachment.php


示例19: getXRObjectID

 public static function getXRObjectID($table, $objid)
 {
     ${"GLOBALS"}["wvxhfsz"] = "xr_objid";
     $sxhuthfjzxd = "table";
     $klqcsqjco = "eaccess";
     $tddeevgtif = "xr_objid";
     ${${"GLOBALS"}["tcmttublc"]} = AgileSellerManager::get_entity_access(${$sxhuthfjzxd});
     ${${"GLOBALS"}["wvxhfsz"]} = intval(Tools::getValue("id_" . ${$klqcsqjco}["owner_xr_table"]));
     if (${$tddeevgtif} == 0) {
         $eekhmedqt = "table";
         $czzvtmvbqe = "xr_objid";
         ${"GLOBALS"}["cjaqbfsnkr"] = "sql";
         $nhazfhbzy = "table";
         $gqoaxc = "eaccess";
         $gymblt = "objid";
         ${${"GLOBALS"}["cjaqbfsnkr"]} = "SELECT id_" . ${$gqoaxc}["owner_xr_table"] . " FROM " . _DB_PREFIX_ . ${$nhazfhbzy} . " WHERE id_" . ${$eekhmedqt} . "=" . ${$gymblt};
         ${$czzvtmvbqe} = Db::getInstance()->getValue(${${"GLOBALS"}["iikyewhoyyrc"]});
     }
     return ${${"GLOBALS"}["xmoknveemxo"]};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:20,代码来源:AgileSellerManager.php


示例20: getProducts

    public static function getProducts($id_manufacturer, $id_lang, $p, $n, $orderBy = NULL, $orderWay = NULL, $getTotal = false, $active = true, $active_category = true, Context $context = NULL)
    {
        global $cookie;
        $agile_sql_parts = AgileSellerManager::getAdditionalSqlForProducts("p");
        if (empty($agile_sql_parts['joins']) or empty($agile_sql_parts['wheres'])) {
            parent::getProducts($id_manufacturer, $id_lang, $p, $n, $orderBy, $orderWay, $getTotal, $active, $active_category);
        }
        if ($p < 1) {
            $p = 1;
        }
        if (empty($orderBy) || $orderBy == 'position') {
            $orderBy = 'name';
        }
        if (empty($orderWay)) {
            $orderWay = 'ASC';
        }
        if (!Validate::isOrderBy($orderBy) or !Validate::isOrderWay($orderWay)) {
            die(Tools::displayError());
        }
        $groups = FrontController::getCurrentCustomerGroups();
        $sqlGroups = count($groups) ? 'IN (' . implode(',', $groups) . ')' : '= 1';
        if ($getTotal) {
            $sql = '
				SELECT p.`id_product`
				FROM `' . _DB_PREFIX_ . 'product` p
			    ' . $agile_sql_parts['joins'] . '
				WHERE p.id_manufacturer = ' . (int) $id_manufacturer . ($active ? ' AND p.`active` = 1' : '') . '
    			' . $agile_sql_parts['wheres'] . '
				AND p.`id_product` IN (
					SELECT cp.`id_product`
					FROM `' . _DB_PREFIX_ . 'category_group` cg
					LEFT JOIN `' . _DB_PREFIX_ . 'category_product` cp ON (cp.`id_category` = cg.`id_category`)' . ($active_category ? ' INNER JOIN `' . _DB_PREFIX_ . 'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '') . '
					WHERE cg.`id_group` ' . $sqlGroups . '
				)';
            $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
            return (int) sizeof($result);
        }
        $sql = '
		SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL ' . (Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20) . ' DAY)) > 0 AS new,
			(p.`price` * ((100 + (t.`rate`))/100)) AS orderprice
			' . $agile_sql_parts['selects'] . '
		FROM `' . _DB_PREFIX_ . 'product` p
			    ' . $agile_sql_parts['joins'] . '
		LEFT JOIN `' . _DB_PREFIX_ . 'product_attribute` pa ON (p.`id_product` = pa.`id_product` AND default_on = 1)
		LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = ' . (int) $id_lang . ')
		LEFT JOIN `' . _DB_PREFIX_ . 'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
		LEFT JOIN `' . _DB_PREFIX_ . 'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = ' . (int) $id_lang . ')
		LEFT JOIN `' . _DB_PREFIX_ . 'tax_rule` tr ON (p.`id_tax_rules_group` = tr.`id_tax_rules_group`
		                                           AND tr.`id_country` = ' . (int) (_PS_VERSION_ > '1.5' ? Context::getContext()->country->id : Country::getDefaultCountryId()) . '
	                                           	   AND tr.`id_state` = 0)
	    LEFT JOIN `' . _DB_PREFIX_ . 'tax` t ON (t.`id_tax` = tr.`id_tax`)
		LEFT JOIN `' . _DB_PREFIX_ . 'tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = ' . (int) $id_lang . ')
		LEFT JOIN `' . _DB_PREFIX_ . 'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer`
		WHERE p.`id_manufacturer` = ' . (int) $id_manufacturer . ($active ? ' AND p.`active` = 1' : '') . '
			' . $agile_sql_parts['wheres'] . '
		AND p.`id_product` IN (
					SELECT cp.`id_product`
					FROM `' . _DB_PREFIX_ . 'category_group` cg
					LEFT JOIN `' . _DB_PREFIX_ . 'category_product` cp ON (cp.`id_category` = cg.`id_category`)' . ($active_category ? ' INNER JOIN `' . _DB_PREFIX_ . 'category` ca ON cp.`id_category` = ca.`id_category` AND ca.`active` = 1' : '') . '
					WHERE cg.`id_group` ' . $sqlGroups . '
				)
		ORDER BY ' . ($orderBy == 'id_product' ? 'p.' : '') . '`' . pSQL($orderBy) . '` ' . pSQL($orderWay) . '
		LIMIT ' . ((int) $p - 1) * (int) $n . ',' . (int) $n;
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
        if (!$result) {
            return false;
        }
        if ($orderBy == 'price') {
            Tools::orderbyPrice($result, $orderWay);
        }
        $finalResults = Product::getProductsProperties($id_lang, $result);
        $finalResults = AgileSellerManager::prepareSellerRattingInfo($finalResults);
        return $finalResults;
    }
开发者ID:evilscripts,项目名称:gy,代码行数:74,代码来源:Manufacturer.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Ai1ec_I18n类代码示例发布时间:2022-05-23
下一篇:
PHP Agent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap